:root {
  color-scheme: dark;
  --bg: #070f1f;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: #0f172a;
  --muted: #94a3b8;
  --text: #f8fafc;
  --soft-text: #dbeafe;
  --line: rgba(148, 163, 184, 0.18);
  --blue: #2563eb;
  --cyan: #22d3ee;
  --violet: #7c3aed;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.24), transparent 34rem),
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.18), transparent 32rem),
    linear-gradient(180deg, #07101f 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.68));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1440px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.36);
}

.logo-text {
  font-size: 22px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #dbeafe;
  font-size: 14px;
}

.desktop-nav a {
  padding: 8px 0;
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover {
  color: #60a5fa;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.82);
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #e2e8f0;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.94);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

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

.mobile-nav a {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.76);
  color: #dbeafe;
}

main {
  padding-top: 72px;
}

.hero {
  position: relative;
  width: min(1440px, calc(100% - 32px));
  margin: 24px auto 0;
}

.hero-stage {
  position: relative;
  min-height: 620px;
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  gap: 42px;
  align-items: center;
  padding: 76px;
  background-size: cover;
  background-position: center;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #67e8f9;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-summary,
.page-hero p,
.detail-one-line {
  max-width: 740px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span {
  padding: 6px 10px;
  border: 1px solid rgba(125, 211, 252, 0.26);
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
  color: #bfdbfe;
  font-size: 12px;
}

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

.primary-button,
.ghost-button,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: white;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.36);
}

.ghost-button,
.section-link {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.54);
  color: #dbeafe;
}

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

.hero-poster {
  height: 480px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.24);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(124, 58, 237, 0.18));
}

.hero-controls {
  position: absolute;
  left: 76px;
  bottom: 34px;
  display: flex;
  gap: 10px;
  z-index: 8;
}

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

.hero-dot.active {
  background: #60a5fa;
}

.hero-channel-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px auto 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(16px);
}

.hero-channel-bar span {
  color: #93c5fd;
  font-weight: 800;
  margin-right: 8px;
}

.hero-channel-bar a {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.92);
  color: #e0f2fe;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-channel-bar a:hover {
  background: rgba(37, 99, 235, 0.44);
  transform: translateY(-1px);
}

.search-panel,
.content-section,
.page-hero,
.detail-hero,
.player-section {
  width: min(1440px, calc(100% - 32px));
  margin: 28px auto 0;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 22px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 16px 50px rgba(2, 6, 23, 0.22);
}

.search-panel h2,
.section-heading h2,
.detail-article h2,
.detail-side h2,
.site-footer h2 {
  margin: 0;
  color: #f8fafc;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.42);
}

.search-box span {
  color: #93c5fd;
  font-weight: 800;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: white;
  font: inherit;
}

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

.section-heading.compact {
  align-items: center;
}

.content-section {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.64);
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.24);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 28px;
}

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

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

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

.movie-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 240px;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.movie-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.44);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, 0.46);
  box-shadow: 0 24px 58px rgba(2, 6, 23, 0.42);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.28), transparent 26%),
    linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(124, 58, 237, 0.22));
}

.poster img {
  transition: transform 0.35s ease;
}

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

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

.movie-card h3 {
  margin: 0 0 8px;
  min-height: 2.7em;
  font-size: 16px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: #60a5fa;
}

.movie-meta,
.movie-line {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.movie-line {
  margin-top: 8px;
  min-height: 3.2em;
}

.tag-row {
  margin-top: 12px;
}

.hot-panel {
  padding: 24px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.16), rgba(15, 23, 42, 0.82));
}

.rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.rank-item a {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.38);
}

.rank-item a:hover {
  border-color: rgba(96, 165, 250, 0.46);
  background: rgba(30, 41, 59, 0.72);
}

.rank-number {
  color: #67e8f9;
  font-weight: 900;
}

.rank-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.rank-meta {
  color: var(--muted);
  font-size: 13px;
}

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

.page-hero,
.detail-hero {
  min-height: 360px;
  padding: 64px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 18% 18%, rgba(34, 211, 238, 0.22), transparent 30rem),
    linear-gradient(135deg, rgba(37, 99, 235, 0.24), rgba(15, 23, 42, 0.92));
  box-shadow: var(--shadow);
}

.small-hero,
.rank-hero {
  display: flex;
  align-items: center;
}

.detail-hero {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  background-size: cover;
  background-position: center;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.24);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(124, 58, 237, 0.22));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48);
}

.player-section {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.72);
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 26px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

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

.play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 54px rgba(37, 99, 235, 0.38);
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.play-button span {
  display: block;
  width: 0;
  height: 0;
  margin: 0 auto;
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
  border-left: 26px solid white;
  transform: translateX(4px);
}

.video-frame.playing .play-button {
  opacity: 0;
  pointer-events: none;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
}

.detail-article,
.detail-side {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(2, 6, 23, 0.32);
}

.detail-article p {
  color: #dbeafe;
  line-height: 2;
  font-size: 16px;
}

.detail-side dl {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px 14px;
  margin: 18px 0 0;
}

.detail-side dt {
  color: #93c5fd;
  font-weight: 800;
}

.detail-side dd {
  margin: 0;
  color: #e2e8f0;
}

.detail-side a {
  color: #67e8f9;
}

.site-footer {
  width: min(1440px, calc(100% - 32px));
  margin: 36px auto 24px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(2, 6, 23, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.7fr;
  gap: 28px;
}

.footer-logo {
  margin-bottom: 12px;
  font-size: 24px;
  font-weight: 900;
}

.site-footer p,
.footer-bottom {
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  color: #cbd5e1;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.hidden-by-search {
  display: none;
}

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

  .menu-toggle {
    display: block;
  }

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

  .hero-slide {
    padding: 44px;
  }

  .hero-poster {
    display: none;
  }

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

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

@media (max-width: 760px) {
  .nav-shell,
  .hero,
  .search-panel,
  .content-section,
  .page-hero,
  .detail-hero,
  .player-section,
  .site-footer {
    width: min(100% - 20px, 680px);
  }

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

  .hero-slide,
  .page-hero,
  .detail-hero,
  .content-section,
  .player-section,
  .site-footer {
    padding: 22px;
  }

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 38px;
  }

  .hero-summary,
  .page-hero p,
  .detail-one-line {
    font-size: 15px;
  }

  .hero-controls {
    left: 24px;
    bottom: 24px;
  }

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

  .featured-grid,
  .dense-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .movie-row {
    grid-auto-columns: 210px;
  }

  .rank-item a {
    grid-template-columns: 38px 1fr;
  }

  .rank-meta {
    grid-column: 2;
  }

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

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .featured-grid,
  .dense-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

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