:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(59, 130, 246, 0.26);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --blue: #2563eb;
  --blue-light: #38bdf8;
  --cyan: #22d3ee;
  --orange: #f97316;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 5%, rgba(37, 99, 235, 0.22), transparent 30%),
    radial-gradient(circle at 85% 12%, rgba(34, 211, 238, 0.13), transparent 25%),
    linear-gradient(135deg, #020617 0%, #0f172a 42%, #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%;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 14px 45px rgba(2, 6, 23, 0.38);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.32);
}

.brand-text {
  font-size: 24px;
  background: linear-gradient(90deg, #60a5fa, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.nav-link,
.mobile-link {
  padding: 9px 13px;
  border-radius: 12px;
  color: var(--soft);
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #fff;
  background: rgba(37, 99, 235, 0.35);
}

.nav-search {
  display: flex;
  align-items: center;
  width: 260px;
  background: rgba(15, 23, 42, 0.64);
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 14px;
  overflow: hidden;
}

.nav-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  font: inherit;
}

.nav-search input {
  padding: 10px 10px 10px 14px;
}

.nav-search button,
.mobile-search button {
  border: 0;
  color: #fff;
  background: var(--blue);
  cursor: pointer;
  padding: 10px 13px;
  font: inherit;
}

.menu-toggle {
  display: none;
  border: 0;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  border-radius: 12px;
  padding: 8px 11px;
  font-size: 20px;
}

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

.mobile-search {
  display: flex;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.8);
}

.mobile-search input {
  padding: 11px 14px;
}

.mobile-nav {
  display: grid;
  gap: 6px;
}

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

.hero-track,
.hero-slide {
  min-height: 680px;
}

.hero-slide {
  position: relative;
  display: none;
  isolation: isolate;
  background-image:
    linear-gradient(90deg, rgba(2, 6, 23, 0.9) 0%, rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.18) 100%),
    var(--hero-bg);
  background-position: center;
  background-size: cover;
}

.hero-slide.active {
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 35%, rgba(2, 6, 23, 0.44) 100%),
    radial-gradient(circle at 75% 25%, rgba(37, 99, 235, 0.26), transparent 36%);
}

.hero-content {
  width: min(1180px, calc(100% - 32px));
  min-height: 680px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) 390px;
  gap: 46px;
  align-items: center;
  padding: 78px 0 92px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.82);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero h1,
.hero h2,
.page-hero h1 {
  margin: 18px 0 0;
  line-height: 1.08;
}

.hero h1,
.hero h2 {
  font-size: clamp(34px, 6vw, 66px);
  font-weight: 900;
}

.hero-title {
  display: block;
  margin: 8px 0 18px;
  font-size: clamp(28px, 4vw, 48px);
  color: #bfdbfe;
}

.hero-copy p,
.page-hero p {
  max-width: 760px;
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: 18px;
}

.hero-tags,
.detail-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-tags span,
.detail-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #dbeafe;
  padding: 6px 10px;
  font-size: 13px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.34);
}

.ghost-btn {
  border: 1px solid rgba(191, 219, 254, 0.28);
  color: #fff;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(12px);
}

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover,
.category-card:hover,
.category-panel:hover,
.mini-card:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.34);
  border-radius: 34px;
  background: rgba(15, 23, 42, 0.48);
  box-shadow: var(--shadow);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.82);
  color: #fff;
  font-size: 28px;
  transform: translate(-50%, -50%);
  box-shadow: 0 20px 50px rgba(37, 99, 235, 0.4);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(2, 6, 23, 0.62);
  cursor: pointer;
  font-size: 32px;
  transform: translateY(-50%);
  transition: background 0.18s ease;
}

.hero-arrow:hover {
  background: rgba(37, 99, 235, 0.82);
}

.hero-arrow.prev {
  left: 22px;
}

.hero-arrow.next {
  right: 22px;
}

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

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

.hero-dot.active {
  width: 46px;
  background: #fff;
}

.section-block {
  padding: 52px 0;
}

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

.section-head h2,
.rank-panel h2,
.content-card h2,
.category-panel h2,
.site-footer h2 {
  margin: 0;
  color: #fff;
}

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

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

.section-head a,
.rank-panel-head a {
  color: #60a5fa;
  font-weight: 800;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.64);
  box-shadow: 0 14px 34px rgba(2, 6, 23, 0.22);
  transition: 0.2s ease;
}

.movie-card:hover {
  border-color: rgba(56, 189, 248, 0.68);
  box-shadow: 0 20px 52px rgba(37, 99, 235, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 34%, rgba(2, 6, 23, 0.88) 100%);
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.86);
  color: #fff;
  font-size: 22px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition: 0.18s ease;
}

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

.movie-card-body {
  padding: 16px;
}

