:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #1e293b;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --orange: #f97316;
  --red: #dc2626;
  --green: #22c55e;
  --blue: #38bdf8;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  min-height: 100vh;
}

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

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

img.image-missing {
  opacity: 0;
}

button,
input,
select {
  font: inherit;
}

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

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

.nav-bar {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.brand span:last-child,
.footer-brand strong {
  background: linear-gradient(90deg, #fb923c, #ef4444);
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 14px 30px rgba(249, 115, 22, 0.28);
}

.nav-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
}

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

.nav-links a:hover,
.site-footer a:hover,
.breadcrumbs a:hover,
.section-more:hover {
  color: #fb923c;
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.filter-search input,
.large-search-form input,
.home-search input {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(30, 41, 59, 0.94);
  color: #fff;
  border-radius: 999px;
  padding: 11px 16px;
  outline: none;
  min-width: 220px;
}

.nav-search input:focus,
.filter-search input:focus,
.large-search-form input:focus,
.home-search input:focus {
  border-color: rgba(249, 115, 22, 0.75);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.nav-search button,
.large-search-form button,
.home-search button,
.primary-btn {
  border: 0;
  color: #fff;
  border-radius: 999px;
  padding: 11px 18px;
  cursor: pointer;
  font-weight: 700;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 18px 38px rgba(220, 38, 38, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.large-search-form button:hover,
.home-search button:hover,
.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 48px rgba(249, 115, 22, 0.34);
}

.nav-toggle {
  display: none;
  background: transparent;
  color: #fff;
  border: 0;
  font-size: 28px;
}

.main-wrap {
  min-height: 70vh;
}

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

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

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: radial-gradient(circle at 70% 20%, rgba(249, 115, 22, 0.22), transparent 28%), linear-gradient(135deg, #111827, #020617);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.1));
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 720px;
  padding-top: 72px;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  padding: 7px 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero h1,
.page-title-block h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero p {
  margin: 0;
  max-width: 680px;
  color: #e5e7eb;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.7;
}

.hero-meta,
.detail-meta,
.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #cbd5e1;
}

.hero-meta {
  margin: 26px 0 30px;
}

.hero-meta span,
.detail-meta span,
.meta-line span,
.count-pill {
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  padding: 7px 12px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ghost-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(15, 23, 42, 0.56);
  transition: background 0.2s ease, transform 0.2s ease;
}

.ghost-btn:hover {
  background: rgba(249, 115, 22, 0.16);
  transform: translateY(-1px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 8;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

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

.hero-dots button.is-active {
  width: 34px;
  background: var(--orange);
}

.page-section,
.page-title-block,
.filter-panel,
.search-page-panel {
  margin-top: 44px;
}

.page-title-block {
  padding: 36px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.page-title-block p {
  max-width: 820px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 18px;
}

.quick-search-panel,
.filter-panel,
.search-page-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.75);
}

.home-search {
  display: grid;
  gap: 10px;
  flex: 1;
}

.home-search label,
.filter-search label {
  color: #fff;
  font-weight: 800;
}

.home-search div,
.large-search-form {
  display: flex;
  gap: 10px;
}

.home-search input,
.large-search-form input {
  flex: 1;
}

.stats-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stats-strip span {
  display: grid;
  gap: 2px;
  min-width: 110px;
  padding: 12px 16px;
  border-radius: 18px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.74);
}

.stats-strip strong {
  color: #fff;
  font-size: 24px;
}

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

.section-head h2,
.rank-panel h2,
.sidebar-card h2,
.detail-card h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(24px, 3vw, 34px);
}

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

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

.rail-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 1fr);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 12px;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.13);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(249, 115, 22, 0.38);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.35);
}

.thumb-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: radial-gradient(circle at 70% 12%, rgba(249, 115, 22, 0.26), transparent 32%), linear-gradient(135deg, #334155, #020617);
}

.poster-shell,
.poster-shell img {
  display: block;
  width: 100%;
  height: 100%;
}

.poster-shell img {
  object-fit: cover;
  transition: transform 0.28s ease, opacity 0.2s ease;
}

.movie-card:hover .poster-shell img {
  transform: scale(1.06);
}

.play-hover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  color: #fff;
  background: rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: scale(0.78);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.duration,
.rank-badge {
  position: absolute;
  z-index: 3;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.duration {
  right: 10px;
  bottom: 10px;
}

.rank-badge {
  top: 10px;
  left: 10px;
  min-width: 30px;
  text-align: center;
  background: linear-gradient(135deg, var(--orange), var(--red));
}

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

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

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

.movie-card p {
  min-height: 46px;
  margin: 0 0 12px;
  color: #cbd5e1;
  line-height: 1.55;
  font-size: 14px;
}

.meta-line {
  gap: 6px;
  font-size: 12px;
}

.meta-line span {
  padding: 4px 8px;
}

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

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

.tag-row span,
.genre-row span,
.detail-tags a,
.filter-tokens button {
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  padding: 6px 10px;
  font-size: 12px;
}

.detail-tags a:hover,
.filter-tokens button:hover {
  color: #fff;
  border-color: rgba(249, 115, 22, 0.5);
  background: rgba(249, 115, 22, 0.16);
}

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

.category-card,
.category-overview-card,
.rank-panel,
.sidebar-card,
.detail-card {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.88));
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.category-card {
  display: grid;
  gap: 10px;
  min-height: 150px;
  padding: 22px;
}

