:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: #0f172a;
  --muted: #94a3b8;
  --text: #e5edf7;
  --soft: #cbd5e1;
  --line: rgba(148, 163, 184, 0.2);
  --red: #dc2626;
  --orange: #f97316;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --green: #16a34a;
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(220, 38, 38, 0.22), transparent 32rem),
    radial-gradient(circle at 90% 10%, rgba(37, 99, 235, 0.2), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

.image-hidden {
  opacity: 0;
}

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

.nav-shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 16px 40px rgba(220, 38, 38, 0.32);
}

.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
}

.nav-links a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--soft);
  font-weight: 700;
  transition: 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.nav-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
}

.nav-search input,
.search-controls input,
.search-controls select,
.inline-filter-bar input {
  width: 230px;
  border: 0;
  outline: 0;
  color: white;
  background: transparent;
  padding: 9px 12px;
}

.nav-search button,
.search-controls button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 9px 16px;
  color: white;
  font-weight: 800;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

.menu-button {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  padding: 8px 12px;
}

.hero-slider {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

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

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.12) brightness(0.55);
  transform: scale(1.03);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, transparent 34%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 76px;
  max-width: 760px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.24);
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 800;
  font-size: 0.85rem;
}

.hero-content h1 {
  margin: 22px 0 18px;
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
  font-weight: 950;
}

.hero-content p {
  max-width: 690px;
  color: #dbeafe;
  font-size: clamp(1.05rem, 2vw, 1.32rem);
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  min-height: 46px;
  padding: 0 22px;
  font-weight: 900;
  transition: 0.25s ease;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 18px 44px rgba(220, 38, 38, 0.28);
}

.primary-button:hover,
.ghost-button:hover,
.movie-card:hover,
.category-tile:hover,
.rank-card:hover {
  transform: translateY(-3px);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: white;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(10px);
}

.hero-control {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: white;
  background: rgba(0, 0, 0, 0.42);
  cursor: pointer;
  font-size: 2rem;
  backdrop-filter: blur(12px);
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

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

.hero-dots button {
  width: 18px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition: 0.25s ease;
}

.hero-dots button.is-active {
  width: 42px;
  background: white;
}

.quick-panel,
.page-shell,
.content-section,
.detail-content,
.related-section,
.search-panel,
.inline-filter-bar {
  width: min(1220px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.quick-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 24px;
  margin-top: -68px;
  position: relative;
  z-index: 5;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.quick-panel h2,
.section-head h2,
.page-hero h1,
.detail-copy h1,
.story-card h2 {
  margin: 0;
  font-weight: 950;
  letter-spacing: -0.035em;
}

.quick-panel h2 {
  font-size: clamp(1.6rem, 3vw, 2.6rem);
}

.quick-panel p,
.section-head p,
.page-hero p,
.story-card p,
.movie-card p,
.rank-card p,
.detail-copy .lead-text {
  color: var(--muted);
}

.quick-links {
  display: flex;
  align-content: flex-start;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-links a {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.06);
}

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

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

.section-head h2 {
  margin-top: 14px;
  font-size: clamp(1.8rem, 3vw, 3rem);
}

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

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

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

.movie-card,
.rank-card,
.story-card,
.search-panel,
.inline-filter-bar,
.player-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  transition: 0.25s ease;
  overflow: hidden;
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 10%, rgba(249, 115, 22, 0.24), transparent 18rem),
    linear-gradient(135deg, #111827, #020617);
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.45s ease;
}

.movie-card:hover .poster img,
.category-tile:hover img,
.rank-card:hover .poster img {
  transform: scale(1.08);
}

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(2, 6, 23, 0.74) 100%);
}

.poster-badge,
.rank-score-pill {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: white;
  font-weight: 900;
  font-size: 0.8rem;
  background: rgba(220, 38, 38, 0.92);
}

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

.card-meta,
.detail-meta,
.footer-links,
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--muted);
  font-size: 0.9rem;
}

.card-meta a,
.card-meta span,
.detail-meta span {
  color: #bae6fd;
}

.movie-card h3 {
  margin: 9px 0 8px;
  font-size: 1.1rem;
  line-height: 1.35;
}

.movie-card p {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 0;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.card-large .poster {
  aspect-ratio: auto;
  min-height: 210px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-row span {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  padding: 4px 9px;
  color: #cbd5e1;
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.04);
}

.category-showcase {
  padding-bottom: 8px;
}

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

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

.category-tile {
  position: relative;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 20% 10%, rgba(37, 99, 235, 0.18), transparent 14rem),
    #0f172a;
  transition: 0.25s ease;
}

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

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.92));
}

.category-tile span,
.category-tile small {
  position: relative;
  z-index: 2;
}

.category-tile span {
  font-size: 1.35rem;
  font-weight: 950;
}

.category-tile small {
  margin-top: 6px;
  color: #cbd5e1;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 24px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 1fr 90px;
  align-items: center;
  min-height: 58px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
  transition: 0.2s ease;
}

