:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-2: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --blue: #3b82f6;
  --blue-2: #60a5fa;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --shadow: 0 28px 90px rgba(15, 23, 42, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.22), transparent 38rem),
    radial-gradient(circle at 80% 10%, rgba(244, 114, 182, 0.13), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

img,
video {
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

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

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

.top-nav {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand {
  font-size: 22px;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 34px rgba(59, 130, 246, 0.35);
  font-size: 14px;
}

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

.nav-link,
.mobile-link {
  color: var(--soft);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover {
  color: white;
  background: rgba(59, 130, 246, 0.16);
}

.header-search,
.mobile-search,
.big-search,
.search-page-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search {
  width: 320px;
}

.header-search input,
.mobile-search input,
.big-search input,
.search-page-form input,
.filter-grid input,
.filter-grid select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.86);
  color: white;
  outline: none;
  padding: 12px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.big-search input:focus,
.search-page-form input:focus,
.filter-grid input:focus,
.filter-grid select:focus {
  border-color: rgba(96, 165, 250, 0.78);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
  background: rgba(15, 23, 42, 0.98);
}

.header-search button,
.mobile-search button,
.big-search button,
.search-page-form button,
.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: 999px;
  color: white;
  padding: 12px 18px;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button,
.big-search button,
.search-page-form button,
.primary-btn {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.25);
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.48);
}

.header-search button:hover,
.mobile-search button:hover,
.big-search button:hover,
.search-page-form button:hover,
.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.35);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.92);
  padding: 9px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 99px;
  background: white;
}

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

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

.mobile-link {
  display: block;
  padding: 12px 14px;
}

.mobile-search {
  margin-top: 10px;
}

.quick-strip {
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  background: rgba(15, 23, 42, 0.4);
}

.quick-strip-inner {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 18px;
  overflow-x: auto;
  color: var(--muted);
  font-size: 14px;
}

.quick-strip-inner span {
  color: #dbeafe;
  white-space: nowrap;
}

.quick-strip-inner a {
  color: var(--soft);
  white-space: nowrap;
}

.quick-strip-inner a:hover {
  color: white;
}

.hero-carousel {
  position: relative;
  min-height: 74vh;
  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 {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.15) contrast(1.06);
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.82) 38%, rgba(2, 6, 23, 0.4) 70%, rgba(2, 6, 23, 0.86) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 1), transparent 48%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 74vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 360px;
  align-items: center;
  gap: 56px;
  padding: 80px 0;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 16px 0 18px;
  max-width: 760px;
  font-size: clamp(42px, 8vw, 92px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 680px;
  color: #dbeafe;
  font-size: clamp(17px, 2.2vw, 23px);
  line-height: 1.75;
}

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

.hero-tags,
.detail-tags,
.tag-row,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-tags {
  margin: 22px 0 28px;
}

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

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

.hero-poster {
  display: block;
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: inherit;
  z-index: 2;
}

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

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

.hero-dot {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dot.is-active {
  background: white;
}

.home-search-panel,
.page-hero,
.filter-panel,
.panel-card,
.detail-card,
.category-overview-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.66));
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.22);
}

.home-search-panel {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 32px;
  align-items: center;
  margin-top: -42px;
  position: relative;
  z-index: 6;
  padding: 30px;
}

.home-search-panel h2,
.section-head h2,
.ranking-panel h2,
.category-overview-card h2,
.detail-content h1,
.page-hero h1 {
  margin: 8px 0 10px;
}

.home-search-panel p,
.section-head p,
.category-overview-card p,
.page-hero p,
.detail-card p,
.lead-text {
  color: var(--soft);
  line-height: 1.8;
}

.section-block,
.split-section,
.category-overview-grid {
  margin-top: 64px;
}

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

.section-head h2,
.ranking-panel h2 {
  font-size: clamp(26px, 4vw, 42px);
}

.section-link {
  color: var(--blue-2);
  font-weight: 700;
}

.section-link:hover {
  color: white;
}

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

.category-card,
.category-overview-card {
  padding: 22px;
}

.category-card {
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), rgba(15, 23, 42, 0.8));
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.category-overview-card:hover,
.movie-card:hover,
.mini-card:hover {
  transform: translateY(-4px);
  border-color: rgba(96, 165, 250, 0.45);
}

.category-title {
  display: inline-block;
  color: white;
  font-size: 21px;
  font-weight: 800;
  margin-bottom: 10px;
}

