:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(30, 41, 59, 0.88);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #06b6d4;
  --accent-dark: #0891b2;
  --orange: #fb923c;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(6, 182, 212, 0.14), transparent 32rem),
    radial-gradient(circle at 80% 8%, rgba(59, 130, 246, 0.12), transparent 30rem),
    linear-gradient(180deg, #0f172a 0%, #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.65;
}

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

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

img.image-hidden {
  visibility: hidden;
}

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(30, 41, 59, 0.9);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

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

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

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  color: white;
  box-shadow: 0 12px 28px rgba(6, 182, 212, 0.35);
}

.brand-text strong,
.footer-brand {
  display: block;
  color: white;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-text small {
  display: block;
  margin-top: -4px;
  color: var(--muted);
  font-size: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.nav-links a {
  color: var(--soft);
  font-weight: 650;
  transition: color 0.2s ease;
}

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

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

.nav-search input,
.big-search input,
.hero-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  outline: none;
  background: rgba(15, 23, 42, 0.88);
  color: white;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input {
  height: 40px;
  padding: 0 14px;
}

.nav-search button,
.big-search button,
.hero-search button,
.primary-button {
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(6, 182, 212, 0.28);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button {
  height: 40px;
  padding: 0 14px;
}

.nav-search input:focus,
.big-search input:focus,
.hero-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(6, 182, 212, 0.8);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.16);
}

.nav-search button:hover,
.big-search button:hover,
.hero-search button:hover,
.primary-button:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(6, 182, 212, 0.35);
}

.menu-button {
  display: none;
  margin-left: auto;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.85);
  color: white;
  padding: 8px 12px;
}

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

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

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

.hero-bg,
.hero-bg img,
.hero-mask,
.hero-vignette {
  position: absolute;
  inset: 0;
}

.hero-bg {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(8, 47, 73, 0.64));
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-mask {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.75) 42%, rgba(0, 0, 0, 0.1) 100%);
}

.hero-vignette {
  background: linear-gradient(0deg, #0f172a 0%, transparent 48%, rgba(2, 6, 23, 0.35) 100%);
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 720px;
  padding-top: 32px;
}

.eyebrow-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.eyebrow,
.card-meta span,
.poster-badge,
.rank-meta span,
.detail-meta span,
.tag-row span,
.section-kicker,
.channel-kicker {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: var(--accent);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.18);
}

.eyebrow {
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 750;
  backdrop-filter: blur(10px);
}

.eyebrow.solid {
  background: var(--accent);
  color: white;
}

