:root {
  --bg: #0f172a;
  --bg-soft: #1e293b;
  --panel: rgba(30, 41, 59, 0.78);
  --panel-solid: #111827;
  --line: rgba(251, 191, 36, 0.22);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --gold: #fbbf24;
  --gold-2: #fde68a;
  --gold-dark: #b45309;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.16), transparent 34rem),
    radial-gradient(circle at top right, rgba(180, 83, 9, 0.22), transparent 30rem),
    linear-gradient(180deg, #0f172a 0%, #111827 48%, #0b1120 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(251, 191, 36, 0.18);
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #f59e0b, #fde68a);
  box-shadow: 0 18px 45px rgba(251, 191, 36, 0.24);
  font-size: 24px;
}

.brand-text strong,
.footer-brand {
  display: block;
  font-size: 23px;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #fde68a, #fef3c7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--gold-2);
}

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

.nav-link,
.mobile-link {
  color: var(--gold-2);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 16px;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #111827;
  background: linear-gradient(90deg, #fbbf24, #fde68a);
  box-shadow: 0 14px 30px rgba(251, 191, 36, 0.18);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(251, 191, 36, 0.08);
  cursor: pointer;
}

.menu-button span {
  width: 20px;
  height: 2px;
  margin: 4px auto;
  display: block;
  border-radius: 999px;
  background: var(--gold-2);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.94);
}

.page-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 72px;
}

.hero-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  margin-bottom: 44px;
}

.hero-slider {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 34px;
  box-shadow: var(--shadow);
  background: var(--panel-solid);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 58px;
  opacity: 0;
  transform: scale(1.025);
  background-size: cover;
  background-position: center;
  transition: opacity 0.72s ease, transform 0.72s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-copy {
  width: min(640px, 100%);
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 16px;
  padding: 8px 14px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 999px;
  color: var(--gold-2);
  background: rgba(251, 191, 36, 0.12);
}

.hero-copy h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 66px);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.055em;
}

.hero-copy p,
.page-hero p,
.detail-title p {
  margin: 20px 0 0;
  max-width: 780px;
  color: var(--muted);
  line-height: 1.85;
  font-size: 17px;
}

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

.hero-tags {
  margin: 22px 0;
}

.hero-tags span,
.tag-row span,
.meta-row span,
.detail-tags span {
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 999px;
  padding: 6px 10px;
  color: #fde68a;
  background: rgba(251, 191, 36, 0.10);
  font-size: 12px;
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.primary-button,
.ghost-button,
.hero-rank-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 800;
  transition: 0.2s ease;
}

.primary-button {
  color: #111827;
  background: linear-gradient(90deg, #fbbf24, #fde68a);
  box-shadow: 0 16px 35px rgba(251, 191, 36, 0.26);
}

.ghost-button,
.hero-rank-link {
  color: var(--gold-2);
  border: 1px solid rgba(251, 191, 36, 0.3);
  background: rgba(15, 23, 42, 0.52);
}

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

.hero-dots {
  position: absolute;
  left: 58px;
  bottom: 36px;
  display: flex;
  gap: 10px;
  z-index: 3;
}

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

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

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(251, 191, 36, 0.20);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.hero-side-title {
  color: var(--gold-2);
  font-weight: 900;
  font-size: 20px;
}

.hero-side-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  transition: 0.2s ease;
}

.hero-side-card:hover {
  border-color: rgba(251, 191, 36, 0.32);
  transform: translateX(-2px);
}

.hero-side-card img {
  width: 82px;
  height: 116px;
  border-radius: 16px;
  object-fit: cover;
  background: #111827;
}

.hero-side-card strong,
.hero-side-card small {
  display: block;
}

.hero-side-card strong {
  line-height: 1.4;
  font-size: 15px;
}

.hero-side-card small {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin: 44px 0 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 950;
  letter-spacing: -0.035em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-heading a {
  color: var(--gold-2);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.70);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.20);
  transition: 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: rgba(251, 191, 36, 0.36);
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.34);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #111827;
}

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

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

