:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --card: rgba(15, 23, 42, 0.78);
  --card-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --blue: #38bdf8;
  --blue-deep: #2563eb;
  --cyan: #22d3ee;
  --purple: #a78bfa;
  --green: #34d399;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.28), transparent 32rem),
    radial-gradient(circle at 90% 10%, rgba(34, 211, 238, 0.16), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
}

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

img {
  display: block;
  width: 100%;
  object-fit: cover;
}

button,
input {
  font: inherit;
}

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

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.03em;
  font-size: 22px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue-deep), var(--cyan));
  box-shadow: 0 10px 35px rgba(56, 189, 248, 0.38);
  font-size: 14px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  color: #cbd5e1;
  font-weight: 700;
  font-size: 15px;
}

.desktop-nav a,
.mobile-panel a,
.site-footer a {
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.site-footer a:hover {
  color: var(--blue);
}

.nav-search {
  width: 260px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.82);
  border-radius: 999px;
}

.nav-search input,
.mobile-search input,
.hero-search input,
.big-search input,
.filter-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.nav-search input::placeholder,
.mobile-search input::placeholder,
.hero-search input::placeholder,
.big-search input::placeholder,
.filter-search input::placeholder {
  color: #64748b;
}

.nav-search button,
.mobile-search button,
.hero-search button,
.big-search button {
  border: 0;
  cursor: pointer;
  color: #fff;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue-deep), var(--blue));
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #fff;
  background: rgba(15, 23, 42, 0.84);
}

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

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

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.mobile-panel a {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.72);
  color: #cbd5e1;
}

.mobile-search {
  display: flex;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
}

.hero-carousel {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.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 {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(12px) saturate(1.2);
  transform: scale(1.08);
  opacity: 0.36;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.66) 48%, rgba(2, 6, 23, 0.92) 100%),
    radial-gradient(circle at 70% 40%, rgba(56, 189, 248, 0.20), transparent 24rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  min-height: 640px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 70px;
  padding: 76px 0 132px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
}

.hero-copy h1,
.page-hero h1 {
  margin: 16px 0;
  font-size: clamp(44px, 7vw, 86px);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.hero-copy p,
.page-hero p {
  margin: 0;
  color: #cbd5e1;
  font-size: 19px;
  line-height: 1.8;
  max-width: 720px;
}

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

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

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

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  border-radius: 999px;
  padding: 0 24px;
  font-weight: 900;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-btn {
  color: white;
  background: linear-gradient(135deg, var(--blue-deep), var(--blue));
  box-shadow: 0 18px 46px rgba(37, 99, 235, 0.38);
}

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover,
.category-tile:hover {
  transform: translateY(-4px);
}

.primary-btn.full {
  width: 100%;
  margin-top: 18px;
}

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

.hero-poster {
  position: relative;
  border-radius: 34px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  box-shadow: var(--shadow), 0 0 0 1px rgba(148, 163, 184, 0.18);
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.42));
}

.hero-poster img {
  height: 100%;
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 32px;
  width: min(1240px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.hero-dots button {
  flex: 0 0 auto;
  border: 1px solid rgba(148, 163, 184, 0.26);
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 800;
}

.hero-dots button.is-active {
  color: #fff;
  border-color: rgba(56, 189, 248, 0.6);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(34, 211, 238, 0.76));
}

.hero-search {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%);
  width: min(720px, calc(100% - 32px));
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(18px);
}

.hero-search input {
  padding: 0 14px;
}

.section-block {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0;
}

.section-overlap {
  margin-top: -24px;
  position: relative;
  z-index: 6;
}

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

.section-heading.compact {
  align-items: center;
}

.section-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.04em;
}

.section-heading a {
  color: var(--blue);
  font-weight: 900;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 26px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.20);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
}

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

.poster-wrap img {
  height: 100%;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.movie-card:hover .poster-wrap img,
.category-tile:hover img,
.mini-card:hover img {
  transform: scale(1.06);
  opacity: 0.86;
}

.card-play,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue-deep), var(--cyan));
}

.card-play {
  right: 12px;
  bottom: 12px;
  padding: 7px 11px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  top: 12px;
  left: 12px;
  padding: 8px 12px;
}

.card-body {
  padding: 16px;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

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

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

.movie-card p {
  margin: 10px 0 14px;
  color: var(--muted);
  line-height: 1.62;
  font-size: 14px;
}

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

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: 26px;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile img {
  position: absolute;
  inset: 0;
  height: 100%;
  opacity: 0.36;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(2, 6, 23, 0.88) 78%);
}

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 2;
}

.category-tile span {
  font-size: 22px;
  font-weight: 950;
}

.category-tile p {
  margin: 8px 0 0;
  color: #cbd5e1;
  line-height: 1.55;
  font-size: 14px;
}

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