.rank-row:hover {
  background: rgba(30, 41, 59, 0.96);
}

.rank-number {
  color: #fed7aa;
  font-size: 1.1rem;
  font-weight: 950;
}

.rank-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 800;
}

.rank-score {
  color: #67e8f9;
  text-align: right;
  font-weight: 900;
}

.spotlight-card {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: #0f172a;
}

.spotlight-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
}

.spotlight-card div {
  position: relative;
  z-index: 2;
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  background: linear-gradient(180deg, transparent 0%, rgba(2, 6, 23, 0.95) 72%);
}

.spotlight-card span {
  color: #fed7aa;
  font-weight: 900;
}

.spotlight-card h3 {
  margin: 10px 0;
  font-size: 2rem;
}

.page-shell {
  padding: 42px 0 90px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: clamp(34px, 6vw, 70px);
  background:
    radial-gradient(circle at 12% 0%, rgba(220, 38, 38, 0.32), transparent 30rem),
    radial-gradient(circle at 88% 10%, rgba(6, 182, 212, 0.18), transparent 26rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.94));
}

.page-hero h1 {
  margin-top: 18px;
  font-size: clamp(2.1rem, 6vw, 4.8rem);
  line-height: 1;
}

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

.inline-filter-bar,
.search-panel {
  margin-top: 28px;
  padding: 18px;
}

.inline-filter-bar input {
  width: 100%;
}

.search-controls {
  display: grid;
  grid-template-columns: 1fr 180px 150px 120px;
  gap: 12px;
}

.search-controls input,
.search-controls select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.48);
}

.search-status {
  color: var(--muted);
  margin: 18px 4px;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
}

.rank-card .poster-badge {
  background: linear-gradient(135deg, var(--red), var(--orange));
}

.rank-score-pill {
  position: static;
  display: inline-flex;
  margin-bottom: 8px;
  background: rgba(6, 182, 212, 0.18);
  color: #a5f3fc;
}

.rank-card h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.detail-page {
  padding-bottom: 90px;
}

.detail-hero {
  position: relative;
  min-height: 650px;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: #020617;
}

.detail-backdrop,
.detail-backdrop::after {
  position: absolute;
  inset: 0;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(4px) brightness(0.34) saturate(1.15);
  transform: scale(1.04);
}

.detail-backdrop::after {
  content: "";
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.5)),
    linear-gradient(0deg, #020617, transparent 44%);
}

.detail-inner {
  position: relative;
  z-index: 2;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 52px);
  padding: 120px 0 72px;
}

.detail-poster {
  border-radius: 24px;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.42);
}

.breadcrumb {
  margin-bottom: 18px;
}

.breadcrumb a {
  color: #bae6fd;
}

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

.lead-text {
  max-width: 850px;
  font-size: 1.15rem;
}

.player-section {
  width: min(1100px, calc(100% - 32px));
  margin: -32px auto 0;
  position: relative;
  z-index: 5;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: white;
  cursor: pointer;
  background:
    radial-gradient(circle at 50% 45%, rgba(220, 38, 38, 0.25), transparent 16rem),
    rgba(2, 6, 23, 0.44);
  transition: 0.25s ease;
}

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

.play-circle {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 22px 60px rgba(220, 38, 38, 0.35);
  font-size: 2rem;
}

.player-overlay strong {
  max-width: min(600px, 80%);
  font-size: clamp(1.3rem, 3vw, 2.2rem);
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 42px;
}

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

.story-card h2 {
  font-size: 1.6rem;
}

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

.footer-inner {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
}

.footer-links a:hover,
.movie-card h3 a:hover,
.rank-card h2 a:hover {
  color: white;
}

.is-filtered-out {
  display: none;
}

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

  .wide-grid,
  .rank-full-grid,
  .detail-content,
  .rank-layout,
  .quick-panel {
    grid-template-columns: 1fr;
  }

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

  .spotlight-card {
    min-height: 440px;
  }
}

@media (max-width: 820px) {
  .nav-shell {
    flex-wrap: wrap;
    padding: 14px 0;
  }

  .menu-button {
    display: block;
  }

  .nav-links {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
  }

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

  .nav-search {
    width: 100%;
    order: 4;
  }

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

  .hero-slider,
  .detail-hero {
    min-height: 600px;
  }

  .hero-control {
    display: none;
  }

  .movie-grid,
  .wide-grid,
  .index-grid,
  .category-grid,
  .category-grid-large {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-inner {
    grid-template-columns: 1fr;
    padding-top: 96px;
  }

  .detail-poster {
    width: min(220px, 70vw);
  }

  .search-controls,
  .rank-card {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .hero-content {
    padding-top: 36px;
  }

  .quick-panel {
    margin-top: 0;
    border-radius: 0;
    width: 100%;
  }

  .movie-grid,
  .wide-grid,
  .index-grid,
  .category-grid,
  .category-grid-large {
    grid-template-columns: 1fr;
  }

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

  .card-large .poster {
    aspect-ratio: 2 / 3;
  }

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

  .rank-score {
    display: none;
  }
}