.category-card:hover {
  border-color: rgba(249, 115, 22, 0.42);
  transform: translateY(-3px);
}

.category-card span {
  font-size: 20px;
  font-weight: 800;
}

.category-card strong {
  color: #fb923c;
  font-size: 26px;
}

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

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

.rank-panel {
  padding: 24px;
}

.rank-panel ol {
  list-style: none;
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 18px 0 22px;
}

.rank-panel a,
.rank-panel li a {
  display: grid;
}

.rank-panel li a {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: #cbd5e1;
}

.rank-panel li span {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  color: #fff;
  font-weight: 800;
}

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

.rank-panel li em {
  color: #fb923c;
  font-style: normal;
  font-size: 13px;
}

.full-btn {
  width: 100%;
}

.category-overview-list {
  display: grid;
  gap: 24px;
  margin-top: 36px;
}

.category-overview-card {
  padding: 24px;
}

.category-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.category-overview-head h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.mini-card-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.movie-card-wide {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
}

.movie-card-wide .thumb-link {
  height: 100%;
  aspect-ratio: auto;
}

.movie-card-wide .movie-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.filter-panel {
  align-items: flex-end;
}

.filter-search {
  display: grid;
  gap: 8px;
  flex: 1;
}

.filter-search input {
  width: 100%;
}

.category-list-grid {
  margin-bottom: 56px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: #cbd5e1;
  margin-bottom: 16px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  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;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  border: 0;
  cursor: pointer;
  background: radial-gradient(circle at 50% 38%, rgba(249, 115, 22, 0.18), transparent 24%), rgba(0, 0, 0, 0.58);
}

.player-shell.is-playing .player-cover {
  display: none;
}

.player-play {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  font-size: 34px;
  box-shadow: 0 22px 48px rgba(249, 115, 22, 0.36);
}

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

.player-cover small,
.player-status {
  color: #cbd5e1;
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 4;
  font-size: 14px;
}

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

.detail-headline {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
}

.detail-headline h1 {
  margin: 14px 0 18px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.18;
}

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

.detail-card .lead-text {
  color: #f8fafc;
  font-size: 18px;
}

.detail-card h2 {
  margin-top: 28px;
  margin-bottom: 12px;
  font-size: 24px;
}

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

.detail-sidebar {
  min-width: 0;
}

.sticky-card {
  position: sticky;
  top: 92px;
}

.sidebar-card {
  padding: 22px;
}

.side-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.side-list .movie-card-wide {
  grid-template-columns: 120px minmax(0, 1fr);
  border-radius: 14px;
  box-shadow: none;
}

.side-list .movie-card h3 {
  font-size: 14px;
}

.side-list .movie-card p,
.side-list .tag-row {
  display: none;
}

.ranking-list {
  display: grid;
  gap: 16px;
  margin-top: 34px;
  margin-bottom: 60px;
}

.ranking-list .movie-card-wide {
  grid-template-columns: 260px minmax(0, 1fr);
}

.search-page-panel {
  display: block;
}

.large-search-form {
  width: 100%;
}

.search-summary {
  color: var(--muted);
  margin-top: 14px;
}

.site-footer {
  margin-top: 80px;
  padding: 44px 0 28px;
  color: #cbd5e1;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), #020617);
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 26px;
}

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

.site-footer ul {
  list-style: none;
  display: grid;
  gap: 9px;
  padding: 0;
  margin: 0;
}

.footer-brand {
  margin-bottom: 14px;
}

.is-hidden {
  display: none !important;
}

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

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

  .detail-sidebar .sticky-card {
    position: static;
  }

  .footer-grid,
  .mini-card-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .nav-toggle {
    display: block;
  }

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

  .nav-panel.is-open {
    display: flex;
  }

  .nav-links,
  .nav-search,
  .home-search div,
  .large-search-form,
  .quick-search-panel,
  .filter-panel,
  .category-overview-head,
  .detail-headline,
  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links {
    gap: 12px;
  }

  .nav-search input,
  .home-search input,
  .large-search-form input {
    width: 100%;
    min-width: 0;
  }

  .hero {
    min-height: 640px;
  }

  .hero-arrow {
    display: none;
  }

  .movie-grid,
  .compact-grid,
  .category-grid,
  .footer-grid,
  .mini-card-row {
    grid-template-columns: 1fr;
  }

  .movie-card-wide,
  .ranking-list .movie-card-wide,
  .side-list .movie-card-wide {
    grid-template-columns: 128px minmax(0, 1fr);
  }

  .page-title-block,
  .detail-card,
  .rank-panel,
  .category-overview-card {
    padding: 22px;
  }
}
