:root {
  --page-bg: #0f172a;
  --panel-bg: rgba(30, 41, 59, 0.82);
  --panel-solid: #1e293b;
  --panel-soft: #334155;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --accent: #d97706;
  --accent-strong: #f59e0b;
  --accent-soft: rgba(217, 119, 6, 0.18);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-xl: 0 28px 80px rgba(0, 0, 0, 0.38);
  --shadow-md: 0 18px 45px rgba(0, 0, 0, 0.26);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(217, 119, 6, 0.18), transparent 26rem),
    radial-gradient(circle at 86% 18%, rgba(56, 189, 248, 0.08), transparent 30rem),
    linear-gradient(135deg, #0f172a 0%, #111827 42%, #1c1917 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body.menu-open {
  overflow: hidden;
}

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

img {
  display: block;
  width: 100%;
  height: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid rgba(245, 158, 11, 0.14);
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #111827;
  border-radius: 14px;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  box-shadow: 0 14px 32px rgba(217, 119, 6, 0.32);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}

.brand-text strong {
  font-size: 1.22rem;
  letter-spacing: 0.05em;
}

.brand-text small {
  margin-top: 4px;
  color: var(--subtle);
  font-size: 0.72rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.92rem;
}

.nav-link {
  position: relative;
  color: var(--muted);
  transition: color 0.25s ease;
}

.nav-link::after {
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 0;
  height: 2px;
  content: "";
  background: var(--accent-strong);
  transition: width 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fef3c7;
}

.nav-link:hover::after,
.nav-link.is-active::after {
  width: 100%;
}

.menu-button {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(51, 65, 85, 0.64);
}

.menu-button span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

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

.mobile-nav a {
  display: block;
  padding: 12px;
  color: var(--muted);
  border-radius: 12px;
}

.mobile-nav a:hover {
  color: #fef3c7;
  background: rgba(217, 119, 6, 0.14);
}

.mobile-nav.is-open {
  display: block;
}

main {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 650px;
  margin: 28px 0 48px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 34px;
  background: #020617;
  box-shadow: var(--shadow-xl);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.72fr);
  gap: 34px;
  align-items: center;
  padding: 74px;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: opacity 0.8s ease;
}

.hero-slide::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.72) 45%, rgba(15, 23, 42, 0.28)),
    radial-gradient(circle at 72% 18%, rgba(245, 158, 11, 0.22), transparent 20rem);
}

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

.hero-copy,
.hero-art {
  position: relative;
  z-index: 2;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 12px;
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.34);
  border-radius: 999px;
  background: rgba(217, 119, 6, 0.14);
  font-size: 0.82rem;
}

.hero h1,
.hero h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.08em;
}

.hero p {
  max-width: 690px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.22rem);
  line-height: 1.9;
}

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

.hero-meta span,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  color: #fed7aa;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  font-size: 0.82rem;
}

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

.button,
.button-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.button {
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  box-shadow: 0 16px 38px rgba(217, 119, 6, 0.26);
}

.button-outline {
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: rgba(15, 23, 42, 0.44);
}

.button:hover,
.button-outline:hover {
  transform: translateY(-2px);
}

.hero-art {
  align-self: stretch;
  min-height: 460px;
}

.hero-art a {
  position: relative;
  display: block;
  overflow: hidden;
  height: 100%;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
}

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition: transform 0.7s ease;
}

.hero-art a:hover img {
  transform: scale(1.06);
}

.hero-control {
  position: absolute;
  right: 36px;
  bottom: 28px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 36px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  transition: width 0.25s ease, background 0.25s ease;
}

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

.section {
  margin: 48px 0;
}

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

.section-heading h2,
.page-heading h1,
.detail-title {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  letter-spacing: -0.04em;
}

.section-heading p,
.page-heading p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--subtle);
  line-height: 1.8;
}

.section-more {
  color: #fde68a;
  white-space: nowrap;
}

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

.category-card {
  min-height: 150px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(51, 65, 85, 0.88), rgba(15, 23, 42, 0.8)),
    radial-gradient(circle at 92% 18%, rgba(217, 119, 6, 0.18), transparent 12rem);
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.42);
}

.category-card strong {
  display: block;
  font-size: 1.16rem;
}

.category-card p {
  margin: 12px 0 0;
  color: var(--subtle);
  line-height: 1.72;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  background: rgba(30, 41, 59, 0.72);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.38);
  background: rgba(30, 41, 59, 0.92);
}

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

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

.movie-card:hover img {
  transform: scale(1.07);
  opacity: 0.88;
}

.poster-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 5px 9px;
  color: #111827;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.94);
  font-size: 0.72rem;
  font-weight: 800;
}

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

