:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.72);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e5eefc;
  --muted: #94a3b8;
  --blue: #38bdf8;
  --blue-strong: #2563eb;
  --cyan: #22d3ee;
  --orange: #f97316;
  --green: #22c55e;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(15, 23, 42, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 12%, rgba(37, 99, 235, 0.24), transparent 28rem),
    radial-gradient(circle at 80% 0%, rgba(34, 211, 238, 0.16), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.95));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
}

.nav-wrap {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 800;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue-strong), var(--cyan));
  box-shadow: 0 10px 24px rgba(56, 189, 248, 0.34);
}

.brand-text {
  font-size: 20px;
  background: linear-gradient(90deg, #60a5fa, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: #dbeafe;
  font-size: 15px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--blue);
}

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

.nav-search input,
.mobile-search input,
.toolbar input {
  width: 230px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.8);
  color: var(--text);
  padding: 10px 14px;
  outline: none;
}

.nav-search input:focus,
.mobile-search input:focus,
.toolbar input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
}

.nav-search button,
.mobile-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: white;
  background: var(--blue-strong);
  cursor: pointer;
}

.menu-button {
  display: none;
  color: white;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 18px;
}

.mobile-panel {
  display: none;
  padding: 12px 24px 18px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.98);
}

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

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

.mobile-search input {
  flex: 1;
  width: auto;
}

.page {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 88px;
}

.inner-page {
  padding-top: 108px;
}

.hero {
  min-height: 560px;
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  margin: 16px 0 64px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(14, 165, 233, 0.78) 48%, rgba(15, 23, 42, 0.95)),
    radial-gradient(circle at 84% 22%, rgba(255, 255, 255, 0.28), transparent 18rem);
  box-shadow: var(--shadow);
}

.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.24;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 44px 44px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.72fr);
  gap: 34px;
  align-items: center;
  padding: 64px;
  opacity: 0;
  transform: translateX(28px);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

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

.hero h1,
.channel-hero h1,
.detail-intro h1 {
  margin: 0;
  color: white;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero h2 {
  margin: 0;
  color: white;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.hero-movie-title {
  margin-top: 10px !important;
  font-size: clamp(26px, 3vw, 38px) !important;
  color: #e0f2fe !important;
}

.hero-desc,
.channel-hero p,
.lead {
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  max-width: 760px;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
  color: #dbeafe;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
}

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

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

.primary-btn {
  color: #0f172a;
  background: white;
  box-shadow: 0 16px 35px rgba(255, 255, 255, 0.22);
}

.ghost-btn,
.more-link {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.08);
}

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

.hero-art {
  position: relative;
  align-self: stretch;
  min-height: 390px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.38);
}

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

.hero-art:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent 52%);
}

.hero-art span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 2;
  color: white;
  font-weight: 800;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
}

.hero-dots {
  position: absolute;
  left: 64px;
  bottom: 34px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 28px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
}

.hero-dot.active {
  background: white;
}

.content-section,
.category-section,
.player-section,
.detail-text,
.detail-nav {
  margin-bottom: 58px;
}

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

.section-title h2,
.player-section h2,
.detail-text h2 {
  margin: 0;
  color: white;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
}

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

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

.category-tile {
  min-height: 178px;
  padding: 22px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.94));
  border: 1px solid var(--line);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.18);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.46);
  box-shadow: 0 22px 56px rgba(37, 99, 235, 0.22);
}

.category-tile span {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--blue);
  font-weight: 900;
}

.category-tile strong {
  display: block;
  color: white;
  font-size: 20px;
}

.category-tile em {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
}

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.2);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.46);
  box-shadow: 0 24px 70px rgba(37, 99, 235, 0.22);
}

.card-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
}

.poster,
.row-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-poster:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.68), transparent 52%);
}

.card-score,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  border-radius: 999px;
  color: white;
  font-weight: 900;
  padding: 6px 10px;
  background: rgba(2, 6, 23, 0.7);
  backdrop-filter: blur(10px);
}

.card-score {
  right: 12px;
}

