:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.76);
  --panel-strong: rgba(15, 23, 42, 0.95);
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --brand: #38bdf8;
  --brand-strong: #0ea5e9;
  --brand-soft: rgba(56, 189, 248, 0.16);
  --radius-lg: 28px;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.46);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.18), transparent 34rem),
    linear-gradient(135deg, #020617 0%, #0f172a 45%, #020617 100%);
  color: var(--text);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(148, 163, 184, 0.14);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.35);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  box-shadow: 0 10px 30px rgba(14, 165, 233, 0.32);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

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

.main-nav,
.mobile-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  color: #dbeafe;
  font-size: 15px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--brand);
}

.nav-link-soft {
  color: #94a3b8;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-search {
  position: relative;
  display: flex;
  width: 260px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
}

.mini-search input {
  width: 100%;
  height: 42px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 0 48px 0 18px;
}

.mini-search button {
  position: absolute;
  right: 4px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  color: white;
  cursor: pointer;
  background: rgba(14, 165, 233, 0.88);
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: none;
  width: 340px;
  max-height: 420px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
}

.search-suggestions.is-open {
  display: grid;
  gap: 6px;
}

.suggest-item {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--soft);
}

.suggest-item:hover {
  background: rgba(30, 41, 59, 0.88);
}

.suggest-item strong {
  color: white;
  font-size: 14px;
}

.suggest-item span {
  color: var(--muted);
  font-size: 12px;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 13px;
  color: white;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.72);
}

.mobile-panel {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

main {
  min-height: 72vh;
}

.hero {
  position: relative;
  padding-top: 92px;
}

.hero-stage {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 0 0 36px 36px;
  background: #020617;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 46px;
  align-items: center;
  padding: 70px;
  opacity: 0;
  visibility: hidden;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  transition: opacity 0.6s ease, visibility 0.6s ease, transform 0.8s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-content {
  max-width: 720px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--brand);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero h1,
.page-hero h1,
.detail-header h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 70px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-header p {
  margin: 20px 0 0;
  color: #d1d5db;
  font-size: 18px;
  line-height: 1.8;
}

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: #e2e8f0;
  font-size: 12px;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(12px);
}

.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 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
  color: white;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  box-shadow: 0 15px 40px rgba(14, 165, 233, 0.28);
}

.btn-ghost {
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: white;
  background: rgba(15, 23, 42, 0.54);
  backdrop-filter: blur(10px);
}

.hero-poster {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.48);
}

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

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

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(148, 163, 184, 0.38);
}

.hero-dot.is-active {
  background: var(--brand);
}

.content-section,
.page-hero,
.detail-layout {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.content-section {
  padding: 58px 0;
}

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

.section-heading h2,
.panel-title h2,
.footer-links h2,
.detail-section h2,
.side-panel h2,
.side-poster-card h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-more,
.panel-title a {
  color: var(--brand);
  font-weight: 800;
}

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

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

.movie-rail {
  display: grid;
  grid-auto-columns: 250px;
  grid-auto-flow: column;
  gap: 20px;
  overflow-x: auto;
  padding: 2px 4px 18px;
  scroll-snap-type: x mandatory;
}

.movie-rail .movie-card {
  scroll-snap-align: start;
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 16px 50px rgba(2, 6, 23, 0.25);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.42);
  background: rgba(15, 23, 42, 0.94);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.86);
}

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

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

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

.poster-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  background: rgba(14, 165, 233, 0.86);
  backdrop-filter: blur(10px);
}

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

.movie-meta-line {
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.movie-meta-line a {
  color: var(--brand);
  font-weight: 800;
}

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

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

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

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.3);
}

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  opacity: 0.56;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-card:hover img {
  transform: scale(1.06);
  opacity: 0.74;
}

.category-card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.14));
}

.category-card strong,
.category-card em {
  position: absolute;
  left: 18px;
  right: 18px;
}

.category-card strong {
  bottom: 72px;
  font-size: 21px;
}

.category-card em {
  bottom: 18px;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.5;
  font-style: normal;
}

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

.ranking-panel,
.side-panel,
.side-poster-card,
.detail-section,
.player-card,
.filter-bar,
.category-overview-card {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.24);
}

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

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

.ranking-list {
  display: grid;
  gap: 10px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: auto 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.28);
  transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-row:hover {
  transform: translateX(3px);
  background: rgba(30, 41, 59, 0.82);
}

