:root {
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-300: #d6d3d1;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1f2937;
  --slate-900: #0f172a;
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-800: #92400e;
  --white: #ffffff;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.18);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--slate-800);
  background: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 100;
  color: var(--slate-900);
  background: transparent;
  transition: background 240ms ease, box-shadow 240ms ease, backdrop-filter 240ms ease;
}

.site-nav.is-scrolled,
.site-nav.nav-solid {
  background: rgba(250, 250, 249, 0.96);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.nav-inner {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  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.03em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-800), var(--amber-700));
  border-radius: 11px;
  box-shadow: 0 12px 24px rgba(180, 83, 9, 0.24);
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a,
.mobile-panel a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 15px;
  color: var(--slate-700);
  border-radius: 12px;
  font-weight: 700;
  transition: color 200ms ease, background 200ms ease;
}

.nav-links a:hover,
.nav-links a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
  color: var(--amber-700);
  background: var(--amber-50);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--slate-800);
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  padding: 8px 16px 16px;
  background: var(--stone-50);
  border-top: 1px solid var(--stone-200);
}

.mobile-panel.is-open {
  display: grid;
  gap: 6px;
}

.hero {
  position: relative;
  height: 76vh;
  min-height: 560px;
  overflow: hidden;
  background: var(--slate-900);
}

.hero h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.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(15, 23, 42, 0.82), rgba(15, 23, 42, 0.35), rgba(15, 23, 42, 0.62)),
    linear-gradient(0deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.04));
}

.hero-content {
  position: absolute;
  top: 50%;
  left: max(24px, calc((100vw - 1180px) / 2));
  width: min(660px, calc(100% - 48px));
  color: var(--white);
  transform: translateY(-44%);
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--amber-100);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.hero-content h2 {
  margin: 0 0 16px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.hero-content p {
  max-width: 620px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(17px, 2vw, 21px);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  color: var(--amber-800);
  background: var(--amber-50);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags .tag {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
}

.hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.button-primary,
.button-soft,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 13px;
  font-weight: 800;
  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease, color 200ms ease;
}

.button-primary {
  color: var(--white);
  background: var(--amber-600);
  box-shadow: 0 16px 30px rgba(217, 119, 6, 0.35);
}

.button-primary:hover {
  background: var(--amber-700);
  transform: translateY(-2px);
  box-shadow: 0 20px 38px rgba(180, 83, 9, 0.38);
}

.button-soft {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(10px);
}

.button-soft.dark {
  color: var(--slate-800);
  background: var(--white);
  border-color: var(--stone-200);
}

.text-link {
  min-height: 40px;
  color: var(--amber-700);
  background: var(--amber-50);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  border: 0;
  border-radius: 999px;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
  transition: background 200ms ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.3);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  right: 0;
  bottom: 34px;
  left: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: width 200ms ease, background 200ms ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: var(--white);
}

.section {
  padding: 64px 0;
}

.section-warm {
  background: linear-gradient(180deg, var(--stone-50), var(--white));
}

.section-head {
  margin-bottom: 28px;
}

.section-head h2,
.page-hero h1,
.detail-copy h1,
.detail-content h2 {
  margin: 0;
  color: var(--slate-800);
  line-height: 1.14;
  letter-spacing: -0.03em;
}

.section-head h2 {
  font-size: clamp(26px, 3vw, 36px);
}

.section-head p,
.page-hero p,
.detail-lead,
.overview-card p,
.site-footer p {
  margin: 10px 0 0;
  color: var(--slate-600);
}

.row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.rail-controls {
  display: flex;
  gap: 8px;
}

.rail-controls button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--stone-200);
  border-radius: 12px;
  color: var(--slate-700);
  background: var(--white);
  cursor: pointer;
  transition: color 200ms ease, background 200ms ease;
}

.rail-controls button:hover {
  color: var(--amber-700);
  background: var(--amber-50);
}

.movie-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 360px);
  gap: 22px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.movie-rail::-webkit-scrollbar {
  display: none;
}

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

.movie-card {
  display: block;
  min-width: 0;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--stone-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.movie-card:hover {
  border-color: rgba(217, 119, 6, 0.28);
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}

.movie-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, var(--stone-200), var(--stone-50));
}

.movie-thumb-wide {
  aspect-ratio: 16 / 9;
}

.movie-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

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

.play-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  background: rgba(15, 23, 42, 0.34);
  transition: opacity 220ms ease;
}

.play-mark::before {
  content: "▶";
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.movie-card:hover .play-mark {
  opacity: 1;
}

.year-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 8px;
  color: var(--white);
  background: rgba(15, 23, 42, 0.68);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.movie-info {
  display: block;
  padding: 16px;
}

.movie-info strong,
.movie-gradient strong,
.rank-copy strong {
  display: block;
  color: var(--slate-800);
  font-size: 17px;
  line-height: 1.35;
  transition: color 200ms ease;
}

.movie-card:hover .movie-info strong {
  color: var(--amber-700);
}

.movie-desc,
.movie-gradient em,
.rank-copy em {
  display: block;
  margin-top: 8px;
  color: var(--slate-600);
  font-size: 14px;
  font-style: normal;
}

.movie-meta-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.movie-meta-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  color: var(--slate-600);
  background: var(--stone-100);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

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

.movie-gradient {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 50px 22px 20px;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0));
}

.movie-gradient strong,
.movie-gradient em {
  color: var(--white);
}

.movie-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
}

