:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --dark: #0f172a;
  --dark-soft: #1e293b;
  --brand: #f59e0b;
  --brand-dark: #b45309;
  --ring: rgba(245, 158, 11, 0.28);
  --shadow: 0 24px 55px rgba(15, 23, 42, 0.15);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

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

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.38);
}

.desktop-nav,
.mobile-nav {
  align-items: center;
  gap: 26px;
}

.desktop-nav {
  display: flex;
}

.desktop-nav a,
.mobile-nav a {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 650;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: #fbbf24;
}

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

.mobile-nav {
  display: none;
  padding: 0 24px 18px;
  flex-direction: column;
  align-items: flex-start;
}

.mobile-nav.open {
  display: flex;
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  color: #fff;
  background: #020617;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.04);
  filter: brightness(0.5) saturate(1.12);
  transition: background-image 0.55s ease, opacity 0.55s ease;
}

.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 18% 20%, rgba(245, 158, 11, 0.42), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(59, 130, 246, 0.32), transparent 26%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.82) 44%, rgba(2, 6, 23, 0.42) 100%);
  z-index: 1;
}

.hero-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 48px;
  align-items: center;
  padding: 86px 0;
}

.hero-copy .eyebrow,
.page-kicker,
.category-content span,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 7px 12px;
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
}

.hero-copy h1 {
  margin: 18px 0 18px;
  max-width: 760px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.tag-list span {
  padding: 7px 11px;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  font-size: 13px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 760;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 18px 38px rgba(245, 158, 11, 0.28);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.hero-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-slide {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.hero-slide:hover,
.hero-slide.active {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(251, 191, 36, 0.32);
  transform: translateX(-3px);
}

.hero-slide img {
  width: 88px;
  height: 116px;
  object-fit: cover;
  border-radius: 14px;
  background: #111827;
}

.hero-slide h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.hero-slide p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  line-height: 1.55;
}

.search-band {
  margin-top: -30px;
  position: relative;
  z-index: 4;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.search-box input,
.filter-input {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus,
.filter-input:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 5px var(--ring);
}

main section,
.page-section {
  padding: 68px 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.04em;
}

.section-heading p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.movie-card {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.38);
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.14);
}

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

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

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

.poster-frame::after {
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.76));
}

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  padding: 5px 9px;
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 760;
  backdrop-filter: blur(12px);
}

.year-badge {
  left: 12px;
  background: rgba(15, 23, 42, 0.78);
}

.rank-badge {
  right: 12px;
  background: linear-gradient(135deg, #ef4444, #f59e0b);
}

.play-float {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 12px;
  padding: 7px 11px;
  color: #111827;
  background: #fbbf24;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
}

.card-body h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  color: #92400e;
  font-size: 12px;
  font-weight: 750;
}

.card-meta span {
  padding: 5px 8px;
  background: #fffbeb;
  border-radius: 999px;
}

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  color: #fff;
  border-radius: 26px;
  box-shadow: var(--shadow);
  background: #111827;
}

.category-art {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: brightness(0.56) saturate(1.05);
  transform: scale(1.03);
  transition: transform 0.5s ease;
}

.category-tile:hover .category-art {
  transform: scale(1.1);
}

.category-tile::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.88));
}

.category-content {
  position: absolute;
  z-index: 2;
  inset: auto 18px 18px 18px;
}

.category-content h3 {
  margin: 12px 0 8px;
  font-size: 23px;
}

.category-content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
}

.page-hero,
.detail-hero {
  color: #fff;
  background:
    radial-gradient(circle at 18% 10%, rgba(245, 158, 11, 0.28), transparent 28%),
    linear-gradient(135deg, #020617, #1e293b 58%, #111827);
}

.page-hero .container,
.detail-hero .container {
  padding: 72px 0;
}

.page-title {
  max-width: 760px;
}

.page-title h1 {
  margin: 18px 0 16px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.page-title p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
  line-height: 1.8;
}

.filter-panel {
  margin-bottom: 28px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.category-tabs a {
  padding: 9px 13px;
  color: #475569;
  background: #f1f5f9;
  border-radius: 999px;
  font-weight: 700;
}

.category-tabs a.active,
.category-tabs a:hover {
  color: #111827;
  background: #fbbf24;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 72px 90px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}

.ranking-index {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  border-radius: 18px;
  font-weight: 900;
}

.ranking-row img {
  width: 90px;
  height: 120px;
  object-fit: cover;
  border-radius: 14px;
  background: #111827;
}

.ranking-row h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.ranking-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.detail-hero {
  position: relative;
  overflow: hidden;
}

.detail-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: blur(12px) brightness(0.34);
  transform: scale(1.08);
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 42px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  box-shadow: var(--shadow);
  background: #111827;
}

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

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

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

.detail-info h1 {
  margin: 16px 0 16px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.detail-info p {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 18px;
  line-height: 1.8;
}

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

.detail-meta span {
  padding: 8px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

.player-section {
  padding-top: 52px;
}

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

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  color: #fff;
  border: 0;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.15), rgba(2, 6, 23, 0.62));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  border-radius: 50%;
  font-size: 30px;
  box-shadow: 0 18px 45px rgba(245, 158, 11, 0.36);
}

.player-overlay strong {
  font-size: 20px;
}

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

.player-caption {
  padding: 18px 22px;
  color: rgba(255, 255, 255, 0.72);
  background: #0f172a;
}

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

.article-card,
.side-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}

.article-card {
  padding: 30px;
}

.article-card h2 {
  margin: 0 0 14px;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.article-card p {
  margin: 0 0 26px;
  color: #334155;
  font-size: 16px;
  line-height: 1.95;
}

.article-card p:last-child {
  margin-bottom: 0;
}

.side-card {
  padding: 22px;
}

.side-card h3 {
  margin: 0 0 16px;
  font-size: 20px;
}

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

.side-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
}

.side-item img {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
  background: #111827;
}

.side-item strong {
  display: block;
  margin-bottom: 6px;
  line-height: 1.35;
}

.side-item span {
  color: var(--muted);
  font-size: 13px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 1fr;
  gap: 40px;
  padding: 54px 0;
}

.footer-brand {
  color: #fff;
  margin-bottom: 16px;
}

.site-footer p {
  max-width: 520px;
  margin: 0;
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 16px;
  color: #fff;
}

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

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

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

.footer-bottom {
  padding: 18px 0;
  color: #94a3b8;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.empty-state {
  display: none;
  padding: 34px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
}

.empty-state.show {
  display: block;
}

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

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

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

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

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

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

  .hero-layout {
    padding: 58px 0;
  }

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

  .hero-slide {
    grid-template-columns: 74px 1fr;
  }

  .hero-slide img {
    width: 74px;
    height: 98px;
  }

  .search-box {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: block;
  }

  .section-heading p {
    margin-top: 10px;
  }

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

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

  .ranking-row {
    grid-template-columns: 46px 74px 1fr;
  }

  .ranking-row .btn {
    grid-column: 2 / 4;
  }

  .ranking-index {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .ranking-row img {
    width: 74px;
    height: 98px;
  }

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

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

  .article-card {
    padding: 22px;
  }

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

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

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

  .hero-copy h1,
  .page-title h1,
  .detail-info h1 {
    letter-spacing: -0.03em;
  }
}