.category-card p,
.category-overview-card p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.7;
}

.category-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-card div a {
  color: #bfdbfe;
  font-size: 13px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.34);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.86);
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

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

.play-pill {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  min-height: 38px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.92);
  color: white;
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.rank-num {
  position: absolute;
  top: 10px;
  left: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f97316, #facc15);
  color: #111827;
  font-size: 15px;
}

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

.movie-card h2 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

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

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

.card-meta span,
.tag-row span {
  padding: 5px 8px;
  font-size: 12px;
}

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

.panel-card {
  padding: 24px;
}

.compact-head {
  margin-bottom: 18px;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.34);
  padding: 8px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.mini-card strong {
  display: block;
  margin-bottom: 6px;
  color: white;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.full-btn {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.8fr;
  gap: 36px;
  padding: 42px 0;
}

.footer-grid p,
.footer-links a {
  color: var(--muted);
  line-height: 1.8;
}

.footer-grid h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

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

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  color: var(--muted);
  text-align: center;
  padding: 18px;
}

.page-main {
  padding-top: 36px;
}

.page-hero {
  padding: clamp(30px, 6vw, 58px);
}

.page-hero h1 {
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
}

.soft-hero,
.category-hero,
.search-hero {
  position: relative;
  overflow: hidden;
}

.soft-hero::after,
.category-hero::after,
.search-hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -45% 45%;
  height: 260px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.22), transparent 70%);
  pointer-events: none;
}

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

.breadcrumb a:hover {
  color: white;
}

.filter-panel {
  margin-top: 24px;
  padding: 22px;
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr 190px 190px;
  gap: 18px;
}

.filter-grid label span {
  display: block;
  margin-bottom: 8px;
  color: var(--soft);
  font-size: 14px;
}

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

.category-overview-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.detail-shell {
  display: grid;
  gap: 24px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
}

.player-frame video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: white;
  text-align: center;
  padding: 24px;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.28), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  z-index: 3;
}

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

.big-play {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 40px rgba(59, 130, 246, 0.38);
}

.player-overlay strong {
  display: block;
  font-size: clamp(24px, 5vw, 48px);
}

.player-overlay em {
  max-width: 680px;
  color: #dbeafe;
  font-style: normal;
  line-height: 1.8;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 26px;
}

.detail-content,
.detail-side {
  min-width: 0;
}

.detail-content h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
}

.lead-text {
  font-size: 18px;
}

.detail-tags {
  margin: 24px 0;
}

.detail-tags a:hover {
  color: white;
  background: rgba(59, 130, 246, 0.32);
}

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

.detail-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.detail-side {
  position: sticky;
  top: 118px;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
  padding: 16px;
}

.detail-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 18px;
}

.detail-side dl {
  margin: 16px 0 0;
}

.detail-side div {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.detail-side div:last-child {
  border-bottom: 0;
}

.detail-side dt {
  color: var(--muted);
}

.detail-side dd {
  margin: 0;
  color: white;
}

.search-page-form {
  max-width: 760px;
  margin-top: 24px;
}

.empty-state {
  margin: 30px 0;
  color: var(--muted);
  text-align: center;
}

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

@media (max-width: 1120px) {
  .movie-grid,
  .home-grid,
  .compact-grid,
  .ranking-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

@media (max-width: 900px) {
  .desktop-nav,
  .header-search,
  .quick-strip {
    display: none;
  }

  .top-nav {
    justify-content: space-between;
  }

  .menu-toggle {
    display: block;
  }

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

  .hero-content {
    padding: 90px 0 110px;
  }

  .hero-poster {
    max-width: 280px;
    transform: rotate(0deg);
  }

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

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

  .detail-side {
    position: static;
  }
}

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

  .brand {
    font-size: 18px;
  }

  .hero-carousel,
  .hero-content {
    min-height: 78vh;
  }

  .hero-copy h1,
  .hero-copy h2 {
    font-size: clamp(38px, 16vw, 64px);
  }

  .hero-poster {
    display: none;
  }

  .home-search-panel,
  .page-hero,
  .filter-panel,
  .panel-card,
  .detail-card,
  .category-overview-card {
    border-radius: 22px;
  }

  .big-search,
  .search-page-form,
  .mobile-search {
    align-items: stretch;
    flex-direction: column;
  }

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

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

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

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

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

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