:root {
  color-scheme: dark;
  --page: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --brand: #f97316;
  --brand-dark: #dc2626;
  --brand-soft: rgba(249, 115, 22, 0.16);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  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 12% 4%, rgba(249, 115, 22, 0.16), transparent 34rem),
    radial-gradient(circle at 90% 18%, rgba(220, 38, 38, 0.12), transparent 28rem),
    var(--page);
  color: var(--text);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.18);
}

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 12px 32px rgba(249, 115, 22, 0.35);
  transform: translateZ(0);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-3deg);
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-text strong {
  font-size: 1.18rem;
  letter-spacing: 0.02em;
}

.brand-text small {
  color: var(--muted);
  font-size: 0.78rem;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--muted-strong);
  font-size: 0.94rem;
  font-weight: 700;
  transition: color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
  color: white;
  background: var(--brand);
  box-shadow: 0 14px 34px rgba(249, 115, 22, 0.25);
}

.menu-toggle {
  display: none;
  padding: 10px 14px;
  color: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.82);
  cursor: pointer;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  filter: saturate(1.08) contrast(1.06);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.62) 42%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 38%, rgba(2, 6, 23, 0.08) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 1180px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #fb923c;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.hero h2 {
  max-width: 760px;
  margin: 0;
  text-shadow: 0 16px 44px rgba(0, 0, 0, 0.42);
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 5.9rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero h2 {
  margin-top: 10px;
  font-size: clamp(2rem, 5vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-summary {
  max-width: 720px;
  margin: 22px 0 0;
  color: #e2e8f0;
  font-size: clamp(1rem, 1.7vw, 1.24rem);
  line-height: 1.8;
  text-shadow: 0 12px 28px rgba(0, 0, 0, 0.48);
}

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

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

.hero-tags span,
.tag-row span,
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.16);
  border: 1px solid rgba(249, 115, 22, 0.28);
  padding: 6px 11px;
  font-size: 0.78rem;
  font-weight: 750;
}

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

.primary-btn,
.ghost-btn,
.line-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 20px;
  border-radius: 14px;
  font-weight: 850;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.primary-btn {
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 16px 40px rgba(249, 115, 22, 0.32);
}

.ghost-btn,
.line-btn {
  color: white;
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.primary-btn:hover,
.ghost-btn:hover,
.line-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 45px rgba(249, 115, 22, 0.24);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: 3;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px);
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: white;
  background: transparent;
  cursor: pointer;
}

.hero-arrow {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 1.8rem;
  line-height: 1;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.1);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

.hero-dot.active {
  width: 28px;
  background: #fb923c;
}

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

.section-heading {
  margin-bottom: 26px;
}

.section-heading h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  letter-spacing: -0.03em;
}

.section-heading h2 {
  font-size: clamp(1.9rem, 4vw, 3.1rem);
}

.section-heading p:not(.eyebrow),
.page-hero p,
.detail-info .lead-text {
  color: var(--muted-strong);
  line-height: 1.8;
}

.split-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 330px;
  display: flex;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(220, 38, 38, 0.08)),
    linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.62));
  border-bottom: 1px solid var(--line);
}

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

.page-hero h1 {
  font-size: clamp(2.4rem, 6vw, 5rem);
}

.page-hero p {
  max-width: 720px;
  font-size: 1.08rem;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(2, minmax(150px, 220px));
  gap: 14px;
  margin-bottom: 26px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.filter-panel.compact {
  box-shadow: none;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  color: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  background: rgba(2, 6, 23, 0.8);
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(249, 115, 22, 0.68);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

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

.featured-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.dense-grid {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96));
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.2);
  transform: translateZ(0);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(249, 115, 22, 0.5);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.34);
}

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

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

.movie-card:hover .poster-link img,
.category-card:hover img {
  transform: scale(1.07);
  filter: saturate(1.1) contrast(1.08);
}

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

.movie-meta-line {
  color: var(--muted);
  font-size: 0.78rem;
}

.movie-card h3 {
  margin: 12px 0 8px;
  color: white;
  font-size: 1.05rem;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: #fb923c;
}

