:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: #0f172a;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --red: #ef4444;
  --radius: 24px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.15), transparent 32rem),
    radial-gradient(circle at top right, rgba(239, 68, 68, 0.12), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.nav-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(22px);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--red));
  box-shadow: 0 16px 42px rgba(245, 158, 11, 0.28);
}

.brand-text {
  font-size: 20px;
}

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

.nav-link,
.mobile-link {
  color: var(--soft);
  padding: 10px 16px;
  border-radius: 14px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #ffffff;
  background: rgba(148, 163, 184, 0.12);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.75);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  border-radius: 99px;
}

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

.mobile-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
}

.mobile-channels a {
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
}

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

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: blur(5px) saturate(1.18);
  transform: scale(1.04);
  opacity: 0.46;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.74) 47%, rgba(2, 6, 23, 0.46) 100%),
    radial-gradient(circle at 72% 32%, rgba(245, 158, 11, 0.24), transparent 30rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 360px;
  align-items: center;
  gap: 56px;
  padding: 74px 72px 130px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  color: var(--amber-light);
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 680px;
  color: var(--soft);
  font-size: 18px;
  margin: 0 0 22px;
}

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

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(251, 191, 36, 0.20);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.10);
  font-size: 12px;
  font-weight: 700;
}

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

.primary-btn,
.secondary-btn,
.section-more,
.ghost-link,
.hero-search button,
.filter-panel button,
.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid transparent;
  padding: 10px 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn,
.hero-search button,
.filter-panel button,
.play-button {
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--red));
  box-shadow: 0 18px 38px rgba(245, 158, 11, 0.22);
}

.secondary-btn,
.section-more,
.ghost-link {
  color: #ffffff;
  border-color: var(--line);
  background: rgba(15, 23, 42, 0.72);
}

.primary-btn:hover,
.secondary-btn:hover,
.section-more:hover,
.ghost-link:hover,
.hero-search button:hover,
.filter-panel button:hover,
.play-button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.8);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.48);
}

.hero-poster img,
.poster-link img,
.rank-cover img,
.detail-cover img,
.category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 72px;
  bottom: 90px;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 30px;
  background: var(--amber-light);
}

.hero-search {
  position: absolute;
  z-index: 4;
  left: 72px;
  right: 72px;
  bottom: 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(20px);
}

.hero-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  color: var(--text);
  background: rgba(2, 6, 23, 0.62);
  padding: 0 14px;
}

.hero-channel-links {
  position: absolute;
  z-index: 3;
  left: 72px;
  bottom: 156px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-channel-links a {
  color: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.52);
}

.section {
  margin: 44px 0;
}

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

.section-heading h2,
.page-heading h1,
.detail-heading h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 191, 36, 0.42);
  background: rgba(15, 23, 42, 0.92);
}

.poster-link {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

.card-body {
  padding: 15px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.card-meta span {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.10);
}

.movie-card h3,
.rank-info h3,
.category-card h2,
.detail-copy h2,
.text-panel h2 {
  margin: 10px 0 8px;
  line-height: 1.25;
}

.movie-card p,
.rank-info p,
.text-panel p,
.detail-copy p,
.category-card p {
  color: var(--muted);
  margin: 0 0 12px;
}

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

.category-card,
.text-panel,
.filter-panel,
.player-shell,
.detail-hero,
.related-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.20);
}

.category-card {
  padding: 20px;
  min-height: 180px;
}

.category-card strong {
  color: var(--amber-light);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 76px 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.70);
}

.rank-cover {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 16px;
  background: #0f172a;
}

.rank-number {
  color: var(--amber-light);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 160px 160px 160px auto;
  gap: 12px;
  padding: 14px;
  margin-bottom: 24px;
}

.empty-state {
  display: none;
  color: var(--muted);
  text-align: center;
  padding: 40px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 28px;
  padding: 26px;
  margin: 28px 0;
}

.detail-cover {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  background: #0f172a;
}

.detail-copy .summary {
  color: var(--soft);
  font-size: 17px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  margin: 28px 0 0;
}

.breadcrumb a:hover {
  color: var(--amber-light);
}

.player-shell {
  position: relative;
  overflow: hidden;
  margin: 30px 0;
}

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

.player-frame video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.10), rgba(2, 6, 23, 0.68));
  cursor: pointer;
}

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

.play-button {
  min-width: 148px;
  min-height: 54px;
  font-size: 18px;
}

.player-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
}

.text-panel,
.related-panel {
  padding: 24px;
  margin: 24px 0;
}

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

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 24px;
}

.footer-inner p,
.footer-bottom {
  color: var(--muted);
}

.footer-links,
.footer-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a,
.footer-channels a {
  color: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 28px;
}

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

  .nav-toggle {
    display: block;
  }

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

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

  .hero-content {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 28px;
    padding: 48px 26px 190px;
  }

  .hero-poster {
    width: min(260px, 70%);
  }

  .hero-dots,
  .hero-channel-links {
    left: 26px;
  }

  .hero-search {
    left: 20px;
    right: 20px;
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .related-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 1fr;
  }

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

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

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

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

  .hero h1 {
    font-size: 40px;
  }

  .hero p {
    font-size: 16px;
  }

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

  .rank-item {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .rank-number,
  .rank-item .ghost-link {
    display: none;
  }

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

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