.movie-card-foot span {
  color: var(--amber-700);
  font-weight: 800;
}

.movie-card-foot small {
  color: var(--slate-500);
  font-weight: 700;
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}

.movie-info-horizontal {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  background: var(--slate-900);
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  opacity: 0.72;
  transition: transform 500ms ease, opacity 300ms ease;
}

.category-tile:hover img {
  opacity: 0.9;
  transform: scale(1.08);
}

.category-tile span {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 48px 16px 16px;
  color: var(--white);
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0));
}

.category-tile strong,
.category-tile em {
  display: block;
}

.category-tile em {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-style: normal;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 94px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--stone-200);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.rank-row:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-lg);
}

.rank-no {
  color: var(--amber-700);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.rank-row img {
  width: 94px;
  height: 58px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--stone-200);
}

.rank-meta {
  color: var(--slate-500);
  font-size: 13px;
  font-weight: 800;
}

.page-main {
  padding-top: 72px;
}

.page-hero,
.detail-hero {
  padding: 76px 0 64px;
  background:
    radial-gradient(circle at top left, rgba(217, 119, 6, 0.2), transparent 32%),
    linear-gradient(135deg, var(--slate-900), #292524);
  color: var(--white);
}

.compact-hero h1 {
  max-width: 780px;
  font-size: clamp(34px, 5vw, 58px);
  color: var(--white);
}

.compact-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

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

.overview-card {
  padding: 26px;
  background: var(--white);
  border: 1px solid var(--stone-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.overview-card h2 {
  margin: 0;
  color: var(--slate-800);
}

.overview-card h2 a:hover,
.overview-links a:hover {
  color: var(--amber-700);
}

.overview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.overview-links a {
  padding: 6px 10px;
  color: var(--slate-600);
  background: var(--stone-100);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.search-panel {
  margin-bottom: 30px;
  padding: 22px;
  background: var(--stone-50);
  border: 1px solid var(--stone-200);
  border-radius: var(--radius-md);
}

.search-panel.slim {
  padding: 0;
  background: transparent;
  border: 0;
}

.search-input {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  color: var(--slate-800);
  background: var(--white);
  border: 1px solid var(--stone-300);
  border-radius: 14px;
  outline: 0;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.search-input:focus {
  border-color: var(--amber-600);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.14);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.filter-row button {
  min-height: 36px;
  padding: 0 12px;
  color: var(--slate-600);
  background: var(--white);
  border: 1px solid var(--stone-200);
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}

.filter-row button.active,
.filter-row button:hover {
  color: var(--white);
  background: var(--amber-600);
  border-color: var(--amber-600);
}

.detail-hero {
  padding-bottom: 84px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--amber-100);
}

.detail-copy h1 {
  color: var(--white);
  font-size: clamp(36px, 5vw, 62px);
}

.detail-lead {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 19px;
}

.detail-copy .detail-meta span {
  color: rgba(255, 255, 255, 0.84);
  background: rgba(255, 255, 255, 0.12);
}

.player-section {
  margin-top: -56px;
  padding-top: 0;
}

.player-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.62), rgba(15, 23, 42, 0.18));
  cursor: pointer;
  transition: opacity 200ms ease, visibility 200ms ease;
}

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

.player-button {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  color: var(--white);
  background: rgba(217, 119, 6, 0.88);
  border-radius: 999px;
  font-size: 32px;
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.36);
  transform: translateX(3px);
}

.detail-section {
  padding-top: 18px;
}

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

.detail-content article {
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--stone-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.detail-content p {
  margin: 14px 0 0;
  color: var(--slate-600);
}

.site-footer {
  padding: 42px 0;
  color: var(--slate-600);
  background: linear-gradient(180deg, var(--stone-100), var(--stone-200));
  border-top: 1px solid var(--stone-300);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  text-align: center;
}

.footer-brand {
  justify-content: center;
  color: var(--slate-800);
}

.copyright {
  color: var(--slate-500);
  font-size: 14px;
}

.line-clamp-1,
.line-clamp-2 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.line-clamp-1 {
  -webkit-line-clamp: 1;
}

.line-clamp-2 {
  -webkit-line-clamp: 2;
}

.is-hidden-card {
  display: none !important;
}

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

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

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

  .mobile-toggle {
    display: block;
  }

  .hero {
    height: 76vh;
    min-height: 580px;
  }

  .hero-content {
    top: auto;
    bottom: 88px;
    transform: none;
  }

  .hero-arrow {
    display: none;
  }

  .row-head,
  .detail-content {
    display: block;
  }

  .rail-controls {
    margin-top: 16px;
  }

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

  .movie-card-horizontal {
    grid-template-columns: 150px minmax(0, 1fr);
  }

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

  .detail-poster {
    max-width: 360px;
  }

  .detail-content article + article {
    margin-top: 18px;
  }

  .rank-row {
    grid-template-columns: 42px 78px minmax(0, 1fr);
  }

  .rank-meta {
    display: none;
  }
}

@media (max-width: 560px) {
  .container,
  .nav-inner,
  .footer-inner {
    width: min(100% - 24px, 1180px);
  }

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

  .hero-content h2 {
    font-size: 38px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .section {
    padding: 46px 0;
  }

  .movie-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal {
    grid-template-columns: 1fr;
  }

  .movie-info-horizontal {
    min-height: auto;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 38px 72px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-row img {
    width: 72px;
    height: 48px;
  }

  .player-button {
    width: 70px;
    height: 70px;
    font-size: 26px;
  }
}
