:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #06b6d4;
  --accent-2: #22d3ee;
  --gold: #f59e0b;
  --radius: 22px;
  --shadow: 0 24px 90px rgba(8, 145, 178, 0.20);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(8, 145, 178, 0.18), transparent 28rem),
    radial-gradient(circle at 80% 10%, rgba(14, 165, 233, 0.12), transparent 24rem),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body.no-scroll {
  overflow: hidden;
}

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

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

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

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

.site-header-inner {
  width: min(1180px, 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: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.site-logo-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #001018;
  background: linear-gradient(135deg, var(--accent-2), #67e8f9);
  box-shadow: 0 16px 40px rgba(6, 182, 212, 0.32);
}

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

.nav-link {
  padding: 10px 16px;
  border-radius: 999px;
  color: #cbd5e1;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
  background: rgba(6, 182, 212, 0.14);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.85);
}

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

.mobile-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: #dbeafe;
}

.mobile-nav a:hover {
  background: rgba(6, 182, 212, 0.14);
}

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

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  filter: saturate(1.08) contrast(1.04);
}

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

.hero-overlay-left {
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.88) 42%, rgba(15, 23, 42, 0.22) 72%, transparent 100%);
}

.hero-overlay-bottom {
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.76) 16%, transparent 48%);
}

.hero-content {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: max(32px, calc((100vw - 1180px) / 2));
  width: min(680px, calc(100% - 64px));
  transform: translateY(-48%);
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 18px;
  padding: 7px 14px;
  border: 1px solid rgba(34, 211, 238, 0.42);
  border-radius: 999px;
  color: #67e8f9;
  background: rgba(8, 145, 178, 0.16);
  box-shadow: 0 0 30px rgba(8, 145, 178, 0.18) inset;
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-desc,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  margin: 22px 0 0;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.78;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(12px);
  font-size: 13px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.btn-primary {
  color: #001018;
  background: linear-gradient(135deg, #22d3ee, #67e8f9);
  box-shadow: 0 18px 45px rgba(6, 182, 212, 0.36);
}

.btn-ghost {
  border: 1px solid rgba(148, 163, 184, 0.26);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(12px);
}

.hero-dots {
  position: absolute;
  z-index: 5;
  left: max(32px, calc((100vw - 1180px) / 2));
  bottom: 44px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 5px;
  border-radius: 99px;
  background: rgba(226, 232, 240, 0.28);
  transition: background 0.25s ease, width 0.25s ease;
}

.hero-dot.is-active {
  width: 56px;
  background: #22d3ee;
}

.content-section {
  margin-top: 58px;
}

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

.section-heading h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-kicker {
  margin-bottom: 10px;
}

.section-action {
  color: #67e8f9;
  font-weight: 800;
}

.search-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-label {
  display: block;
  margin-bottom: 10px;
  color: #bfdbfe;
  font-weight: 800;
}

.search-box {
  display: flex;
  gap: 12px;
}

.search-box input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  outline: none;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.66);
}

.search-box input:focus {
  border-color: rgba(34, 211, 238, 0.72);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.16);
}

.search-box button {
  min-width: 86px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.84);
}

.no-result {
  display: none;
  margin: 14px 0 0;
  color: #fca5a5;
}

.no-result.is-visible {
  display: block;
}

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

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

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

.catalog-grid {
  margin-top: 24px;
}

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 12px 40px rgba(2, 6, 23, 0.28);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: rgba(34, 211, 238, 0.48);
  box-shadow: 0 26px 70px rgba(6, 182, 212, 0.18);
}

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

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(8, 47, 73, 0.82));
}

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

.movie-card:hover .movie-cover img {
  transform: scale(1.08);
  filter: brightness(0.78) saturate(1.1);
}

.movie-cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 58%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent);
}

.movie-type,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  max-width: calc(100% - 24px);
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(6, 182, 212, 0.86);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: auto;
  right: 12px;
  background: rgba(245, 158, 11, 0.92);
}

.movie-play {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #001018;
  background: #67e8f9;
  box-shadow: 0 18px 50px rgba(6, 182, 212, 0.36);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.82);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-body {
  padding: 16px;
}

.movie-body h3 {
  margin: 0;
  color: #ffffff;
  font-size: 17px;
  font-weight: 850;
  line-height: 1.35;
}

