:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #111827;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-solid: #1e293b;
  --panel-light: rgba(30, 41, 59, 0.78);
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --dim: #64748b;
  --brand: #0ea5e9;
  --brand-strong: #0284c7;
  --gold: #f59e0b;
  --orange: #f97316;
  --radius: 1rem;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 0%, rgba(14, 165, 233, 0.16), transparent 32%), var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

img,
video {
  display: block;
  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;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(18px);
}

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

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

.brand.compact {
  gap: 8px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  color: #111827;
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.28);
}

.brand-text {
  font-size: 1.2rem;
  background: linear-gradient(90deg, #fbbf24, #fb923c, #38bdf8);
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #cbd5e1;
  font-size: 0.94rem;
}

.site-nav-link {
  transition: color 0.2s ease, transform 0.2s ease;
}

.site-nav-link:hover {
  color: #fff;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.75);
  color: #fff;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #cbd5e1;
  border-radius: 999px;
}

.mobile-nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 18px;
  display: grid;
  gap: 8px;
}

.mobile-link {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.62);
  color: #cbd5e1;
}

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

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.2s ease;
  pointer-events: none;
}

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #0f172a 0%, rgba(15, 23, 42, 0.78) 42%, rgba(15, 23, 42, 0.25) 100%), linear-gradient(90deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.18));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 0 0 130px;
}

.hero-tags,
.detail-meta-top,
.movie-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: #cbd5e1;
}

.hero-tags a,
.hero-tags span,
.detail-meta-top a,
.detail-meta-top span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.86);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
}

.hero-tags span:nth-child(2) {
  background: rgba(245, 158, 11, 0.9);
}

.hero-tags span:nth-child(3) {
  background: rgba(30, 41, 59, 0.9);
}

.hero-content h1 {
  max-width: 760px;
  margin: 18px 0 16px;
  font-size: clamp(2.4rem, 7vw, 5.4rem);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.06em;
  text-shadow: 0 16px 44px rgba(0, 0, 0, 0.5);
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 28px;
  color: #e2e8f0;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.75;
}

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

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

.primary-button {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #fff;
  box-shadow: 0 16px 34px rgba(14, 165, 233, 0.28);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.7);
  color: #fff;
}

.ghost-button.small {
  min-height: 42px;
  padding: 0 18px;
  white-space: nowrap;
}

.primary-button.wide {
  width: 100%;
}

.hero-search-card {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 5;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.hero-search-form,
.search-page-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.hero-search-form input,
.search-page-form input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.55);
  color: #fff;
  outline: none;
  padding: 0 18px;
}

.hero-search-form button,
.search-page-form button {
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  color: #111827;
  font-weight: 900;
  cursor: pointer;
}

.hero-category-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hero-category-pills a {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.75);
  color: #cbd5e1;
  font-size: 0.9rem;
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 154px;
  z-index: 6;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 30px;
  background: #38bdf8;
}

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

.dark-band {
  background: rgba(30, 41, 59, 0.28);
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  font-weight: 900;
  letter-spacing: -0.04em;
}

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

.section-more {
  color: #38bdf8;
  font-weight: 800;
}

.featured-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 20px;
}

.featured-side {
  display: grid;
  gap: 16px;
}

.movie-grid,
.rail-grid,
.category-grid,
.category-overview-grid {
  display: grid;
  gap: 20px;
}

.rail-grid,
.compact-grid,
.full-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.62);
  box-shadow: 0 14px 34px rgba(2, 6, 23, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.42);
  background: rgba(30, 41, 59, 0.9);
}

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

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

.movie-card:hover .poster-link img {
  transform: scale(1.06);
  filter: brightness(1.08);
}

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  height: 52%;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.9), transparent);
}

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.9);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(248, 250, 252, 0.9);
  color: #0f172a;
  font-size: 0.8rem;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.34);
}

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

.movie-meta-row {
  gap: 8px;
  color: var(--dim);
  font-size: 0.78rem;
}

.movie-meta-row span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: #475569;
}

.movie-card h3,
.rank-body h3 {
  margin: 8px 0 8px;
  color: #fff;
  font-size: 1.02rem;
  font-weight: 850;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-body h3 a:hover {
  color: #fbbf24;
}

.movie-card p,
.rank-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row {
  margin-top: 12px;
}

.tag-row span,
.genre-row span,
.detail-tags a {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.74);
  color: #cbd5e1;
  font-size: 0.76rem;
}

.large-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1fr);
  min-height: 360px;
}

.large-card .poster-link {
  aspect-ratio: auto;
  height: 100%;
}

.large-card .movie-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px;
}

.large-card h3 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: -0.04em;
}

