:root {
  color-scheme: dark;
  --bg: #030712;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --panel-soft: rgba(30, 41, 59, 0.72);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --gold: #f59e0b;
  --gold-soft: rgba(245, 158, 11, 0.18);
  --red: #ef4444;
  --pink: #f472b6;
  --blue: #38bdf8;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 32rem),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #030712 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input {
  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(3, 7, 18, 0.78);
  backdrop-filter: blur(20px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: #0f172a;
  background: linear-gradient(135deg, #fbbf24, #fb7185 55%, #38bdf8);
  box-shadow: 0 16px 40px rgba(245, 158, 11, 0.25);
  font-weight: 900;
}

.brand-name {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

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

.nav-link {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.header-search,
.large-search,
.inline-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.74);
  padding: 6px;
}

.header-search input,
.large-search input,
.inline-filter input {
  width: 180px;
  min-width: 0;
  border: 0;
  outline: none;
  color: var(--text);
  background: transparent;
  padding: 8px 10px;
}

.header-search button,
.large-search button,
.inline-filter button {
  border: 0;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  padding: 9px 16px;
  cursor: pointer;
  font-weight: 800;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: var(--text);
}

.hero {
  position: relative;
  overflow: hidden;
  padding-bottom: 38px;
}

.hero-stage {
  position: relative;
  min-height: 620px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  background-position: center;
  background-size: cover;
  transition: opacity 0.65s ease, transform 0.65s ease;
  transform: scale(1.03);
}

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

.hero-slide::after {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  content: "";
  background: linear-gradient(180deg, transparent, #020617 88%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(720px, calc(100% - 32px));
  margin-left: max(16px, calc((100vw - 1180px) / 2));
  padding-top: 72px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fbbf24;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(42px, 7vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.hero-desc {
  max-width: 680px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span,
.detail-tags span {
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.11);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 18px 38px rgba(245, 158, 11, 0.28);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.btn-subtle {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.72);
}

.hero-dots {
  position: absolute;
  right: max(18px, calc((100vw - 1180px) / 2));
  bottom: 168px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 42px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
  cursor: pointer;
}

.hero-dot.active {
  background: #fbbf24;
}

.hero-panel {
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  gap: 18px;
  margin-top: -116px;
}

.hero-search-card,
.hero-thumbs,
.section-card,
.detail-panel,
.player-wrap,
.category-card,
.rank-row,
.breadcrumb {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.hero-search-card {
  padding: 24px;
}

.hero-search-card h2 {
  margin: 12px 0 16px;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.large-search {
  margin-bottom: 16px;
}

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

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-pills a,
.filter-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  padding: 9px 12px;
  cursor: pointer;
}

.hero-thumbs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.hero-thumb {
  position: relative;
  min-height: 154px;
  overflow: hidden;
  border-radius: 18px;
  background: #111827;
}

.hero-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.66;
  transition: opacity 0.2s ease, transform 0.25s ease;
}

.hero-thumb span {
  position: absolute;
  inset: auto 10px 10px;
  z-index: 2;
  font-size: 13px;
  font-weight: 900;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-thumb.active img,
.hero-thumb:hover img {
  opacity: 1;
  transform: scale(1.06);
}

.page-main {
  padding: 46px 0 72px;
}

.section-card {
  margin: 26px 0;
  padding: 26px;
}

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

.section-heading h2,
.page-heading h1,
.detail-title h1 {
  margin: 8px 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.055em;
}

.section-heading p,
.page-heading p,
.detail-title p,
.footer-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-action {
  flex-shrink: 0;
  border: 1px solid rgba(251, 191, 36, 0.34);
  border-radius: 999px;
  color: #fde68a;
  padding: 10px 14px;
  font-weight: 900;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.74);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
  border-color: rgba(251, 191, 36, 0.38);
  background: rgba(30, 41, 59, 0.88);
  transform: translateY(-4px);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #1f2937);
}

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

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

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

.poster-play {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  border-radius: 999px;
  color: #111827;
  background: #fbbf24;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 900;
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: grid;
  min-width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #fb7185);
  font-weight: 900;
}

.card-body {
  padding: 14px;
}

.card-body h2 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
}

.meta-line {
  margin: 0 0 10px;
  color: #94a3b8;
  font-size: 13px;
}

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

.movie-card.compact .card-desc {
  min-height: 0;
}

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

.category-card {
  padding: 20px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  border-color: rgba(251, 191, 36, 0.42);
  transform: translateY(-3px);
}

.category-card h2 {
  margin: 8px 0;
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.7;
}

.category-card span {
  color: #fde68a;
  font-weight: 900;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-filter input {
  width: min(360px, 62vw);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  padding: 12px 16px;
  color: #cbd5e1;
}

.breadcrumb a {
  color: #fde68a;
  font-weight: 800;
}

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

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #111827;
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
}

.detail-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px;
}

.detail-title h1 {
  margin-top: 12px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  padding: 8px 12px;
  font-weight: 800;
}

.player-wrap {
  overflow: hidden;
  margin: 28px 0;
  padding: 16px;
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.2), rgba(2, 6, 23, 0.84));
  cursor: pointer;
}

.play-overlay[hidden] {
  display: none;
}

.play-overlay span {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 18px 60px rgba(245, 158, 11, 0.32);
  font-size: 34px;
}

.play-overlay strong {
  font-size: 18px;
  letter-spacing: 0.08em;
}

.content-block {
  display: grid;
  gap: 22px;
  margin: 28px 0;
}

.text-panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  padding: 24px;
}

.text-panel h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.text-panel p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 70px 78px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
}

.rank-number {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 16px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #fb7185);
  font-size: 18px;
  font-weight: 900;
}

.rank-row img {
  width: 78px;
  height: 110px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-row h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-row p {
  margin: 0;
  color: var(--muted);
}

.search-results {
  min-height: 320px;
}

.empty-state {
  border: 1px dashed rgba(148, 163, 184, 0.35);
  border-radius: 22px;
  color: var(--muted);
  padding: 42px;
  text-align: center;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.86);
  padding: 46px 0 22px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 32px;
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-grid a {
  display: block;
  margin-bottom: 10px;
  color: #cbd5e1;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding-top: 18px;
  text-align: center;
}

@media (max-width: 1100px) {
  .header-search {
    display: none;
  }

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

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

  .detail-hero {
    grid-template-columns: 300px minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .header-inner {
    min-height: 66px;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    inset: 66px 16px auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.96);
    padding: 14px;
    box-shadow: var(--shadow);
  }

  body.menu-open .main-nav {
    display: flex;
  }

  .nav-link {
    border-radius: 14px;
  }

  .hero-stage {
    min-height: 610px;
  }

  .hero-copy {
    padding-top: 44px;
  }

  .hero-panel {
    grid-template-columns: 1fr;
    margin-top: -86px;
  }

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

  .hero-thumb {
    min-height: 126px;
  }

  .hero-dots {
    bottom: 126px;
  }

  .section-heading,
  .page-heading,
  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .category-grid,
  .footer-grid,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .detail-poster img {
    min-height: auto;
  }

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

  .rank-row .btn {
    grid-column: 2 / -1;
  }
}

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

  .brand-name {
    font-size: 17px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-desc {
    font-size: 16px;
  }

  .section-card,
  .detail-panel,
  .text-panel {
    padding: 18px;
  }

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

  .hero-thumbs {
    grid-template-columns: 1fr;
  }
}