.movie-card p {
  min-height: 64px;
  margin: 0 0 14px;
  color: var(--muted-strong);
  font-size: 0.9rem;
  line-height: 1.58;
}

.tag-row span {
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.18);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.85);
  box-shadow: var(--shadow);
}

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

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.28));
}

.category-card span,
.category-card p {
  position: relative;
  z-index: 1;
}

.category-card span {
  font-size: 1.45rem;
  font-weight: 900;
}

.category-card p {
  margin: 10px 0 0;
  color: var(--muted-strong);
  line-height: 1.65;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.large-rank {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.rank-row {
  display: grid;
  grid-template-columns: 48px 68px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.rank-row:hover {
  transform: translateY(-3px);
  border-color: rgba(249, 115, 22, 0.48);
  background: rgba(30, 41, 59, 0.92);
}

.rank-number {
  color: #fb923c;
  font-size: 1.32rem;
  font-weight: 950;
  text-align: center;
}

.rank-row img {
  width: 68px;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-text {
  display: grid;
  gap: 6px;
  min-width: 0;
}

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

.rank-text em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.88rem;
}

.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 28px;
  display: grid;
  grid-template-columns: minmax(230px, 340px) 1fr;
  gap: 36px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(249, 115, 22, 0.2);
  background: var(--panel);
  box-shadow: var(--shadow);
}

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

.breadcrumb {
  display: flex;
  gap: 9px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumb a:hover {
  color: #fb923c;
}

.detail-info h1 {
  max-width: 820px;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  line-height: 1;
}

.lead-text {
  max-width: 820px;
  margin: 22px 0 0;
  font-size: 1.12rem;
}

.detail-tags {
  margin-bottom: 28px;
}

.player-section {
  padding-top: 34px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #000;
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.42);
}

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

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  cursor: pointer;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.62));
}

.player-start span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 2.1rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 20px 60px rgba(249, 115, 22, 0.38);
  padding-left: 6px;
}

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

.story-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.74), rgba(15, 23, 42, 0.86));
  box-shadow: var(--shadow);
}

.story-card p {
  margin: 0 0 16px;
  color: var(--muted-strong);
  font-size: 1.02rem;
  line-height: 1.9;
}

.large-tags {
  margin-top: 18px;
}

.pager-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.pager-links a {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--muted-strong);
}

.pager-links a:hover {
  color: white;
  border-color: rgba(249, 115, 22, 0.42);
}

.related-grid {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.empty-state {
  margin: 24px 0 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.72);
  text-align: center;
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.74), rgba(2, 6, 23, 1));
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  gap: 16px;
  color: var(--muted-strong);
}

.footer-brand {
  color: white;
  font-size: 1.3rem;
  font-weight: 900;
}

.footer-inner p {
  max-width: 720px;
  margin: 0;
  line-height: 1.72;
}

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

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

.copyright {
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 860px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .hero {
    min-height: 620px;
    height: 76vh;
  }

  .hero-overlay {
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.32));
  }

  .hero-content {
    justify-content: flex-end;
    padding-bottom: 110px;
  }

  .split-heading,
  .detail-hero,
  .pager-links {
    grid-template-columns: 1fr;
    display: grid;
  }

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

  .detail-hero {
    gap: 24px;
  }

  .detail-poster {
    max-width: 300px;
  }
}

@media (max-width: 520px) {
  .topbar,
  .section,
  .page-hero > div,
  .detail-hero,
  .footer-inner,
  .hero-content {
    width: min(100% - 24px, 1180px);
  }

  .brand-text small {
    display: none;
  }

  .hero-actions {
    width: 100%;
  }

  .primary-btn,
  .ghost-btn,
  .line-btn {
    width: 100%;
  }

  .movie-grid,
  .dense-grid,
  .featured-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

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

  .movie-card p {
    min-height: auto;
    font-size: 0.84rem;
  }

  .rank-list,
  .large-rank {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 38px 58px 1fr;
  }

  .rank-row img {
    width: 58px;
    height: 76px;
  }

  .player-start span {
    width: 68px;
    height: 68px;
    font-size: 1.7rem;
  }
}
