:root {
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-400: #a8a29e;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-300: #fcd34d;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-900: #78350f;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-soft: 0 16px 40px rgba(41, 37, 36, 0.12);
  --shadow-hover: 0 22px 55px rgba(146, 64, 14, 0.24);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--stone-800);
  background: linear-gradient(135deg, var(--stone-50), var(--amber-50), var(--stone-100));
  min-height: 100vh;
}

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

img,
video {
  display: block;
  width: 100%;
}

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-nav {
  background: linear-gradient(90deg, var(--stone-900), var(--amber-900), var(--stone-900));
  border-bottom: 2px solid var(--amber-600);
  box-shadow: 0 10px 30px rgba(28, 25, 23, 0.24);
}

.nav-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: white;
}

.brand-mark,
.footer-logo {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
  color: white;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(217, 119, 6, 0.36);
}

.brand-title {
  display: block;
  font-size: 21px;
  font-weight: 900;
  line-height: 1.1;
  background: linear-gradient(90deg, var(--amber-100), var(--amber-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-subtitle {
  display: block;
  margin-top: 3px;
  color: var(--amber-300);
  font-size: 12px;
}

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

.nav-link,
.mobile-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--amber-100);
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  background: var(--amber-600);
  color: white;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  border: 0;
  color: white;
  background: var(--amber-700);
  border-radius: 10px;
  padding: 9px 12px;
}

.mobile-panel {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 18px;
}

.mobile-panel[hidden] {
  display: none;
}

.mobile-link {
  display: block;
  margin-top: 8px;
}

.hero-slider {
  min-height: 600px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  background: linear-gradient(135deg, var(--stone-900), var(--amber-900), var(--stone-800));
  color: white;
  overflow: hidden;
}

.hero-stage {
  position: relative;
  min-height: 600px;
}

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

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

.hero-slide img,
.detail-bg,
.ranking-hero img {
  height: 100%;
  object-fit: cover;
}

.hero-slide img {
  position: absolute;
  inset: 0;
  opacity: 0.36;
}

.hero-shade,
.detail-bg-shade,
.ranking-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.04));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  width: min(720px, calc(100% - 32px));
  margin-left: max(16px, calc((100vw - 1180px) / 2));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 58px 0;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  color: var(--amber-400);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.hero-content h1,
.hero-content h2,
.page-hero h1,
.detail-info h1,
.ranking-hero h1 {
  margin: 14px 0 18px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  font-weight: 950;
}

.hero-content p,
.page-hero p,
.detail-one-line,
.ranking-hero p {
  max-width: 700px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

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

.primary-button,
.ghost-button,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  min-height: 48px;
  padding: 0 26px;
  color: white;
  background: linear-gradient(90deg, var(--amber-600), var(--amber-700));
  box-shadow: 0 12px 28px rgba(217, 119, 6, 0.32);
}

.ghost-button {
  min-height: 48px;
  padding: 0 24px;
  color: white;
  border: 1px solid rgba(252, 211, 77, 0.42);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover,
.section-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-meta span,
.detail-meta span,
.detail-tags span,
.mini-tags span {
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 700;
}

.hero-dots {
  position: absolute;
  left: max(16px, calc((100vw - 1180px) / 2));
  bottom: 34px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 38px;
  height: 4px;
  border: 0;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

.hero-dot.active {
  background: var(--amber-400);
}

.hero-rail {
  padding: 34px 26px;
  background: rgba(28, 25, 23, 0.58);
  border-left: 1px solid rgba(252, 211, 77, 0.22);
  backdrop-filter: blur(12px);
  overflow-y: auto;
}

.hero-rail h2 {
  margin: 0 0 18px;
  color: var(--amber-300);
  font-size: 22px;
}

.home-search-section {
  margin-top: -46px;
  position: relative;
  z-index: 10;
}

.search-panel {
  padding: 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(252, 211, 77, 0.38);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.search-panel label {
  display: grid;
  gap: 10px;
  color: var(--stone-700);
  font-weight: 900;
}

.site-search {
  width: 100%;
  min-height: 52px;
  border: 2px solid var(--amber-300);
  border-radius: 16px;
  padding: 0 18px;
  color: var(--stone-800);
  background: white;
  outline: none;
}

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

.filter-chips,
.category-sibling-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.filter-chip,
.category-sibling-links a {
  border: 1px solid var(--amber-300);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--amber-900);
  background: var(--amber-50);
  font-weight: 800;
}

.filter-chip.active,
.filter-chip:hover,
.category-sibling-links a:hover {
  color: white;
  background: var(--amber-600);
}

.content-section {
  padding: 72px 0;
}

.soft-section {
  background: linear-gradient(135deg, var(--amber-50), var(--stone-50));
}

.section-heading,
.category-overview-head,
.player-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.section-heading h2,
.category-overview-head h2,
.player-header h2,
.story-card h2 {
  margin: 8px 0 0;
  color: var(--stone-800);
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
  font-weight: 950;
}

.section-heading p,
.category-overview-head p {
  margin: 8px 0 0;
  color: var(--stone-600);
  line-height: 1.7;
}

.section-link {
  color: var(--amber-700);
  white-space: nowrap;
}

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

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

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

.listing-grid {
  margin-top: 26px;
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(231, 229, 228, 0.86);
  border-radius: 22px;
  background: white;
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: var(--amber-400);
  box-shadow: var(--shadow-hover);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: var(--stone-200);
}

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

.movie-card.compact .poster-link {
  aspect-ratio: 2 / 3;
  height: 144px;
}

.movie-card.compact .movie-card-body {
  padding: 13px;
}

.poster-link img,
.detail-poster img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.06);
}

