:root {
  --night-950: #0d0d10;
  --night-925: #141418;
  --night-900: #1a1a1f;
  --night-850: #222229;
  --night-800: #2c2c34;
  --night-700: #4a4a52;
  --night-500: #777783;
  --night-400: #a6a6b0;
  --night-200: #e8e8ee;
  --gold-500: #eab308;
  --gold-400: #facc15;
  --ember-500: #ef4444;
  --ember-700: #b91c1c;
  --panel: rgba(26, 26, 31, 0.78);
  --panel-strong: rgba(13, 13, 16, 0.9);
  --border: rgba(234, 179, 8, 0.2);
  --shadow-glow: 0 0 30px rgba(234, 179, 8, 0.26);
  --shadow-card: 0 22px 70px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  background:
    radial-gradient(circle at 18% 0%, rgba(234, 179, 8, 0.12), transparent 30rem),
    radial-gradient(circle at 90% 12%, rgba(239, 68, 68, 0.12), transparent 28rem),
    linear-gradient(135deg, var(--night-950), var(--night-900) 48%, #111116);
  color: var(--night-200);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 72%);
}

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

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

p {
  line-height: 1.8;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(44, 44, 52, 0.8);
  background: rgba(13, 13, 16, 0.82);
  backdrop-filter: blur(16px);
}

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

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

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: var(--night-950);
  background: linear-gradient(135deg, var(--gold-500), var(--ember-500));
  box-shadow: var(--shadow-glow);
}

.brand-text,
.footer-brand {
  font-size: 1.26rem;
  background: linear-gradient(90deg, var(--gold-400), var(--ember-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link,
.mobile-link {
  border-radius: 12px;
  color: var(--night-200);
  transition: 0.22s ease;
}

.nav-link {
  padding: 10px 14px;
  font-size: 0.95rem;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover {
  color: var(--gold-400);
  background: rgba(44, 44, 52, 0.62);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 280px;
}

.header-search input,
.mobile-search input,
.local-search input {
  width: 100%;
  border: 1px solid var(--night-700);
  border-radius: 14px;
  background: rgba(44, 44, 52, 0.78);
  color: white;
  outline: none;
  padding: 12px 14px;
  transition: 0.22s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.local-search input:focus {
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.14);
}

.header-search button,
.mobile-search button {
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--night-950);
  background: linear-gradient(135deg, var(--gold-500), var(--ember-500));
  cursor: pointer;
  font-weight: 800;
}

.menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  background: var(--night-800);
  color: white;
  padding: 10px 12px;
  cursor: pointer;
}

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

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

.mobile-link {
  padding: 12px;
}

.mobile-search {
  display: flex;
  gap: 8px;
}

main {
  position: relative;
  z-index: 1;
}

.hero-section {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border-bottom: 1px solid rgba(234, 179, 8, 0.12);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 56px;
  align-items: center;
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

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

.hero-backdrop,
.detail-hero::before,
.category-hero::before,
.channel-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(13, 13, 16, 0.95), rgba(13, 13, 16, 0.56), rgba(13, 13, 16, 0.9)),
    var(--poster) center / cover no-repeat;
  filter: saturate(1.05);
  opacity: 0.32;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--gold-400);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  color: white;
}

.hero-copy h3 {
  margin: 26px 0 0;
  color: var(--gold-400);
  font-size: clamp(1.65rem, 3.2vw, 3rem);
}

.hero-copy p,
.page-hero p,
.detail-copy p {
  max-width: 760px;
  color: var(--night-400);
  font-size: 1.08rem;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  padding: 14px 22px;
  font-weight: 900;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-button {
  color: var(--night-950);
  background: linear-gradient(135deg, var(--gold-500), var(--ember-500));
  box-shadow: var(--shadow-glow);
}

.ghost-button {
  border: 1px solid var(--border);
  color: white;
  background: rgba(26, 26, 31, 0.62);
}

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

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 22px;
  background:
    radial-gradient(circle at 30% 20%, rgba(250, 204, 21, 0.22), transparent 30%),
    linear-gradient(135deg, var(--night-800), var(--night-950));
  border: 1px solid rgba(234, 179, 8, 0.16);
}

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