.movie-card-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 2.8em;
  color: #fff7ed;
  font-weight: 800;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  margin: 8px 0 0;
  color: var(--subtle);
  font-size: 0.82rem;
}

.movie-card-desc {
  display: -webkit-box;
  overflow: hidden;
  min-height: 4.8em;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

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

.tag-row span {
  padding: 4px 8px;
  color: #fed7aa;
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: 0.72rem;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.74);
}

.search-panel input {
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  outline: none;
  background: rgba(15, 23, 42, 0.9);
}

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

.filter-buttons button {
  min-height: 38px;
  padding: 0 13px;
  color: var(--muted);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.72);
}

.filter-buttons button.is-active,
.filter-buttons button:hover {
  color: #111827;
  border-color: transparent;
  background: #f59e0b;
}

.no-results {
  display: none;
  margin-top: 20px;
  padding: 24px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.58);
}

.no-results.is-visible {
  display: block;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 48px 64px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 92px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.7);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, 0.38);
}

.rank-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #111827;
  border-radius: 14px;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  font-weight: 900;
}

.rank-item img {
  width: 64px;
  height: 86px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-copy strong {
  display: block;
  overflow: hidden;
  color: #fff7ed;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy small {
  display: block;
  margin-top: 6px;
  color: var(--subtle);
  line-height: 1.5;
}

.page-heading {
  margin: 42px 0 28px;
  padding: 34px;
  border: 1px solid rgba(245, 158, 11, 0.16);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.75)),
    radial-gradient(circle at 86% 18%, rgba(217, 119, 6, 0.16), transparent 22rem);
  box-shadow: var(--shadow-md);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--subtle);
  font-size: 0.9rem;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 24px;
  align-items: stretch;
  margin: 42px 0;
}

.player-shell,
.detail-side,
.content-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: var(--shadow-md);
}

.player-shell {
  overflow: hidden;
}

.player-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.16), rgba(2, 6, 23, 0.64));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  color: #111827;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  box-shadow: 0 20px 48px rgba(217, 119, 6, 0.32);
  font-size: 2.2rem;
}

.player-copy {
  padding: 24px;
}

.player-copy h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.18;
}

.player-copy p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.85;
}

.detail-side {
  overflow: hidden;
}

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

.detail-side-body {
  padding: 20px;
}

.detail-side-body dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.detail-side-body div {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.13);
}

.detail-side-body dt {
  color: var(--subtle);
}

.detail-side-body dd {
  margin: 0;
  color: #fff7ed;
  text-align: right;
}

.content-panel {
  margin-bottom: 24px;
  padding: 28px;
}

.content-panel h2 {
  margin: 0 0 16px;
  color: #fff7ed;
  font-size: 1.55rem;
}

.content-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 2;
}

.detail-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 32px 0;
}

.detail-navigation a {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.62);
}

.detail-navigation a:hover {
  border-color: rgba(245, 158, 11, 0.34);
}

.detail-navigation small {
  display: block;
  margin-bottom: 6px;
  color: var(--subtle);
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.42);
}

.footer-inner {
  display: grid;
  gap: 14px;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  color: var(--subtle);
}

.footer-logo {
  color: #fef3c7;
  font-size: 1.2rem;
  font-weight: 900;
}

.footer-inner p {
  max-width: 720px;
  margin: 0;
  line-height: 1.75;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

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

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

  .menu-button {
    display: flex;
  }

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

  .hero-art {
    min-height: 360px;
  }

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

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

@media (max-width: 820px) {
  main,
  .header-inner,
  .mobile-nav,
  .footer-inner {
    width: min(100% - 24px, 1220px);
  }

  .hero {
    min-height: 720px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 30px;
  }

  .hero-art {
    min-height: 280px;
  }

  .hero-control {
    right: 24px;
    bottom: 20px;
  }

  .section-heading {
    display: block;
  }

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

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

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

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

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

  .detail-side {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
  }

  .detail-side img {
    height: 100%;
  }
}

@media (max-width: 540px) {
  .brand-text strong {
    font-size: 1rem;
  }

  .brand-text small {
    display: none;
  }

  .hero {
    min-height: 680px;
  }

  .hero-slide {
    padding: 24px;
  }

  .hero h1,
  .hero h2 {
    font-size: 2.25rem;
    letter-spacing: -0.04em;
  }

  .hero p {
    font-size: 0.98rem;
  }

  .hero-art {
    min-height: 230px;
  }

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

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

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

  .movie-card-desc {
    display: none;
  }

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

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

  .play-button {
    width: 74px;
    height: 74px;
    font-size: 1.8rem;
  }
}