.hero h1,
.page-hero h1,
.detail-card h1 {
  margin: 0;
  color: white;
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero h1 {
  font-size: clamp(42px, 7vw, 78px);
}

.hero p {
  max-width: 680px;
  margin: 22px 0 0;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 21px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 26px;
  color: #dbeafe;
  font-weight: 700;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
}

.ghost-button {
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.62);
  color: white;
  font-weight: 800;
  backdrop-filter: blur(14px);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.ghost-button:hover {
  border-color: rgba(6, 182, 212, 0.7);
  color: var(--accent);
  transform: translateY(-1px);
}

.hero-controls {
  position: absolute;
  right: max(20px, calc((100vw - 1280px) / 2));
  bottom: 42px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-controls button {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  color: white;
  cursor: pointer;
  backdrop-filter: blur(14px);
}

.hero-controls > button {
  width: 42px;
  height: 42px;
  font-size: 30px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
}

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

.hero-search {
  position: absolute;
  left: 50%;
  bottom: 42px;
  z-index: 6;
  width: min(640px, calc(100% - 40px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(18px);
}

.hero-search input,
.big-search input {
  min-height: 48px;
  padding: 0 18px;
}

.hero-search button,
.big-search button {
  min-height: 48px;
  padding: 0 24px;
}

.section,
.page-main {
  padding: 56px 0;
}

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

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

.section-kicker,
.channel-kicker {
  width: fit-content;
  margin-bottom: 8px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-head h2,
.side-card h2,
.detail-card h2 {
  margin: 0;
  color: white;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.2;
}

.compact-head h2 {
  font-size: 28px;
}

.section-more {
  color: var(--accent);
  font-weight: 800;
  transition: color 0.2s ease;
}

.section-more:hover {
  color: #67e8f9;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.64);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(6, 182, 212, 0.38);
  background: rgba(30, 41, 59, 0.78);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #082f49);
}

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

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 50%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent);
}

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  padding: 5px 10px;
  color: white;
  background: rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(12px);
}

.card-body {
  padding: 18px;
}

.card-meta,
.rank-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.card-meta span,
.rank-meta span,
.detail-meta span {
  padding: 3px 8px;
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.75);
  border-color: rgba(148, 163, 184, 0.16);
  font-size: 12px;
}

.movie-card h3 {
  margin: 12px 0 8px;
  color: white;
  font-size: 20px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-info h3 a:hover,
.side-reco:hover strong,
.channel-samples a:hover,
.category-overview-card a:hover {
  color: var(--accent);
}

.movie-card p,
.channel-card p,
.category-overview-card p,
.page-hero p,
.detail-card p,
.site-footer p,
.rank-info p {
  color: var(--muted);
}

.movie-card p {
  margin: 0;
  display: -webkit-box;
  min-height: 52px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag-row span {
  padding: 4px 9px;
  font-size: 12px;
}

.movie-card.compact {
  display: grid;
  grid-template-columns: 120px 1fr;
  min-height: 134px;
}

.movie-card.compact .poster-wrap {
  height: 100%;
  aspect-ratio: auto;
}

.movie-card.compact h3 {
  margin-top: 8px;
  font-size: 17px;
}

.movie-card.compact .tag-row,
.movie-card.compact .poster-badge {
  display: none;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
}

.panel,
.detail-card,
.side-card,
.filter-panel,
.category-overview-card,
.channel-card a,
.rank-page-list,
.player-shell {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.58);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.panel {
  padding: 26px;
}

.rank-list,
.rank-page-list {
  display: grid;
  gap: 14px;
}

.rank-page-list {
  padding: 18px;
}

.rank-row {
  display: grid;
  grid-template-columns: 54px 120px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.32);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
  border-color: rgba(6, 182, 212, 0.28);
  background: rgba(15, 23, 42, 0.82);
}

.rank-num {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  color: white;
  font-size: 20px;
  font-weight: 900;
}

.rank-poster {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, #0f172a, #082f49);
}

.rank-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-info h3 {
  margin: 0 0 6px;
  color: white;
  font-size: 18px;
}

.rank-info p {
  margin: 0 0 8px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.channel-card a,
.category-overview-card {
  display: block;
  height: 100%;
  padding: 24px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.channel-card a:hover,
.category-overview-card:hover {
  transform: translateY(-3px);
  border-color: rgba(6, 182, 212, 0.36);
  background: rgba(30, 41, 59, 0.74);
}

.channel-card h3,
.category-overview-card span {
  margin: 0 0 10px;
  color: white;
  font-size: 22px;
  font-weight: 850;
}

.channel-samples {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.channel-samples a {
  color: #cbd5e1;
  font-size: 14px;
}

.page-hero {
  padding: 54px 0 20px;
}

.page-hero h1 {
  font-size: clamp(42px, 6vw, 66px);
}

.page-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  font-size: 18px;
}

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

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

.filter-panel {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 26px;
  padding: 18px;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--soft);
  font-weight: 700;
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  padding: 0 14px;
}

.big-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  max-width: 720px;
  margin-top: 28px;
}

.category-overview-card ul {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.category-main-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.category-main-link strong {
  color: var(--accent);
  font-size: 14px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  background: black;
  aspect-ratio: 16 / 9;
}

.movie-video,
.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-video {
  background: black;
}

.player-cover {
  z-index: 3;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: linear-gradient(135deg, #020617, #0f172a);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.08));
}

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

.play-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 34px;
  box-shadow: 0 22px 50px rgba(6, 182, 212, 0.35);
}

.detail-card {
  margin-top: 24px;
  padding: 28px;
}

.detail-card h1 {
  margin-bottom: 18px;
  font-size: clamp(34px, 5vw, 54px);
}

.detail-card h2 {
  margin-top: 28px;
  margin-bottom: 10px;
  font-size: 22px;
}

.detail-card p {
  margin: 0;
  white-space: pre-line;
}

.lead-text {
  color: #67e8f9 !important;
  font-size: 19px;
}

.detail-tags {
  margin-top: 28px;
}

.detail-side {
  position: relative;
}

.side-card {
  position: sticky;
  top: 96px;
  padding: 20px;
}

.side-card h2 {
  margin-bottom: 18px;
  font-size: 24px;
}

.side-reco {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.side-reco:hover {
  background: rgba(51, 65, 85, 0.42);
}

.side-reco img {
  width: 92px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(135deg, #0f172a, #082f49);
}

.side-reco strong,
.side-reco em {
  display: block;
}

.side-reco strong {
  color: white;
  line-height: 1.35;
}

.side-reco em {
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

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

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0;
}

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

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

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

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

.is-filtered-out {
  display: none !important;
}

.empty-result {
  grid-column: 1 / -1;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.58);
  color: var(--muted);
  text-align: center;
}

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

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

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

  .side-card {
    position: static;
  }
}

@media (max-width: 820px) {
  .header-inner {
    height: auto;
    min-height: 68px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .menu-button {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    width: 100%;
    order: 5;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 0;
  }

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

  .hero {
    height: auto;
    min-height: 620px;
  }

  .hero-copy {
    padding: 86px 0 150px;
  }

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

  .hero-controls {
    left: 20px;
    right: auto;
    bottom: 118px;
  }

  .movie-grid,
  .featured-grid,
  .mini-grid,
  .channel-grid,
  .category-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .rank-row {
    grid-template-columns: 46px 96px 1fr;
    gap: 12px;
  }

  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .container,
  .header-inner {
    width: min(100% - 22px, 1280px);
  }

  .brand-text small {
    display: none;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero p {
    font-size: 16px;
  }

  .movie-grid,
  .featured-grid,
  .mini-grid,
  .channel-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .movie-card.compact {
    grid-template-columns: 108px 1fr;
  }

  .section,
  .page-main {
    padding: 36px 0;
  }

  .section-head,
  .big-search {
    align-items: flex-start;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .rank-row {
    grid-template-columns: 42px 1fr;
  }

  .rank-poster {
    display: none;
  }

  .detail-card,
  .panel,
  .side-card {
    padding: 18px;
  }
}