.large-card p {
  -webkit-line-clamp: 4;
  font-size: 1rem;
}

.horizontal-card {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
}

.horizontal-card .poster-link {
  aspect-ratio: auto;
  min-height: 150px;
}

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

.horizontal-card .tag-row {
  display: none;
}

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

.wide-ranking {
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
}

.rank-item {
  display: grid;
  grid-template-columns: 52px 88px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.62);
}

.rank-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #111827;
  font-weight: 950;
}

.rank-poster {
  height: 118px;
  overflow: hidden;
  border-radius: 14px;
  background: #020617;
}

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

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

.category-tile,
.category-overview-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(30, 41, 59, 0.6);
  box-shadow: var(--shadow);
}

.category-tile img,
.category-overview-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-tile:hover img,
.category-overview-card:hover img {
  transform: scale(1.06);
  opacity: 0.72;
}

.category-tile::after,
.category-overview-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.18));
}

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

.category-tile,
.category-overview-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
}

.category-tile span,
.category-overview-card span {
  font-size: 1.45rem;
  font-weight: 950;
}

.category-tile em,
.category-overview-card p {
  margin: 8px 0 0;
  color: #cbd5e1;
  font-style: normal;
  line-height: 1.6;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0 70px;
  background: radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.24), transparent 34%), radial-gradient(circle at 88% 0%, rgba(245, 158, 11, 0.16), transparent 32%), #0f172a;
}

.page-hero h1 {
  margin: 10px 0 14px;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.06em;
}

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

.eyebrow {
  color: #38bdf8 !important;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 900;
  font-size: 0.8rem !important;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(30, 41, 59, 0.64);
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.detail-wrap {
  padding: 28px 0 72px;
}

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

.breadcrumb a:hover {
  color: #38bdf8;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 340px;
  gap: 26px;
  align-items: start;
}

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

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

.player-start {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.68));
  color: #fff;
  cursor: pointer;
}

.player-start span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 22px 50px rgba(14, 165, 233, 0.32);
  font-size: 1.5rem;
}

.player-start.is-hidden {
  display: none;
}

.detail-content,
.aside-card {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(30, 41, 59, 0.58);
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.24);
}

.detail-content {
  padding: clamp(22px, 4vw, 34px);
}

.detail-content h1 {
  margin: 18px 0 16px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.detail-content .lead {
  color: #e2e8f0;
  font-size: 1.12rem;
  line-height: 1.85;
}

.detail-content h2 {
  margin: 28px 0 12px;
  font-size: 1.35rem;
  font-weight: 900;
}

.detail-content p {
  color: #cbd5e1;
  line-height: 1.95;
}

.genre-row {
  margin: 18px 0 4px;
}

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

.detail-tags a:hover {
  color: #fff;
  background: rgba(14, 165, 233, 0.48);
}

.detail-aside {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 22px;
}

.aside-card {
  margin-top: 0;
  padding: 18px;
}

.aside-card h2 {
  margin: 0 0 16px;
  font-size: 1.2rem;
  font-weight: 900;
}

.poster-aside img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 16px;
}

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

.related-card {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.related-card:hover {
  background: rgba(15, 23, 42, 0.8);
}

.related-card img {
  width: 70px;
  height: 94px;
  object-fit: cover;
  border-radius: 12px;
}

.related-card strong,
.related-card em {
  display: block;
}

.related-card strong {
  color: #fff;
  line-height: 1.35;
}

.related-card em {
  margin-top: 6px;
  color: var(--muted);
  font-style: normal;
  font-size: 0.82rem;
}

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

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

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

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 12px 18px;
  justify-content: flex-end;
  color: #cbd5e1;
}

.footer-links a:hover {
  color: #fbbf24;
}

[hidden] {
  display: none !important;
}

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

  .menu-toggle {
    display: block;
  }

  .hero-search-card,
  .section-heading,
  .footer-inner {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .hero-search-card {
    display: grid;
  }

  .hero-dots {
    left: 24px;
    right: auto;
  }

  .featured-layout,
  .large-card,
  .detail-layout,
  .category-grid,
  .category-overview-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .detail-aside {
    position: static;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .hero-carousel {
    min-height: 680px;
    height: auto;
  }

  .hero-content {
    padding: 96px 0 230px;
  }

  .hero-content h1 {
    font-size: 2.65rem;
  }

  .hero-search-form,
  .search-page-form {
    display: grid;
  }

  .hero-dots {
    bottom: 206px;
  }

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

  .horizontal-card,
  .rank-item {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .rank-number {
    display: none;
  }

  .wide-ranking {
    grid-template-columns: 1fr;
  }
}
