:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-solid: #111827;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --accent: #22d3ee;
  --accent-strong: #06b6d4;
  --gold: #f59e0b;
  --danger: #fb7185;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 34rem),
    radial-gradient(circle at 82% 8%, rgba(59, 130, 246, 0.16), transparent 26rem),
    linear-gradient(180deg, #020617 0%, #08111f 48%, #020617 100%);
  min-height: 100vh;
}

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: 54px 54px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent 80%);
  z-index: -1;
}

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

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

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

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #04111b;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), #67e8f9 48%, #facc15);
  box-shadow: 0 10px 34px rgba(34, 211, 238, 0.25);
}

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

.brand-text strong {
  font-size: 22px;
  letter-spacing: 0.04em;
}

.brand-text em {
  margin-top: 6px;
  font-style: normal;
  font-size: 12px;
  color: var(--accent);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
}

.nav-link {
  padding: 10px 12px;
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ecfeff;
  background: rgba(34, 211, 238, 0.14);
}

.header-search {
  position: relative;
  flex: 0 0 260px;
}

.header-search input,
.filter-input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  padding: 12px 16px;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input:focus,
.filter-input:focus {
  border-color: rgba(34, 211, 238, 0.8);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
  background: rgba(15, 23, 42, 0.96);
}

.search-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(420px, 90vw);
  max-height: 440px;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.96);
  box-shadow: var(--shadow);
  display: none;
}

.search-panel.is-open {
  display: block;
}

.search-result {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.search-result:last-child {
  border-bottom: 0;
}

.search-result img {
  width: 52px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  background: #0f172a;
}

.search-result strong {
  display: block;
  color: #fff;
  margin-bottom: 5px;
}

.search-result span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.85);
  padding: 10px;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #fff;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  width: min(1260px, calc(100% - 28px));
  margin: 0 auto;
  padding: 0 0 16px;
  gap: 8px;
  flex-wrap: wrap;
}

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

.mobile-link {
  padding: 9px 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
  font-size: 14px;
}

.mobile-link.is-active {
  color: #ecfeff;
  border-color: rgba(34, 211, 238, 0.45);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}

.hero-track {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.65s ease, transform 1.2s ease;
  pointer-events: none;
}

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.08);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.72) 40%, rgba(2, 6, 23, 0.25) 72%, rgba(2, 6, 23, 0.8) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.1) 0%, rgba(2, 6, 23, 0.92) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 380px;
  align-items: center;
  gap: 48px;
  padding: 86px 0 70px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 8px 13px;
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(8, 47, 73, 0.46);
  font-size: 14px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero h1 span {
  color: var(--accent);
}

.hero-title {
  margin: 16px 0 0;
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.hero-summary {
  margin: 22px 0 0;
  max-width: 700px;
  color: #dbeafe;
  font-size: 17px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #04111b;
  background: linear-gradient(135deg, var(--accent), #67e8f9 55%, #fde68a);
  box-shadow: 0 20px 42px rgba(34, 211, 238, 0.24);
}

.btn-ghost {
  color: #e0f2fe;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.55);
}

.hero-side {
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.56);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.hero-side img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 18px;
  background: #0f172a;
}

.hero-side h3 {
  margin: 16px 0 8px;
  font-size: 22px;
}

.hero-side p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

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

.hero-dot.is-active {
  width: 58px;
  background: var(--accent);
}

.page-hero {
  padding: 72px 0 44px;
  background:
    radial-gradient(circle at 14% 20%, rgba(34, 211, 238, 0.18), transparent 28rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(2, 6, 23, 0.35));
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: #cbd5e1;
  font-size: 17px;
  line-height: 1.8;
}

.main-section {
  padding: 44px 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-more {
  flex: 0 0 auto;
  color: var(--accent);
  font-weight: 700;
}

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

.movie-card {
  min-width: 0;
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 2 / 3;
  background: #0f172a;
  box-shadow: 0 16px 42px rgba(2, 6, 23, 0.34);
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.poster-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.9) 100%);
  opacity: 0.72;
}