.year-badge,
.rank-number,
.watch-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.year-badge {
  top: 12px;
  left: 12px;
  padding: 6px 9px;
  background: rgba(28, 25, 23, 0.72);
}

.rank-number {
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
}

.watch-badge {
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 8px 10px;
  text-align: center;
  background: linear-gradient(90deg, rgba(217, 119, 6, 0.92), rgba(180, 83, 9, 0.92));
}

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

.movie-meta-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--amber-700);
  font-size: 12px;
  font-weight: 900;
}

.movie-card h3 {
  margin: 10px 0 8px;
  color: var(--stone-800);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 950;
}

.movie-card h3 a:hover {
  color: var(--amber-700);
}

.movie-card p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0;
  overflow: hidden;
  color: var(--stone-600);
  font-size: 14px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.mini-tags span {
  background: var(--amber-50);
  color: var(--amber-900);
}

.movie-card.hidden-by-filter {
  display: none;
}

.page-hero,
.ranking-hero,
.detail-hero {
  position: relative;
  color: white;
  background: linear-gradient(135deg, var(--stone-900), var(--amber-900), var(--stone-800));
  overflow: hidden;
}

.page-hero {
  padding: 86px 0 94px;
}

.category-page-hero {
  padding-top: 58px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
}

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

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

.category-tile,
.category-overview-card,
.story-card,
.player-panel {
  border: 1px solid rgba(252, 211, 77, 0.32);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.category-tile {
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.category-tile span {
  color: var(--amber-700);
  font-size: 22px;
  font-weight: 950;
}

.category-tile p {
  margin: 10px 0 0;
  color: var(--stone-600);
  line-height: 1.7;
}

.category-overview-list {
  display: grid;
  gap: 28px;
  margin-top: 28px;
}

.category-overview-card {
  padding: 28px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 34px;
}

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

.full-rank-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 28px;
}

.ranking-hero {
  min-height: 520px;
}

.ranking-hero img,
.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.42;
}

.ranking-hero-content {
  position: relative;
  z-index: 2;
  padding: 70px 0;
}

.detail-hero {
  min-height: 600px;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 46px 0 70px;
}

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

.detail-poster {
  overflow: hidden;
  border: 3px solid rgba(252, 211, 77, 0.55);
  border-radius: 24px;
  aspect-ratio: 2 / 3;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.player-panel {
  overflow: hidden;
  padding: 24px;
}

.movie-player {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 16 / 9;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.28), rgba(28, 25, 23, 0.96));
  cursor: pointer;
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: white;
  background: linear-gradient(135deg, rgba(28, 25, 23, 0.44), rgba(120, 53, 15, 0.46));
  font-size: 20px;
  font-weight: 950;
}

.movie-player.playing .player-start {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-circle {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
  box-shadow: 0 16px 36px rgba(217, 119, 6, 0.4);
}

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

.story-card {
  padding: 28px;
}

.story-card p {
  color: var(--stone-700);
  font-size: 17px;
  line-height: 1.9;
  margin: 16px 0 0;
}

.site-footer {
  color: var(--stone-400);
  background: linear-gradient(90deg, var(--stone-900), #451a03, var(--stone-900));
  border-top: 2px solid var(--amber-800);
}

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

.footer-brand {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  max-width: 760px;
}

.footer-brand strong {
  color: var(--amber-300);
  font-size: 22px;
}

.footer-brand p {
  margin: 8px 0 0;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.footer-links a:hover {
  color: var(--amber-300);
}

.footer-copy {
  margin: 26px 0 0;
  font-size: 14px;
}

@media (max-width: 1040px) {
  .hero-slider {
    grid-template-columns: 1fr;
  }

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

  .hero-rail h2 {
    grid-column: 1 / -1;
  }

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

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

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

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

  .menu-toggle {
    display: inline-flex;
  }

  .brand-subtitle {
    display: none;
  }

  .hero-stage,
  .hero-slider {
    min-height: 560px;
  }

  .hero-content {
    justify-content: flex-end;
    padding-bottom: 84px;
  }

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

  .section-heading,
  .category-overview-head,
  .player-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .feature-grid,
  .small-grid,
  .overview-grid,
  .category-grid,
  .full-rank-list {
    grid-template-columns: 1fr;
  }

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

  .content-section {
    padding: 48px 0;
  }

  .detail-info h1 {
    font-size: 36px;
  }
}
