:root {
  color-scheme: light;
  --bg: #f8fafc;
  --paper: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #e2e8f0;
  --brand: #059669;
  --brand-dark: #047857;
  --accent: #14b8a6;
  --dark: #0f172a;
  --dark-2: #1e293b;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96));
  color: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(14px);
}

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 12px 24px rgba(20, 184, 166, 0.25);
}

.brand-copy strong,
.brand-copy small {
  display: block;
}

.brand-copy strong {
  font-size: 22px;
  line-height: 1.05;
}

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

.main-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-link {
  padding: 9px 14px;
  border-radius: 999px;
  color: #e2e8f0;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(16, 185, 129, 0.18);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-panel {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.mobile-cats a {
  color: #cbd5e1;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  color: #ffffff;
  background: radial-gradient(circle at 82% 24%, rgba(20, 184, 166, 0.5), transparent 30%), linear-gradient(135deg, #0f172a, #334155 46%, #065f46);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.72) 46%, rgba(15, 23, 42, 0.18) 100%);
  pointer-events: none;
  z-index: 1;
}

.hero-slide {
  display: none;
  position: absolute;
  inset: 0;
}

.hero-slide.active {
  display: block;
}

.hero-slide img {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(58vw, 760px);
  height: 100%;
  object-fit: cover;
  opacity: 0.56;
  filter: saturate(1.05) contrast(1.02);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 620px;
  display: grid;
  align-items: center;
  padding: 72px 0;
}

.hero-copy {
  width: min(720px, 100%);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  color: #a7f3d0;
  background: rgba(5, 150, 105, 0.16);
  border: 1px solid rgba(167, 243, 208, 0.22);
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 680px;
  color: #dbeafe;
  font-size: clamp(17px, 2.2vw, 22px);
  margin: 0 0 26px;
}

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

.hero-meta span,
.detail-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 14px 30px rgba(20, 184, 166, 0.25);
  font-weight: 700;
}

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

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

.hero-dots button {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

.hero-dots button.active {
  width: 30px;
  background: #34d399;
}

.quick-search {
  position: relative;
  z-index: 4;
  width: min(980px, calc(100% - 32px));
  margin: -42px auto 0;
  padding: 20px;
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 0.8fr auto;
  gap: 12px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.quick-search input,
.quick-search select,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--soft);
  border-radius: 14px;
  padding: 0 14px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
}

.quick-search input:focus,
.quick-search select:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.15);
}

.page-wrap,
.content-section,
.category-hero,
.detail-wrap,
.search-wrap {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

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

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

.section-head h2 {
  margin: 0 0 6px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
}

.section-head p,
.category-hero p,
.search-wrap p {
  margin: 0;
  color: var(--muted);
}

.section-more {
  flex: none;
  color: var(--brand-dark);
  font-weight: 700;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 12px 32px 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 48px rgba(15, 23, 42, 0.14);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #334155, #0f172a);
}

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

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

.play-chip {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(5, 150, 105, 0.92);
  font-size: 12px;
  font-weight: 700;
}

.rank-num {
  position: absolute;
  left: 10px;
  top: 10px;
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  border-radius: 999px;
  font-size: 14px;
}

.card-body {
  padding: 16px;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.28;
}

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

.meta {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.desc {
  margin: 0 0 12px;
  color: #475569;
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 12px;
}

.category-strip {
  width: min(1200px, calc(100% - 32px));
  margin: 56px auto 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.category-tile,
.stat-card {
  padding: 20px;
  border-radius: 20px;
  color: #0f172a;
  background: linear-gradient(135deg, #ffffff, #ecfdf5);
  border: 1px solid rgba(209, 250, 229, 0.9);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.category-tile strong,
.category-tile span,
.stat-card strong,
.stat-card span {
  display: block;
}

.category-tile strong,
.stat-card strong {
  font-size: 20px;
  margin-bottom: 6px;
}

.category-tile span,
.stat-card span {
  color: var(--muted);
  font-size: 13px;
}

.category-hero {
  padding: 58px 0 30px;
}

.category-hero h1,
.search-wrap h1 {
  margin: 0 0 10px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 26px;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 0.8fr 0.8fr;
  gap: 12px;
  margin: 26px 0;
  padding: 16px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid var(--soft);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 52px 72px minmax(0, 1fr) 110px;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid var(--soft);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.rank-index {
  font-size: 22px;
  font-weight: 800;
  color: var(--brand-dark);
  text-align: center;
}

.rank-row img {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-info strong,
.rank-info em {
  display: block;
}

.rank-info strong {
  font-size: 18px;
}

.rank-info em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  margin-top: 4px;
}

.rank-heat {
  justify-self: end;
  padding: 6px 10px;
  border-radius: 999px;
  color: #047857;
  background: #d1fae5;
  font-weight: 700;
  font-size: 13px;
}

.detail-hero {
  position: relative;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #334155 52%, #065f46);
  overflow: hidden;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 82% 18%, rgba(20, 184, 166, 0.42), transparent 32%);
}

.detail-hero-inner {
  position: relative;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.35);
}

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

.breadcrumb {
  color: #a7f3d0;
  margin-bottom: 18px;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
}

.detail-copy p {
  max-width: 760px;
  color: #e2e8f0;
  font-size: 18px;
}

.detail-wrap {
  padding: 48px 0 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: var(--shadow);
}

.player-shell video {
  width: 100%;
  max-height: 72vh;
  background: #020617;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.38), rgba(2, 6, 23, 0.7));
}

.player-start.hidden {
  display: none;
}

.player-start span {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 18px 42px rgba(20, 184, 166, 0.35);
  font-size: 34px;
  padding-left: 5px;
}

.article-card {
  margin-top: 28px;
  padding: 28px;
  background: #ffffff;
  border: 1px solid var(--soft);
  border-radius: 24px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.article-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.article-card p {
  color: #334155;
  margin: 0;
}

.site-footer {
  margin-top: 76px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 30px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.5fr;
  gap: 30px;
}

.site-footer h3,
.site-footer h4 {
  margin: 0 0 12px;
  color: #ffffff;
}

.site-footer p {
  margin: 0;
  color: #94a3b8;
}

.footer-links {
  display: grid;
  gap: 8px;
}

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

.footer-links a:hover {
  color: #34d399;
}

.copyright {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 13px;
}

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

  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .mobile-panel.open {
    display: block;
  }

  .quick-search,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .movie-grid.small-grid,
  .category-strip,
  .stats-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-hero-inner {
    grid-template-columns: 180px minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .brand-copy strong {
    font-size: 18px;
  }

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

  .hero-slide img {
    width: 100%;
    opacity: 0.25;
  }

  .movie-grid,
  .movie-grid.small-grid,
  .category-strip,
  .stats-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

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

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

  .rank-row img {
    width: 58px;
    height: 78px;
  }

  .rank-heat {
    grid-column: 2 / -1;
    justify-self: start;
  }
}
