:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-deep: #020617;
  --panel: #1e293b;
  --panel-soft: rgba(30, 41, 59, 0.74);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --cyan-deep: #0891b2;
  --orange: #fb923c;
  --green: #34d399;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 8%, rgba(34, 211, 238, 0.12), transparent 30%),
    radial-gradient(circle at 82% 0%, rgba(251, 146, 60, 0.12), transparent 28%),
    linear-gradient(180deg, #0f172a 0%, #1e293b 48%, #0f172a 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(16px);
}

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cyan);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), #2563eb);
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.35);
  font-size: 15px;
}

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

.nav-link {
  border: 0;
  color: #cbd5e1;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--cyan);
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  min-width: 180px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a,
.mobile-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #cbd5e1;
}

.dropdown-menu a:hover,
.mobile-nav a:hover {
  color: var(--cyan);
  background: rgba(51, 65, 85, 0.7);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: #cbd5e1;
}

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

.mobile-title {
  padding: 8px 12px;
  color: var(--muted);
  font-size: 13px;
}

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

.hero-section {
  position: relative;
  min-height: 620px;
  overflow: hidden;
}

.hero-gallery {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  background: #111827;
}

.hero-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
  transform: scale(1.03);
  transition: transform 5s ease, opacity 0.5s ease;
}

.hero-panel:hover img {
  opacity: 0.9;
  transform: scale(1.1);
}

.hero-panel span {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 2;
  max-width: 70%;
  color: white;
  font-weight: 700;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.76));
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #0f172a 0%, rgba(15, 23, 42, 0.82) 35%, rgba(15, 23, 42, 0.26) 72%, transparent 100%),
    linear-gradient(0deg, #0f172a 0%, transparent 42%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  min-height: 620px;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(650px, 100%);
}

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

.hero-copy h1,
.page-hero h1,
.detail-summary h1 {
  margin: 0 0 18px;
  color: white;
  font-size: clamp(42px, 8vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-summary p {
  margin: 0;
  color: #cbd5e1;
  font-size: 20px;
  line-height: 1.8;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0;
}

.hero-tags a,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  color: #b6f3ff;
  background: rgba(8, 145, 178, 0.16);
  font-size: 13px;
}

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

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

.primary-button {
  color: white;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 18px 34px rgba(6, 182, 212, 0.22);
}

.ghost-button {
  color: white;
  background: rgba(51, 65, 85, 0.82);
  backdrop-filter: blur(10px);
}

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

.page-stack,
.page-shell {
  padding: 58px 0 80px;
}

.page-shell {
  min-height: 70vh;
}

.section-block {
  margin-bottom: 64px;
}

.section-heading {
  margin-bottom: 26px;
}

.section-heading span {
  display: block;
  margin-bottom: 6px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.section-heading h2,
.content-card h2,
.related-panel h2 {
  margin: 0;
  color: white;
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.2;
}

.row-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.text-link {
  color: var(--cyan);
  font-weight: 700;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.86);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(34, 211, 238, 0.62);
  box-shadow: 0 22px 55px rgba(8, 145, 178, 0.18);
  transform: translateY(-5px);
}

.movie-card.is-hidden {
  display: none;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
}

.large-grid .poster-link {
  aspect-ratio: 16 / 9;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.78));
  opacity: 0.85;
}

.play-chip {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  color: white;
  background: rgba(34, 211, 238, 0.9);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: 0.25s ease;
}

.movie-card:hover .play-chip {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.corner-tag,
.rank-badge {
  position: absolute;
  z-index: 3;
  top: 12px;
  padding: 4px 9px;
  border-radius: 8px;
  color: white;
  font-size: 12px;
  font-weight: 700;
  background: rgba(2, 6, 23, 0.7);
  backdrop-filter: blur(10px);
}

.corner-tag.left {
  left: 12px;
  background: rgba(251, 146, 60, 0.86);
}

.corner-tag.right {
  right: 12px;
}

.rank-badge {
  left: 12px;
  bottom: 12px;
  top: auto;
  background: rgba(34, 211, 238, 0.86);
}

.movie-info {
  padding: 18px;
}

.movie-info h3 {
  margin: 0 0 8px;
  color: white;
  font-size: 18px;
  line-height: 1.35;
}

.movie-info h3 a:hover {
  color: var(--cyan);
}

.movie-info p {
  display: -webkit-box;
  min-height: 45px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #64748b;
  font-size: 13px;
}

.movie-meta span:last-child {
  color: var(--cyan);
}

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

.category-panel,
.filter-panel,
.content-card,
.related-panel,
.player-card,
.page-hero,
.detail-hero,
.channel-card a {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.58);
  box-shadow: var(--shadow);
}

.category-panel {
  padding: 34px;
}

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

.category-tile,
.channel-card a {
  display: block;
  min-height: 150px;
  padding: 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.28), rgba(51, 65, 85, 0.7));
  transition: transform 0.2s ease, background 0.2s ease;
}