.play-dot {
  position: absolute;
  left: 14px;
  bottom: 14px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #04111b;
  background: rgba(103, 232, 249, 0.96);
  transform: translateY(14px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.poster:hover img {
  transform: scale(1.08);
  filter: brightness(1.05);
}

.poster:hover .play-dot {
  transform: translateY(0);
  opacity: 1;
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 10px 26px rgba(245, 158, 11, 0.28);
}

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

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

.movie-card h3 a:hover {
  color: var(--accent);
}

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

.movie-line {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag-row span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(8, 47, 73, 0.55);
  font-size: 12px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  background:
    radial-gradient(circle at 80% 16%, rgba(34, 211, 238, 0.18), transparent 9rem),
    rgba(15, 23, 42, 0.78);
  box-shadow: 0 16px 46px rgba(2, 6, 23, 0.26);
}

.category-card h2,
.category-card h3 {
  margin: 0;
  font-size: 24px;
}

.category-card p {
  margin: 12px 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.category-card a {
  color: var(--accent);
  font-weight: 700;
}

.channel-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.channel-strip a {
  flex: 0 0 auto;
  padding: 12px 16px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
}

.select-pill {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  padding: 12px 16px;
  outline: none;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 58px 92px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
}

.ranking-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #04111b;
  font-weight: 900;
  background: linear-gradient(135deg, #fde68a, #22d3ee);
}

.ranking-item img {
  width: 92px;
  height: 128px;
  border-radius: 14px;
  object-fit: cover;
  background: #0f172a;
}

.ranking-item h2,
.ranking-item h3 {
  margin: 0;
  font-size: 20px;
}

.ranking-item p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.detail-hero {
  padding: 34px 0 28px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: var(--accent);
}

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

.player-panel,
.detail-side,
.content-panel {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.player-panel {
  overflow: hidden;
}

.player-title {
  padding: 22px 24px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.13);
}

.player-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.03em;
}

.player-title p {
  margin: 12px 0 0;
  color: #cbd5e1;
  line-height: 1.8;
}

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

.player-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #04111b;
  background:
    radial-gradient(circle at center, rgba(34, 211, 238, 0.24), transparent 15rem),
    rgba(2, 6, 23, 0.34);
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 3;
}

.player-overlay span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #fde68a);
  font-weight: 900;
  box-shadow: 0 18px 52px rgba(34, 211, 238, 0.28);
}

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

.detail-side {
  padding: 18px;
}

.detail-side img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  object-fit: cover;
  background: #0f172a;
}

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

.detail-side div {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  color: #cbd5e1;
}

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

.content-panel {
  padding: 26px;
  margin-top: 28px;
}

.content-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.content-panel p {
  margin: 0 0 18px;
  color: #cbd5e1;
  line-height: 1.9;
}

.content-panel p:last-child {
  margin-bottom: 0;
}

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

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  padding: 34px 0;
}

.footer-logo {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 24px;
  font-weight: 900;
  color: #fff;
}

.footer-inner p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.footer-links a {
  color: #cbd5e1;
}

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

.empty-state {
  display: none;
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.72);
}

.empty-state.is-visible {
  display: block;
}

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

  .menu-button {
    display: block;
  }

  .header-search {
    margin-left: auto;
  }

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

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

@media (max-width: 900px) {
  .hero {
    min-height: 720px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 58px;
  }

  .hero-side {
    max-width: 360px;
  }

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

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

  .detail-side {
    max-width: 360px;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .header-inner {
    min-height: 64px;
    gap: 12px;
  }

  .brand-text em {
    display: none;
  }

  .brand-text strong {
    font-size: 18px;
  }

  .header-search {
    display: none;
  }

  .hero {
    min-height: 650px;
  }

  .hero-content {
    width: min(100% - 26px, 1200px);
  }

  .hero-summary {
    font-size: 15px;
  }

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

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

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

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

  .ranking-item {
    grid-template-columns: 42px 74px 1fr;
  }

  .ranking-item .btn {
    grid-column: 3;
    width: max-content;
  }

  .ranking-item img {
    width: 74px;
    height: 104px;
  }
}