.movie-body h3 a:hover {
  color: #67e8f9;
}

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.movie-meta-line span {
  padding: 3px 8px;
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.12);
  font-size: 12px;
}

.movie-body p {
  display: -webkit-box;
  min-height: 48px;
  margin: 12px 0 0;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: #94a3b8;
  line-height: 1.65;
  font-size: 14px;
}

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

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

.category-tile {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.category-tile img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.category-tile:hover img {
  opacity: 0.34;
  transform: scale(1.05);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.94), rgba(8, 145, 178, 0.28));
}

.category-tile span,
.category-tile small {
  position: relative;
  z-index: 2;
  display: block;
}

.category-tile span {
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

.category-tile small {
  max-width: 280px;
  margin-top: 12px;
  color: #cbd5e1;
  line-height: 1.7;
}

.ranking-panel,
.side-card,
.story-card,
.player-card,
.category-overview-block {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.70);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.ranking-panel {
  position: sticky;
  top: 96px;
  padding: 18px;
}

.ranking-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.ranking-panel-head span {
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
}

.ranking-panel-head a {
  color: #67e8f9;
  font-weight: 800;
}

.rank-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.rank-row span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #001018;
  background: linear-gradient(135deg, #22d3ee, #67e8f9);
  font-weight: 900;
}

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

.rank-row em {
  color: #94a3b8;
  font-size: 13px;
  font-style: normal;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 86px max(32px, calc((100vw - 1180px) / 2));
  background:
    radial-gradient(circle at 80% 0%, rgba(6, 182, 212, 0.22), transparent 25rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.98));
}

.small-hero {
  padding-top: 72px;
  padding-bottom: 72px;
}

.channel-hero {
  border-bottom: 1px solid rgba(148, 163, 184, 0.13);
}

.category-overview-grid {
  display: grid;
  gap: 26px;
}

.category-overview-block {
  padding: 24px;
}

.category-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.category-overview-head h2 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 30px;
  font-weight: 900;
}

.category-overview-head p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.7;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  padding: 72px 0;
  background: #020617;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.25;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) saturate(1.1);
  transform: scale(1.08);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.88)), linear-gradient(0deg, #020617, transparent 45%);
}

.detail-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 28px;
  box-shadow: 0 26px 80px rgba(2, 6, 23, 0.45);
  background: rgba(15, 23, 42, 0.8);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #94a3b8;
}

.breadcrumb a:hover {
  color: #67e8f9;
}

.detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.detail-stats span {
  padding: 8px 12px;
  border-radius: 14px;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.70);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

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

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

.player-card {
  padding: 14px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  background: #000000;
}

.video-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #001018;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.66), rgba(2, 6, 23, 0.16));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #22d3ee, #67e8f9);
  box-shadow: 0 22px 65px rgba(6, 182, 212, 0.38);
  font-size: 30px;
  font-weight: 900;
}

.story-card {
  padding: 26px;
}

.story-card h2,
.side-card h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

.story-card p {
  margin: 0;
  color: #cbd5e1;
  font-size: 17px;
  line-height: 1.95;
}

.detail-side {
  position: sticky;
  top: 96px;
}

.side-card {
  padding: 22px;
}

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

.side-card dl div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.side-card dt {
  color: #94a3b8;
}

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

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

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

.site-footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: #94a3b8;
}

.site-footer strong {
  color: #ffffff;
}

.site-footer p {
  margin: 8px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.footer-links a:hover {
  color: #67e8f9;
}

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

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

  .ranking-panel,
  .detail-side {
    position: static;
  }
}

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

  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .hero {
    min-height: 680px;
  }

  .hero-content {
    top: auto;
    left: 16px;
    right: 16px;
    bottom: 86px;
    width: auto;
    transform: none;
  }

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

  .hero-dots {
    left: 16px;
    bottom: 34px;
  }

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

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

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

  .detail-poster {
    width: min(260px, 100%);
  }

  .category-overview-head,
  .section-heading,
  .site-footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .container-wide,
  .site-header-inner,
  .mobile-nav,
  .site-footer-inner {
    width: min(100% - 24px, 1180px);
  }

  .site-logo span:last-child {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

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

  .search-box {
    flex-direction: column;
  }

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

  .btn {
    width: 100%;
  }

  .page-hero {
    padding: 56px 16px;
  }
}