.play-pill {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  min-height: 38px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(90deg, #fbbf24, #fde68a);
  font-weight: 900;
  opacity: 0;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.movie-card:hover .play-pill {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #fde68a);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.card-body {
  padding: 14px;
}

.tag-row {
  min-height: 28px;
  margin-bottom: 10px;
}

.movie-card h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
}

.movie-card p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

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

.movie-card.compact .poster-link {
  aspect-ratio: auto;
  min-height: 148px;
}

.movie-card.compact .play-pill {
  display: none;
}

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

.category-card {
  position: relative;
  min-height: 200px;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 28px;
  background: var(--panel-solid);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 200px;
  object-fit: cover;
  opacity: 0.48;
  transition: 0.3s ease;
}

.category-card:hover img {
  opacity: 0.64;
  transform: scale(1.05);
}

.category-card span {
  position: absolute;
  inset: auto 18px 18px 18px;
}

.category-card strong,
.category-card small {
  display: block;
}

.category-card strong {
  font-size: 24px;
  font-weight: 950;
}

.category-card small {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 380px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin: 20px 0 28px;
  padding: 16px;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.62);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.search-box input::placeholder {
  color: rgba(203, 213, 225, 0.7);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chips button {
  min-height: 40px;
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 999px;
  color: var(--gold-2);
  background: rgba(251, 191, 36, 0.08);
  padding: 8px 13px;
  cursor: pointer;
  transition: 0.2s ease;
}

.filter-chips button:hover,
.filter-chips button.active {
  color: #111827;
  background: linear-gradient(90deg, #fbbf24, #fde68a);
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.20);
  border-radius: 32px;
  padding: clamp(30px, 6vw, 58px);
  background:
    linear-gradient(120deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.70)),
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.18), transparent 28rem);
  box-shadow: var(--shadow);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--gold-2);
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: #fff7ed;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 340px;
  gap: 24px;
  margin-top: 28px;
}

.player-shell {
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #111827;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.68));
  transition: 0.2s ease;
}

.player-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #fbbf24, #fde68a);
  box-shadow: 0 20px 55px rgba(251, 191, 36, 0.36);
  font-size: 30px;
  padding-left: 4px;
}

.player-overlay:hover span {
  transform: scale(1.06);
}

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

.detail-panel,
.content-panel {
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 28px;
  padding: 22px;
  background: rgba(15, 23, 42, 0.70);
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  background: #111827;
}

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

.detail-panel h2,
.content-panel h2 {
  margin: 22px 0 12px;
  color: var(--gold-2);
  font-size: 22px;
  font-weight: 900;
}

.detail-panel p,
.content-panel p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.9;
}

.detail-tags {
  margin-top: 16px;
}

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

.empty-note {
  display: none;
  margin: 24px 0;
  color: var(--gold-2);
}

.site-footer {
  border-top: 1px solid rgba(251, 191, 36, 0.16);
  background: rgba(2, 6, 23, 0.58);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
}

.site-footer p,
.site-footer a {
  display: block;
  margin: 8px 0;
  color: var(--muted);
  line-height: 1.7;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: var(--gold-2);
  font-size: 18px;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: rgba(203, 213, 225, 0.72);
}

@media (max-width: 1080px) {
  .hero-wrap,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

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

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

  .menu-button {
    display: block;
  }

  .mobile-nav.open {
    display: grid;
    gap: 8px;
  }

  .hero-slide {
    padding: 34px;
  }

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

  .hero-dots {
    left: 34px;
  }

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

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

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

@media (max-width: 560px) {
  .header-inner,
  .page-main,
  .footer-grid,
  .footer-bottom,
  .mobile-nav {
    width: min(100% - 22px, 1180px);
  }

  .brand-text small {
    display: none;
  }

  .hero-slider {
    min-height: 620px;
    border-radius: 26px;
  }

  .hero-slide {
    padding: 26px;
    align-items: end;
  }

  .hero-dots {
    left: 26px;
    bottom: 24px;
  }

  .movie-grid,
  .rank-list,
  .category-grid,
  .related-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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