.rank-badge {
  left: 12px;
  background: linear-gradient(135deg, var(--orange), #ef4444);
}

.card-body {
  padding: 16px;
}

.card-title,
.rank-title {
  display: block;
  color: white;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.28;
}

.card-title:hover,
.rank-title:hover {
  color: var(--blue);
}

.card-meta {
  margin-top: 8px;
  color: #93c5fd;
  font-size: 13px;
}

.card-body p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 82px 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.76);
}

.rank-cover {
  width: 82px;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
}

.rank-num {
  color: var(--orange);
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}

.rank-info p {
  margin: 6px 0;
  color: var(--muted);
  font-size: 14px;
}

.rank-score {
  color: #fef3c7;
  font-size: 22px;
  font-weight: 900;
}

.channel-hero,
.detail-hero {
  border: 1px solid var(--line);
  border-radius: 28px;
  margin-bottom: 42px;
  padding: 48px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(15, 23, 42, 0.92)),
    radial-gradient(circle at 88% 18%, rgba(34, 211, 238, 0.22), transparent 22rem);
  box-shadow: var(--shadow);
}

.rank-hero {
  background:
    linear-gradient(135deg, rgba(249, 115, 22, 0.25), rgba(15, 23, 42, 0.94)),
    radial-gradient(circle at 80% 12%, rgba(234, 179, 8, 0.22), transparent 18rem);
}

.toolbar {
  margin-bottom: 22px;
}

.toolbar input {
  width: min(560px, 100%);
}

.toolbar.large input {
  width: min(780px, 100%);
  min-height: 50px;
  font-size: 16px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.4);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.detail-meta span {
  border-radius: 999px;
  padding: 8px 12px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid var(--line);
}

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

.video-shell {
  position: relative;
  margin-top: 20px;
  overflow: hidden;
  border-radius: 22px;
  background: black;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.video-node {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
}

.play-toggle {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 0;
  color: white;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.34), rgba(0, 0, 0, 0.36));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-toggle span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.92);
  box-shadow: 0 18px 50px rgba(37, 99, 235, 0.45);
  font-size: 34px;
  padding-left: 5px;
}

.video-shell.is-playing .play-toggle {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-text {
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 34px;
  background: rgba(15, 23, 42, 0.72);
}

.detail-text h2 + p {
  margin-top: 12px;
}

.detail-text p {
  color: #cbd5e1;
  font-size: 17px;
}

.detail-tags span {
  background: rgba(56, 189, 248, 0.12);
}

.detail-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.detail-nav a {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.72);
}

.detail-nav a:last-child {
  text-align: right;
}

.footer {
  margin-top: 72px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), #020617);
  border-top: 1px solid var(--line);
}

.footer-grid {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 24px;
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 0.8fr;
  gap: 34px;
}

.footer-brand {
  color: white;
  font-size: 22px;
  font-weight: 900;
}

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

.footer h3 {
  margin: 0 0 14px;
  color: white;
}

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

.footer-links a:hover {
  color: var(--blue);
}

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 30px;
  border-top: 1px solid var(--line);
  color: #64748b;
  text-align: center;
}

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

  .menu-button {
    display: inline-flex;
    margin-left: auto;
  }

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

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

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

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

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

@media (max-width: 760px) {
  .nav-wrap {
    padding: 0 16px;
  }

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

  .page {
    width: min(100% - 22px, 1280px);
  }

  .hero {
    min-height: 760px;
    margin-top: 8px;
  }

  .hero-slide {
    padding: 30px 22px 72px;
    align-content: start;
  }

  .hero-dots {
    left: 22px;
  }

  .channel-hero,
  .detail-hero,
  .detail-text,
  .player-section {
    padding: 24px;
  }

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

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

  .rank-num {
    display: none;
  }

  .rank-cover {
    width: 64px;
  }

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

  .detail-nav {
    flex-direction: column;
  }

  .detail-nav a:last-child {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .category-grid,
  .card-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .hero h1,
  .channel-hero h1,
  .detail-intro h1 {
    font-size: 34px;
  }
}