.rank-num {
  min-width: 30px;
  color: var(--brand);
  font-weight: 900;
}

.ranking-row img {
  width: 54px;
  height: 76px;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(30, 41, 59, 0.86);
}

.ranking-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.ranking-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-copy em {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.page-hero {
  min-height: 300px;
  display: flex;
  align-items: center;
  padding: 56px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 0 0 34px 34px;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.22), transparent 34rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.76));
  box-shadow: var(--shadow);
}

.page-hero > div {
  max-width: 820px;
}

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

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

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

.category-overview-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
}

.category-overview-cover {
  overflow: hidden;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.86);
}

.category-overview-cover img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.category-overview-card h2 {
  margin: 6px 0 10px;
  font-size: 24px;
}

.category-overview-card p {
  color: var(--muted);
  line-height: 1.7;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.category-samples a {
  padding: 7px 10px;
  border-radius: 999px;
  color: #dbeafe;
  font-size: 12px;
  background: rgba(30, 41, 59, 0.8);
}

.filter-section {
  padding-top: 36px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.5fr) minmax(180px, 0.5fr);
  gap: 16px;
  margin-bottom: 26px;
  padding: 18px;
}

.filter-bar label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.filter-bar input,
.filter-bar select,
.search-page-form input {
  width: 100%;
  height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  outline: 0;
  color: white;
  background: rgba(2, 6, 23, 0.42);
  padding: 0 14px;
}

.empty-state {
  display: none;
  margin: 30px 0 0;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(148, 163, 184, 0.24);
  border-radius: 20px;
}

.empty-state.is-visible {
  display: block;
}

.search-page-form {
  display: flex;
  gap: 12px;
  max-width: 640px;
  margin-top: 28px;
}

.search-result-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
}

.search-result-card img {
  width: 96px;
  height: 136px;
  border-radius: 13px;
  object-fit: cover;
  background: rgba(30, 41, 59, 0.86);
}

.search-result-card h3 {
  margin: 4px 0 8px;
  font-size: 20px;
}

.search-result-card p {
  color: var(--muted);
  line-height: 1.7;
}

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

.detail-header {
  margin-bottom: 24px;
  padding: 26px 0 4px;
}

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

.player-card {
  padding: 16px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: white;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.36), rgba(2, 6, 23, 0.82));
}

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

.play-icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  color: white;
  font-size: 30px;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  box-shadow: 0 18px 46px rgba(14, 165, 233, 0.36);
}

.player-cover strong {
  font-size: 22px;
}

.player-cover em {
  color: #cbd5e1;
  font-style: normal;
}

.detail-section {
  margin-top: 24px;
  padding: 26px;
}

.detail-section p {
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.9;
}

.detail-sidebar {
  position: sticky;
  top: 98px;
  display: grid;
  gap: 18px;
}

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

.side-poster-card img {
  width: 100%;
  border-radius: 20px;
  object-fit: cover;
  aspect-ratio: 2 / 3;
  background: rgba(30, 41, 59, 0.86);
}

.side-poster-card h2 {
  margin-top: 16px;
  font-size: 22px;
}

.side-poster-card p {
  color: var(--muted);
  line-height: 1.6;
}

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

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

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

.footer-links {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-links h2 {
  margin-bottom: 6px;
  font-size: 18px;
}

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

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

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: #64748b;
  font-size: 13px;
}

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

  .menu-button {
    display: inline-grid;
    place-items: center;
  }

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

  .mobile-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-slide {
    grid-template-columns: minmax(0, 1fr) 280px;
    padding: 48px;
  }

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

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

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

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

@media (max-width: 760px) {
  .site-header-inner {
    height: 68px;
  }

  .brand-text small,
  .mini-search {
    display: none;
  }

  .hero {
    padding-top: 74px;
  }

  .hero-stage {
    min-height: 680px;
    border-radius: 0 0 26px 26px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 34px 24px 70px;
  }

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

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

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

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

  .movie-grid,
  .compact-grid,
  .category-grid,
  .ranking-list-full,
  .category-overview-grid {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .search-page-form {
    flex-direction: column;
  }

  .page-hero {
    padding: 38px 24px;
  }

  .detail-layout {
    width: min(100% - 24px, 1240px);
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .compact-grid,
  .category-grid,
  .ranking-list-full,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .movie-rail {
    grid-auto-columns: 78%;
  }

  .ranking-row {
    grid-template-columns: auto 48px minmax(0, 1fr);
  }
}
