:root {
  --page-bg: #f8fafc;
  --text-main: #111827;
  --text-muted: #64748b;
  --text-light: #f8fafc;
  --brand: #ea580c;
  --brand-dark: #c2410c;
  --brand-soft: #ffedd5;
  --danger: #dc2626;
  --card-bg: #ffffff;
  --border: #e5e7eb;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 18px 45px rgba(15, 23, 42, 0.16);
  --radius-lg: 22px;
  --radius-md: 16px;
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  background: linear-gradient(180deg, #f9fafb 0%, #eef2f7 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: white;
  background: linear-gradient(90deg, #d97706 0%, #ea580c 52%, #dc2626 100%);
  box-shadow: 0 10px 30px rgba(194, 65, 12, 0.28);
}

.site-nav {
  width: min(100% - 32px, var(--max-width));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-text {
  font-size: 26px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  font-size: 15px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  position: relative;
  padding: 8px 0;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffedd5;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: #ffedd5;
  opacity: 0;
  transform: scaleX(0.5);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-link:hover::after,
.nav-link.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.mobile-menu-button span {
  width: 20px;
  height: 2px;
  border-radius: 10px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  padding: 12px 20px 20px;
  background: rgba(154, 52, 18, 0.95);
}

.mobile-nav.is-open {
  display: grid;
  gap: 8px;
}

.mobile-nav-link {
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
}

.hero-carousel {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.62) 44%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.85) 0%, rgba(2, 6, 23, 0) 56%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - var(--max-width)) / 2));
  bottom: 72px;
  z-index: 2;
  width: min(720px, calc(100% - 48px));
  color: white;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fff7ed;
  background: rgba(234, 88, 12, 0.85);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-content h1,
.page-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p {
  margin: 0;
  max-width: 700px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.hero-tags span,
.detail-meta span,
.tag-cloud span,
.movie-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  padding: 8px 12px;
  color: white;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 13px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: white;
  background: linear-gradient(90deg, #f97316 0%, #dc2626 100%);
  box-shadow: 0 16px 30px rgba(220, 38, 38, 0.28);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px) scale(1.02);
}

.ghost-button {
  color: white;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: rgba(2, 6, 23, 0.52);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(2, 6, 23, 0.78);
  transform: translateY(-50%) scale(1.06);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 3;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #f97316;
}

.content-wrap {
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
  padding: 48px 0;
}

.content-wrap > section + section {
  margin-top: 70px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--text-muted);
}

.section-heading a {
  flex: 0 0 auto;
  color: var(--brand);
  font-weight: 900;
}

.search-panel {
  margin-bottom: 46px;
  padding: 20px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.search-box input,
.filter-row select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text-main);
  background: #fff;
  outline: none;
}

.search-box input {
  padding: 0 16px;
  font-size: 16px;
}

.search-box input:focus,
.filter-row select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.filter-row select {
  padding: 0 12px;
}

.no-results {
  margin: 18px 0 0;
  color: var(--brand-dark);
  font-weight: 700;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.movie-grid-wide {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-md);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111827;
}

.movie-card-small .poster-wrap {
  aspect-ratio: 16 / 10;
}

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.62) 0%, rgba(2, 6, 23, 0) 62%);
  opacity: 0.85;
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover .poster-wrap img {
  transform: scale(1.08);
}

.poster-region,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  padding: 5px 9px;
  border-radius: 10px;
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.poster-region {
  right: 12px;
  background: rgba(234, 88, 12, 0.92);
}

.rank-badge {
  left: 12px;
  background: rgba(220, 38, 38, 0.92);
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  background: rgba(234, 88, 12, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.84);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.movie-card-body {
  padding: 16px;
}

.movie-card-body h3 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--text-main);
  font-size: 17px;
  line-height: 1.4;
  font-weight: 900;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 42px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.movie-tags span {
  padding: 5px 8px;
  color: #c2410c;
  background: #ffedd5;
}

.horizontal-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 260px;
  gap: 22px;
  overflow-x: auto;
  padding: 6px 4px 18px;
  scroll-snap-type: x mandatory;
}

.horizontal-scroll .movie-card {
  scroll-snap-align: start;
}