.movie-title {
  display: -webkit-box;
  min-height: 58px;
  margin-bottom: 10px;
  overflow: hidden;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-title:hover {
  color: var(--blue-light);
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.movie-card p {
  display: -webkit-box;
  min-height: 45px;
  margin: 0 0 12px;
  overflow: hidden;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

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

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

.category-card,
.category-panel,
.rank-panel,
.content-card,
.filter-panel,
.page-hero {
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 14px 35px rgba(2, 6, 23, 0.18);
}

.category-card,
.category-panel {
  padding: 22px;
  transition: 0.2s ease;
}

.category-card span,
.category-title {
  display: inline-flex;
  margin-bottom: 8px;
  color: #fff;
  font-size: 19px;
  font-weight: 900;
}

.category-card p,
.category-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.rank-panel {
  padding: 24px;
}

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

.mini-list {
  display: grid;
  gap: 12px;
}

.mini-card {
  position: relative;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.52);
  transition: 0.2s ease;
}

.mini-card img {
  width: 84px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
}

.mini-card strong,
.mini-card em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-card strong {
  color: #fff;
}

.mini-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.page-main {
  padding: 34px 0 70px;
}

.page-hero {
  margin-bottom: 26px;
  padding: 34px;
  background:
    radial-gradient(circle at 82% 18%, rgba(56, 189, 248, 0.22), transparent 30%),
    rgba(15, 23, 42, 0.72);
}

.small-hero h1 {
  margin-bottom: 12px;
  font-size: clamp(30px, 4vw, 48px);
}

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

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

.filter-panel {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) 170px 170px;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px;
}

.filter-panel label {
  color: #fff;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 13px;
  background: rgba(2, 6, 23, 0.34);
}

.filter-panel option {
  background: #0f172a;
  color: #fff;
}

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

.movie-card.compact {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
}

.movie-card.compact .poster-link {
  aspect-ratio: auto;
  min-height: 190px;
}

.movie-card.compact .movie-title {
  min-height: auto;
}

.rank-badge {
  position: absolute;
  z-index: 2;
  left: 10px;
  top: 10px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  font-weight: 900;
}

.empty-state {
  margin-top: 26px;
  padding: 50px;
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.66);
  color: var(--muted);
  text-align: center;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) 420px;
  gap: 28px;
  align-items: stretch;
}

.player-card {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

.movie-video,
.player-overlay,
.player-overlay img {
  width: 100%;
  height: 100%;
}

.movie-video {
  position: absolute;
  inset: 0;
  object-fit: contain;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: rgba(2, 6, 23, 0.38);
}

.player-overlay img {
  position: absolute;
  inset: 0;
  object-fit: cover;
  opacity: 0.54;
}

.player-overlay:after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.18), rgba(2, 6, 23, 0.72));
}

.player-overlay.hidden {
  display: none;
}

.big-play {
  position: relative;
  z-index: 4;
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  cursor: pointer;
  font-size: 34px;
  box-shadow: 0 26px 60px rgba(37, 99, 235, 0.38);
}

.detail-info {
  padding: 28px;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.68);
}

.detail-info h1 {
  margin: 18px 0 16px;
  color: #fff;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
}

.lead-text {
  color: #dbeafe;
  font-size: 17px;
}

.detail-btn {
  margin-top: 24px;
}

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

.content-card p {
  margin: 14px 0 0;
  color: #d1d5db;
  text-align: justify;
  white-space: pre-line;
}

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

.site-footer {
  border-top: 1px solid rgba(96, 165, 250, 0.15);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.35), rgba(2, 6, 23, 0.95));
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  color: #fff;
  font-size: 22px;
}

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

.site-footer a {
  display: block;
  margin-top: 8px;
  transition: color 0.18s ease;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 14px;
}

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

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

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

  .hero-poster {
    min-height: 420px;
  }

  .hero-poster img {
    min-height: 420px;
  }

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

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

@media (max-width: 760px) {
  .nav-wrap {
    height: 62px;
  }

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

  .hero,
  .hero-track,
  .hero-slide,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 54px 0 86px;
  }

  .hero-poster {
    min-height: 360px;
  }

  .hero-poster img {
    min-height: 360px;
  }

  .hero-arrow {
    top: auto;
    bottom: 24px;
  }

  .hero-arrow.prev {
    left: 18px;
  }

  .hero-arrow.next {
    right: 18px;
  }

  .hero-dots {
    bottom: 40px;
  }

  .section-head {
    display: block;
  }

  .section-head a {
    display: inline-flex;
    margin-top: 8px;
  }

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

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

  .movie-card.compact .poster-link {
    min-height: 0;
    aspect-ratio: 3 / 4;
  }

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

  .player-card {
    min-height: 280px;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .category-grid,
  .category-panels,
  .ranking-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .detail-info,
  .content-card,
  .rank-panel {
    padding: 22px;
  }
}