.poster-large {
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

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

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

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

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--gold-500), var(--ember-500));
}

.section-wrap {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 0;
}

.intro-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 36px;
  margin-top: 48px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(234, 179, 8, 0.1), rgba(239, 68, 68, 0.07)),
    rgba(26, 26, 31, 0.74);
  box-shadow: var(--shadow-card);
}

.intro-strip h2,
.section-heading h2,
.detail-panel h2 {
  margin: 0;
  color: white;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.intro-strip p {
  margin-bottom: 0;
  color: var(--night-400);
}

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

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

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

.channel-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  border: 1px solid rgba(234, 179, 8, 0.14);
  border-radius: 24px;
  padding: 22px;
  background: var(--night-900);
  box-shadow: var(--shadow-card);
}

.channel-card > * {
  position: relative;
  z-index: 2;
}

.channel-card::before {
  opacity: 0.28;
  transition: opacity 0.22s ease, transform 0.5s ease;
}

.channel-card:hover::before {
  opacity: 0.42;
  transform: scale(1.05);
}

.channel-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(13, 13, 16, 0.95), rgba(13, 13, 16, 0.32));
}

.channel-name {
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--night-950);
  background: linear-gradient(135deg, var(--gold-500), var(--ember-500));
  font-weight: 900;
}

.channel-card strong {
  color: white;
  font-size: 1.22rem;
}

.channel-card span:not(.channel-name):not(.channel-overlay):not(.sr-only) {
  color: var(--night-400);
}