.category-tile:hover,
.channel-card a:hover {
  transform: translateY(-4px);
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.42), rgba(51, 65, 85, 0.8));
}

.category-tile strong,
.channel-card h2 {
  display: block;
  margin-bottom: 8px;
  color: white;
  font-size: 19px;
}

.category-tile span,
.channel-card p {
  color: #cbd5e1;
  font-size: 14px;
}

.two-column-feature {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: 24px;
}

.rank-list {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.74);
}

.rank-row {
  display: grid;
  grid-template-columns: 42px 1fr 48px;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-row:hover {
  background: rgba(51, 65, 85, 0.7);
}

.rank-row span {
  color: var(--orange);
  font-weight: 900;
}

.rank-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row em {
  color: var(--cyan);
  font-style: normal;
  text-align: right;
}

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

.compact-grid.single-column {
  grid-template-columns: 1fr;
}

.compact-card {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 86px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.78);
  transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
  background: rgba(51, 65, 85, 0.78);
  transform: translateY(-2px);
}

.compact-card img {
  width: 110px;
  height: 66px;
  border-radius: 12px;
  object-fit: cover;
}

.compact-card strong {
  display: -webkit-box;
  overflow: hidden;
  color: white;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.compact-card em {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.page-hero {
  margin-bottom: 28px;
  padding: 40px;
  background:
    radial-gradient(circle at 88% 12%, rgba(34, 211, 238, 0.16), transparent 30%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.78));
}

.small-hero h1 {
  font-size: clamp(34px, 5vw, 54px);
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(150px, 1fr));
  gap: 16px;
  align-items: end;
  margin-bottom: 30px;
  padding: 20px;
  background: rgba(15, 23, 42, 0.76);
}

.filter-kicker {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
}

.filter-panel h2 {
  margin: 4px 0 0;
  font-size: 22px;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  color: white;
  background: rgba(2, 6, 23, 0.58);
  outline: none;
  padding: 0 12px;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(34, 211, 238, 0.75);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-shell {
  padding-top: 34px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(250px, 380px) 1fr;
  gap: 32px;
  align-items: center;
  margin-bottom: 28px;
  padding: 28px;
  background:
    radial-gradient(circle at 12% 0%, rgba(34, 211, 238, 0.18), transparent 34%),
    rgba(15, 23, 42, 0.66);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.detail-summary h1 {
  font-size: clamp(34px, 5vw, 60px);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 8px;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 12px;
  color: #e2e8f0;
  background: rgba(51, 65, 85, 0.8);
}

.player-card {
  margin-bottom: 28px;
  padding: 18px;
  background: rgba(2, 6, 23, 0.72);
}

.video-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #020617;
}

.video-wrap video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.55));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 20px 50px rgba(6, 182, 212, 0.28);
  font-size: 34px;
  padding-left: 5px;
}

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

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

.detail-main {
  display: grid;
  gap: 22px;
}

.content-card,
.related-panel {
  padding: 26px;
  background: rgba(30, 41, 59, 0.66);
}

.content-card h2,
.related-panel h2 {
  margin-bottom: 18px;
  font-size: 24px;
}

.content-card p {
  margin: 0 0 16px;
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.9;
}

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

.related-panel {
  position: sticky;
  top: 96px;
}

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

.channel-card a {
  min-height: auto;
  padding: 18px;
}

.channel-posters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.channel-posters img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  object-fit: cover;
}

.channel-card span {
  display: inline-flex;
  margin-top: 12px;
  color: var(--cyan);
  font-weight: 800;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.78);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 28px;
  padding: 42px 0;
}

.footer-brand {
  margin-bottom: 12px;
  font-size: 20px;
}

.site-footer p,
.footer-links a {
  color: var(--muted);
  font-size: 14px;
}

.site-footer h3 {
  margin: 0 0 12px;
  color: white;
}

.footer-links {
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  padding: 20px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  color: #64748b;
  text-align: center;
  font-size: 13px;
}

@media (max-width: 1100px) {
  .movie-grid,
  .large-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

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

  .related-panel {
    position: static;
  }
}

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

  .menu-button {
    display: block;
  }

  .brand {
    font-size: 20px;
  }

  .hero-section,
  .hero-content {
    min-height: 560px;
  }

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

  .hero-panel:nth-child(n+2) {
    display: none;
  }

  .hero-gradient {
    background: linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.58) 70%, rgba(15, 23, 42, 0.7) 100%);
  }

  .hero-copy p,
  .page-hero p,
  .detail-summary p {
    font-size: 17px;
  }

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

  .category-grid,
  .channel-grid,
  .two-column-feature,
  .detail-hero,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .header-inner {
    height: 64px;
  }

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

  .page-stack,
  .page-shell {
    padding: 36px 0 60px;
  }

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

  .category-panel,
  .page-hero,
  .detail-hero,
  .content-card,
  .related-panel {
    padding: 22px;
    border-radius: 20px;
  }

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

  .poster-link {
    aspect-ratio: 16 / 9;
  }

  .detail-poster img {
    aspect-ratio: 16 / 11;
  }
}