.warm-strip {
  margin-left: calc((100% - 100vw) / 2);
  margin-right: calc((100% - 100vw) / 2);
  padding: 44px max(16px, calc((100vw - var(--max-width)) / 2));
  background: linear-gradient(90deg, rgba(255, 237, 213, 0.78) 0%, rgba(254, 226, 226, 0.7) 100%);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.category-card {
  overflow: hidden;
  min-height: 240px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  min-height: 110px;
  margin: -4px -4px 16px;
}

.category-covers img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 13px;
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.category-card span {
  display: inline-flex;
  margin-top: 18px;
  color: var(--brand);
  font-weight: 900;
}

.category-overview-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ranking-list {
  display: grid;
  gap: 14px;
}

.home-ranking {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.top-ranking {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-card {
  position: relative;
  display: grid;
  grid-template-columns: 92px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.compact-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.compact-card img {
  width: 92px;
  height: 72px;
  border-radius: 14px;
  object-fit: cover;
}

.compact-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 900;
}

.compact-card p {
  display: -webkit-box;
  margin: 0 0 6px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.compact-card span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.compact-rank {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white !important;
  background: linear-gradient(135deg, #f97316, #dc2626);
}

.page-hero {
  min-height: 300px;
  display: flex;
  align-items: center;
  color: white;
  background:
    radial-gradient(circle at 18% 10%, rgba(251, 146, 60, 0.38), transparent 34%),
    linear-gradient(110deg, #9a3412 0%, #ea580c 45%, #dc2626 100%);
}

.page-hero > div {
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
}

.page-hero h1 {
  max-width: 900px;
}

.player-shell {
  background: #020617;
}

.player-stage {
  position: relative;
  width: min(100%, 1200px);
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background: #000;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: white;
  background: rgba(2, 6, 23, 0.28);
  cursor: pointer;
  transition: opacity 0.24s ease, background 0.24s ease;
}

.player-overlay:hover {
  background: rgba(2, 6, 23, 0.46);
}

.player-overlay span {
  width: 82px;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f97316, #dc2626);
  box-shadow: 0 20px 50px rgba(220, 38, 38, 0.35);
  font-size: 34px;
}

.player-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.detail-wrap {
  padding-top: 28px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
}

.breadcrumb a {
  color: var(--brand);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.95fr);
  gap: 28px;
  align-items: start;
}

.detail-card,
.related-sidebar {
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: var(--shadow-sm);
}

.detail-card {
  padding: 30px;
}

.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.detail-title-row h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.category-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(90deg, #f97316, #dc2626);
  font-size: 13px;
  font-weight: 900;
}

.detail-one-line {
  margin: 18px 0;
  padding: 18px;
  border-radius: 16px;
  color: #334155;
  background: linear-gradient(90deg, #fff7ed, #fef2f2);
  font-size: 18px;
  line-height: 1.8;
  font-weight: 700;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.detail-meta span {
  padding: 8px 12px;
  color: #334155;
  background: #f1f5f9;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.tag-cloud span {
  padding: 7px 11px;
  color: #c2410c;
  background: var(--brand-soft);
}

.story-section + .story-section {
  margin-top: 26px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

.story-section h2,
.related-sidebar h2 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 900;
}

.story-section p {
  margin: 0;
  color: #334155;
  font-size: 17px;
  line-height: 1.95;
}

.review-section p {
  padding: 20px;
  border-radius: 16px;
  background: linear-gradient(90deg, #fff7ed, #fef2f2);
}

.related-sidebar {
  position: sticky;
  top: 88px;
  padding: 22px;
}

.related-list {
  display: grid;
  gap: 12px;
}

.related-list .compact-card {
  grid-template-columns: 74px 1fr;
  gap: 12px;
  box-shadow: none;
  background: #f8fafc;
}

.related-list .compact-card img {
  width: 74px;
  height: 88px;
}

.related-list .compact-card p {
  -webkit-line-clamp: 1;
}

.site-footer {
  margin-top: 36px;
  color: #cbd5e1;
  background: linear-gradient(90deg, #111827, #1f2937, #111827);
}

.footer-inner {
  width: min(100% - 32px, var(--max-width));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 34px;
  padding: 42px 0;
}

.footer-brand {
  color: white;
  font-size: 22px;
}

.footer-inner p {
  max-width: 520px;
  color: #cbd5e1;
  line-height: 1.8;
}

.footer-inner h2 {
  margin: 0 0 14px;
  color: white;
  font-size: 18px;
}

.footer-inner a:not(.footer-brand) {
  display: block;
  margin: 9px 0;
  color: #cbd5e1;
}

.footer-inner a:hover {
  color: #fed7aa;
}

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
  text-align: center;
  font-size: 14px;
}

@media (max-width: 1100px) {
  .movie-grid,
  .movie-grid-wide,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .related-sidebar {
    position: static;
  }
}

@media (max-width: 820px) {
  .desktop-nav {
    display: none;
  }

  .mobile-menu-button {
    display: flex;
  }

  .hero-carousel {
    height: 520px;
  }

  .hero-content {
    bottom: 64px;
  }

  .hero-arrow {
    display: none;
  }

  .filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .movie-grid,
  .movie-grid-wide,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .home-ranking,
  .top-ranking {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .site-nav {
    width: min(100% - 24px, var(--max-width));
  }

  .brand-text {
    font-size: 21px;
  }

  .content-wrap {
    width: min(100% - 24px, var(--max-width));
    padding: 34px 0;
  }

  .hero-carousel {
    height: 500px;
  }

  .hero-content {
    left: 16px;
    width: calc(100% - 32px);
  }

  .hero-tags span:nth-child(n+3) {
    display: none;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .filter-row {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .movie-grid-wide,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr 1fr;
  }

  .movie-card-body {
    padding: 12px;
  }

  .movie-card-body h3 {
    font-size: 15px;
  }

  .movie-card-body p {
    display: none;
  }

  .compact-card {
    grid-template-columns: 76px 1fr auto;
  }

  .compact-card img {
    width: 76px;
    height: 76px;
  }

  .detail-card {
    padding: 20px;
  }

  .detail-title-row {
    display: grid;
  }

  .player-overlay span {
    width: 68px;
    height: 68px;
  }
}