.channel-card em {
  color: var(--gold-400);
  font-style: normal;
  font-weight: 900;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(234, 179, 8, 0.12);
  border-radius: 24px;
  background: rgba(26, 26, 31, 0.66);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(234, 179, 8, 0.42);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.poster-link {
  position: relative;
  display: block;
}

.poster-year,
.poster-category,
.rank-badge {
  position: absolute;
  z-index: 3;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 0.75rem;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.poster-year {
  left: 10px;
  top: 10px;
  color: var(--night-950);
  background: linear-gradient(135deg, var(--gold-500), var(--ember-500));
}

.poster-category {
  right: 10px;
  bottom: 10px;
  color: white;
  background: rgba(13, 13, 16, 0.78);
}

.rank-badge {
  left: 10px;
  bottom: 10px;
  min-width: 34px;
  text-align: center;
  color: var(--night-950);
  background: var(--gold-400);
}

.card-content {
  padding: 16px;
}

.card-content h3 {
  margin: 0 0 8px;
  color: white;
  font-size: 1.02rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-content p {
  min-height: 54px;
  margin: 0 0 12px;
  color: var(--night-400);
  font-size: 0.9rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta,
.rank-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-meta span,
.rank-tags span,
.tag-chip {
  border: 1px solid rgba(234, 179, 8, 0.16);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--night-400);
  background: rgba(44, 44, 52, 0.46);
  font-size: 0.75rem;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 92px max(16px, calc((100% - 1440px) / 2)) 80px;
  border-bottom: 1px solid rgba(234, 179, 8, 0.12);
  background: var(--night-925);
}

.slim-hero {
  padding-top: 82px;
  padding-bottom: 64px;
}

.page-hero > *,
.detail-hero > * {
  position: relative;
  z-index: 2;
}

.local-search {
  max-width: 620px;
  margin-top: 26px;
}

.category-hero::before {
  opacity: 0.24;
}

.detail-hero {
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  align-items: center;
  gap: 60px;
}

.detail-hero::before {
  opacity: 0.26;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--night-400);
  font-size: 0.92rem;
}

.breadcrumb a {
  color: var(--gold-400);
}

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

.player-section {
  scroll-margin-top: 90px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(234, 179, 8, 0.18);
  border-radius: 28px;
  background: black;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  aspect-ratio: 16 / 9;
}

.video-player {
  width: 100%;
  height: 100%;
  display: block;
  background: black;
}

.play-overlay {
  position: absolute;
  inset: auto 50% 50% auto;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 999px;
  padding: 16px 24px;
  color: var(--night-950);
  background: linear-gradient(135deg, var(--gold-500), var(--ember-500));
  box-shadow: var(--shadow-glow);
  cursor: pointer;
  transform: translate(50%, 50%);
  font-weight: 900;
}

.play-overlay.is-hidden {
  display: none;
}

.play-overlay span {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}

.player-status {
  color: var(--night-400);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
  gap: 24px;
}

.detail-panel {
  border: 1px solid rgba(234, 179, 8, 0.14);
  border-radius: 28px;
  padding: 28px;
  background: rgba(26, 26, 31, 0.68);
  box-shadow: var(--shadow-card);
}

.detail-panel p {
  color: var(--night-400);
  font-size: 1.02rem;
}

.info-panel dl {
  display: grid;
  gap: 14px;
  margin: 20px 0 0;
}

.info-panel dl div {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.info-panel dt {
  color: var(--night-500);
}

.info-panel dd {
  margin: 0;
  color: white;
}

.info-panel a {
  color: var(--gold-400);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 88px minmax(0, 1fr) 110px;
  gap: 18px;
  align-items: center;
  border: 1px solid rgba(234, 179, 8, 0.12);
  border-radius: 22px;
  padding: 14px;
  background: rgba(26, 26, 31, 0.7);
  transition: 0.22s ease;
}

.rank-row:hover {
  border-color: rgba(234, 179, 8, 0.4);
  transform: translateY(-2px);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  color: var(--night-950);
  background: linear-gradient(135deg, var(--gold-500), var(--ember-500));
  font-size: 1.2rem;
  font-weight: 900;
}

.rank-thumb {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--night-800), var(--night-950));
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-main h2 {
  margin: 0 0 8px;
  color: white;
  font-size: 1.15rem;
}

.rank-main p {
  margin: 0 0 10px;
  color: var(--night-400);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-score {
  display: grid;
  place-items: center;
  border-radius: 18px;
  padding: 12px;
  color: var(--gold-400);
  background: rgba(234, 179, 8, 0.1);
}

.rank-score span {
  color: white;
  font-size: 1.3rem;
  font-weight: 900;
}

.rank-score em {
  color: var(--night-400);
  font-style: normal;
  font-size: 0.76rem;
}

.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 88px;
  border-top: 1px solid rgba(44, 44, 52, 0.85);
  background: rgba(13, 13, 16, 0.9);
}

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

.footer-grid p,
.footer-bottom {
  color: var(--night-400);
}

.footer-grid h2 {
  margin: 0 0 16px;
  color: white;
  font-size: 1rem;
}

.footer-grid a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: var(--night-400);
}

.footer-grid a:hover {
  color: var(--gold-400);
}

.footer-bottom {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 0 28px;
  font-size: 0.9rem;
}

.no-results {
  grid-column: 1 / -1;
  border: 1px solid rgba(234, 179, 8, 0.16);
  border-radius: 20px;
  padding: 28px;
  color: var(--night-400);
  background: rgba(26, 26, 31, 0.7);
}

@media (max-width: 1180px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-button {
    display: inline-flex;
  }

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

  .hero-poster,
  .detail-poster {
    display: none;
  }

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

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

@media (max-width: 760px) {
  .header-inner {
    height: 64px;
  }

  .hero-section {
    min-height: 650px;
  }

  .hero-slide {
    gap: 0;
  }

  .section-wrap {
    padding-top: 48px;
  }

  .intro-strip,
  .section-heading,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .channel-grid,
  .movie-grid,
  .compact-grid,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .compact-grid {
    gap: 16px;
  }

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

  .movie-card .poster-frame {
    height: 100%;
    border-radius: 20px 0 0 20px;
  }

  .card-content p {
    min-height: auto;
  }

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

  .rank-score {
    grid-column: 1 / -1;
    justify-items: start;
  }

  .page-hero,
  .detail-hero {
    padding-top: 62px;
    padding-bottom: 56px;
  }
}

@media (max-width: 480px) {
  .movie-card {
    grid-template-columns: 100px minmax(0, 1fr);
  }

  .brand-text {
    font-size: 1rem;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }
}