.ranking-panel,
.ranking-list-section,
.filter-panel,
.search-panel,
.detail-text {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.ranking-panel {
  padding: 22px;
  position: sticky;
  top: 94px;
}

.mini-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.mini-card:hover {
  background: rgba(30, 41, 59, 0.76);
  border-color: rgba(56, 189, 248, 0.26);
  transform: translateX(4px);
}

.mini-card img {
  width: 64px;
  height: 88px;
  border-radius: 14px;
}

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

.mini-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-card > span {
  color: var(--cyan);
  font-weight: 950;
}

.page-hero {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 90px 0 44px;
}

.simple-hero,
.category-hero,
.ranking-hero,
.search-hero {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  margin-top: 22px;
  font-weight: 700;
}

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

.filter-panel {
  padding: 22px;
}

.filter-search {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: 18px;
  background: rgba(2, 6, 23, 0.58);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.filter-group b {
  color: #dbeafe;
  margin-right: 4px;
}

.filter-group button,
.search-chips button {
  border: 1px solid var(--line);
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.76);
  border-radius: 999px;
  padding: 8px 13px;
  cursor: pointer;
  font-weight: 800;
}

.filter-group button.is-active,
.search-chips button:hover {
  color: #fff;
  border-color: rgba(56, 189, 248, 0.55);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.92), rgba(14, 165, 233, 0.76));
}

.detail-layout {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 20px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
  border: 1px solid rgba(148, 163, 184, 0.18);
  aspect-ratio: 16 / 9;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.56));
  cursor: pointer;
  z-index: 4;
}

.play-overlay span {
  width: 92px;
  height: 92px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--blue-deep), var(--cyan));
  box-shadow: 0 18px 50px rgba(56, 189, 248, 0.36);
  padding-left: 6px;
  font-size: 34px;
}

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

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 5;
  display: none;
  color: white;
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.88);
}

.player-message.is-visible {
  display: block;
}

.detail-info {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--card);
  padding: 20px;
  position: sticky;
  top: 94px;
}

.detail-poster {
  border-radius: 22px;
  aspect-ratio: 2 / 3;
  margin-bottom: 18px;
}

.detail-info h1 {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.detail-one-line {
  color: #cbd5e1;
  line-height: 1.7;
}

.detail-text {
  padding: 34px;
}

.detail-text h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.detail-text h2:not(:first-child) {
  margin-top: 30px;
}

.detail-text p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
  font-size: 17px;
}

.big-search {
  display: flex;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.64);
  border-radius: 999px;
}

.big-search input {
  padding: 0 16px;
  font-size: 18px;
}

.search-panel {
  padding: 24px;
}

.search-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 22px;
}

.search-status {
  color: #cbd5e1;
  margin-bottom: 18px;
  font-weight: 700;
}

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

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

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

.site-footer p {
  color: var(--muted);
  line-height: 1.75;
  max-width: 560px;
}

.site-footer h2 {
  font-size: 16px;
  margin: 0 0 14px;
}

.site-footer a {
  display: block;
  color: #94a3b8;
  margin: 8px 0;
}

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 34px;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

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

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

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

  .menu-toggle {
    display: block;
  }

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

  .hero-content {
    gap: 34px;
    padding-top: 56px;
  }

  .hero-poster {
    max-width: 340px;
  }

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

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

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

  .brand {
    font-size: 19px;
  }

  .hero-carousel {
    min-height: 760px;
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: start;
    min-height: 630px;
    padding-bottom: 160px;
  }

  .hero-poster {
    width: 190px;
    border-radius: 24px;
  }

  .hero-copy h1,
  .page-hero h1 {
    font-size: 42px;
  }

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

  .hero-search {
    bottom: 96px;
  }

  .hero-dots {
    bottom: 24px;
  }

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

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

  .home-grid,
  .latest-grid,
  .preview-grid,
  .related-grid,
  .search-results,
  .category-movie-grid,
  .category-grid,
  .category-grid.large,
  .featured-rank-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .card-body {
    padding: 13px;
  }

  .movie-card h3 {
    font-size: 16px;
  }

  .movie-card p {
    font-size: 13px;
  }

  .detail-text {
    padding: 22px;
  }

  .detail-info h1 {
    font-size: 25px;
  }

  .player-shell {
    border-radius: 22px;
  }

  .big-search,
  .hero-search {
    border-radius: 24px;
    align-items: stretch;
    flex-direction: column;
  }

  .big-search input,
  .hero-search input {
    min-height: 44px;
  }
}

@media (max-width: 460px) {
  .home-grid,
  .latest-grid,
  .preview-grid,
  .related-grid,
  .search-results,
  .category-movie-grid,
  .category-grid,
  .category-grid.large,
  .featured-rank-grid {
    grid-template-columns: 1fr;
  }

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