:root {
  color-scheme: light;
  --site-slate-950: #020617;
  --site-slate-900: #0f172a;
  --site-slate-800: #1e293b;
  --site-slate-700: #334155;
  --site-slate-100: #f1f5f9;
  --site-amber-500: #f59e0b;
  --site-amber-600: #d97706;
  --site-text: #111827;
  --site-muted: #64748b;
  --site-card: #ffffff;
  --site-line: #e2e8f0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, var(--site-slate-950), var(--site-slate-800), var(--site-slate-950));
  color: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.25);
}

.site-nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  color: white;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.28);
}

.brand strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: #cbd5e1;
  font-size: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #e5e7eb;
  font-size: 15px;
}

.nav-links a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fbbf24;
  transform: translateY(-1px);
}

.header-search {
  position: relative;
  margin-left: auto;
  width: min(330px, 32vw);
}

.header-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #fff;
  background: rgba(51, 65, 85, 0.9);
  border-radius: 999px;
  padding: 11px 44px 11px 18px;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.24);
}

.header-search input::placeholder {
  color: #94a3b8;
}

.header-search button {
  position: absolute;
  right: 5px;
  top: 5px;
  height: calc(100% - 10px);
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  background: #f59e0b;
  color: #fff;
  cursor: pointer;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  background: rgba(51, 65, 85, 0.8);
  color: #fff;
  padding: 10px 12px;
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  background: linear-gradient(90deg, var(--site-slate-950), var(--site-slate-800));
  color: #fff;
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  transform: scale(1.02);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 30%, rgba(245, 158, 11, 0.26), transparent 28%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.22) 52%, rgba(15, 23, 42, 0.74));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 520px;
  display: flex;
  align-items: center;
  padding: 72px 0;
}

.hero-copy {
  max-width: 720px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.96);
  color: #fff;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.22);
}

.hero h1,
.hero h2 {
  margin: 20px 0 18px;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.hero p {
  margin: 0 0 26px;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.75;
}

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

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

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.28);
}

.button-secondary {
  color: #111827;
  background: #fff;
}

.button-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

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

.hero-control {
  position: absolute;
  z-index: 4;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.44);
  cursor: pointer;
  font-size: 26px;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 28px;
  background: #f59e0b;
}

.main-content {
  padding: 54px 0 80px;
}

.section {
  margin-bottom: 54px;
}

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

.section-head h2,
.section-head h1 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
}

.section-head p,
.lead {
  margin: 0;
  color: var(--site-muted);
  line-height: 1.75;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: var(--site-card);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 58px rgba(15, 23, 42, 0.14);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #334155);
}

.poster-wrap.portrait {
  aspect-ratio: 3 / 4;
}

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

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.94);
  color: #fff;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

.poster-year {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  padding: 5px 10px;
  font-size: 12px;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 18px;
  line-height: 1.35;
}

.card-body p {
  margin: 0 0 14px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
}

.meta-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.meta-pill,
.tag-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  padding: 5px 9px;
  font-size: 12px;
  line-height: 1;
}

.tag-pill {
  background: #fff7ed;
  color: #c2410c;
}

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

.category-card {
  min-height: 180px;
  padding: 26px;
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 22%, rgba(251, 191, 36, 0.28), transparent 26%),
    linear-gradient(135deg, #0f172a, #1e293b 55%, #111827);
  box-shadow: 0 20px 46px rgba(15, 23, 42, 0.16);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 58px rgba(15, 23, 42, 0.24);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 24px;
}

.category-card p {
  margin: 0 0 22px;
  color: #cbd5e1;
  line-height: 1.72;
}

.ranking-panel {
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

.rank-row {
  display: grid;
  grid-template-columns: 70px 1fr 150px 140px;
  gap: 18px;
  align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid var(--site-line);
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-num {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #fff7ed;
  color: #d97706;
  font-weight: 900;
}

.rank-title strong {
  display: block;
  color: #111827;
  line-height: 1.35;
}

.rank-title span,
.rank-meta {
  color: #64748b;
  font-size: 14px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 14px;
  margin: 24px 0 30px;
  padding: 18px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.filter-bar input,
.filter-bar select,
.search-box input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  outline: 0;
  padding: 0 14px;
  color: #111827;
  background: #fff;
}

.filter-bar input:focus,
.filter-bar select:focus,
.search-box input:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}

.empty-state {
  display: none;
  padding: 34px;
  border-radius: 20px;
  text-align: center;
  color: #64748b;
  background: #fff;
}

.empty-state.is-visible {
  display: block;
}

.page-hero {
  padding: 70px 0;
  color: #fff;
  background:
    radial-gradient(circle at 72% 20%, rgba(245, 158, 11, 0.28), transparent 24%),
    linear-gradient(120deg, #020617, #1e293b);
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: #dbe4ef;
  font-size: 18px;
  line-height: 1.78;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #fde68a;
  font-size: 14px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 32px;
  align-items: start;
}

.detail-cover {
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, #111827, #334155);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-card {
  border-radius: 24px;
  background: #fff;
  padding: 30px;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.1);
}

.detail-card h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.12;
  color: #0f172a;
}

.detail-card .lead {
  margin-bottom: 22px;
  font-size: 18px;
}

.prose-block {
  margin-top: 26px;
}

.prose-block h2 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 24px;
}

.prose-block p {
  margin: 0;
  color: #334155;
  line-height: 1.9;
}

.player-section {
  margin-top: 44px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
}

.player-box video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: rgba(2, 6, 23, 0.42);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  width: 88px;
  height: 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 20px 45px rgba(245, 158, 11, 0.34);
  font-size: 38px;
  padding-left: 6px;
}

.search-panel {
  max-width: 860px;
  margin: 0 auto 34px;
}

.search-box {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

.search-box button {
  border: 0;
  border-radius: 16px;
  background: #f59e0b;
  color: #fff;
  padding: 0 22px;
  font-weight: 800;
  cursor: pointer;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a, #020617);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.footer-grid h2,
.footer-grid h3 {
  margin: 0 0 14px;
  color: #fff;
}

.footer-grid p,
.footer-grid li {
  color: #94a3b8;
  line-height: 1.75;
}

.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-grid a:hover {
  color: #fbbf24;
}

.footer-bottom {
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #64748b;
  font-size: 14px;
}

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

.line-clamp-3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

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

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

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

@media (max-width: 780px) {
  .site-nav {
    flex-wrap: wrap;
    padding: 12px 0;
  }

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

  .nav-links,
  .header-search {
    display: none;
    width: 100%;
  }

  .nav-links.is-open,
  .header-search.is-open {
    display: flex;
  }

  .nav-links.is-open {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding-top: 12px;
  }

  .header-search.is-open {
    margin: 0;
  }

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

  .hero-control {
    display: none;
  }

  .movie-grid,
  .category-grid,
  .footer-grid,
  .detail-layout,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 52px 1fr;
  }

  .rank-meta {
    display: none;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .hero h1,
  .hero h2 {
    font-size: 36px;
  }

  .search-box {
    flex-direction: column;
  }

  .search-box button {
    min-height: 46px;
  }
}
