:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(251, 191, 36, 0.16);
  --amber: #f59e0b;
  --amber-bright: #fbbf24;
  --orange: #fb923c;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 22px;
  --max: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 15% 10%, rgba(245, 158, 11, 0.16), transparent 28rem),
    radial-gradient(circle at 85% 0%, rgba(248, 113, 113, 0.12), transparent 24rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.nav-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-weight: 900;
  letter-spacing: 0.02em;
}

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

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #cbd5e1;
  font-weight: 700;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--amber-bright);
  background: rgba(251, 191, 36, 0.1);
}

.header-search,
.quick-search,
.search-page-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(251, 191, 36, 0.16);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
}

.header-search input,
.quick-search input,
.search-page-form input,
.filter-panel input,
.filter-panel select {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.header-search input {
  width: 210px;
  padding: 8px 10px;
}

.header-search button,
.quick-search button,
.search-page-form button {
  border: 0;
  cursor: pointer;
  color: #111827;
  font-weight: 900;
  padding: 9px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber-bright), var(--orange));
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.88);
  cursor: pointer;
}

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

.hero {
  position: relative;
  min-height: 690px;
  overflow: hidden;
  border-bottom: 1px solid rgba(251, 191, 36, 0.1);
}

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.72s ease;
}

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(5px) saturate(1.16) brightness(0.52);
  transform: scale(1.04);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.42) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.1) 0%, #020617 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100% - 32px, var(--max));
  min-height: 690px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 400px;
  gap: 56px;
  align-items: center;
  padding: 70px 0 92px;
}

.hero-copy h1 {
  max-width: 780px;
  margin: 12px 0 20px;
  font-size: clamp(42px, 6vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--amber-bright);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-summary {
  max-width: 720px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.9;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(251, 191, 36, 0.17);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(251, 191, 36, 0.08);
  font-size: 12px;
  font-weight: 800;
}

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

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

.primary-btn {
  border: 0;
  cursor: pointer;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-bright), var(--orange));
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.24);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 26px 50px rgba(245, 158, 11, 0.32);
}

.ghost-btn {
  border: 1px solid rgba(251, 191, 36, 0.2);
  color: #fde68a;
  background: rgba(15, 23, 42, 0.72);
}

.ghost-btn:hover {
  border-color: rgba(251, 191, 36, 0.42);
  background: rgba(251, 191, 36, 0.12);
}

.wide {
  width: 100%;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 32px;
  background: rgba(15, 23, 42, 0.8);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.hero-poster:hover img {
  transform: scale(1.06);
}

.hero-poster span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  place-items: center;
  min-height: 46px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-bright), var(--orange));
  font-weight: 900;
}

.hero-control {
  position: relative;
  z-index: 3;
  min-height: 690px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 34px;
  pointer-events: none;
}

.hero-dots,
.hero-arrows {
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

.hero-dot,
.hero-arrows button {
  border: 1px solid rgba(251, 191, 36, 0.22);
  color: #fde68a;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.hero-dot {
  width: 36px;
  height: 10px;
  border-radius: 999px;
  opacity: 0.62;
}

.hero-dot.active {
  width: 64px;
  opacity: 1;
  background: linear-gradient(135deg, var(--amber-bright), var(--orange));
}

.hero-arrows button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
}

.quick-panel,
.page-hero,
.rank-strip,
.player-card,
.detail-info,
.content-section > .section-head,
.filter-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
}

.quick-panel {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 460px);
  gap: 26px;
  align-items: center;
  margin-top: -42px;
  position: relative;
  z-index: 5;
  padding: 24px;
  border-radius: var(--radius);
}

.quick-copy h2,
.section-head h2,
.rank-info h2,
.page-hero h1,
.title-block h1 {
  margin: 0;
  letter-spacing: -0.04em;
}

.quick-copy h2,
.section-head h2,
.rank-info h2 {
  font-size: clamp(26px, 3vw, 40px);
}

.quick-copy p:last-child,
.rank-info p,
.page-hero p,
.title-block p,
.movie-card p,
.site-footer p,
.info-grid p {
  color: var(--muted);
  line-height: 1.8;
}

.quick-search input,
.search-page-form input {
  width: 100%;
  padding: 12px 16px;
}

.content-section {
  margin-top: 54px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  padding: 22px;
  border-radius: var(--radius);
}

.section-head.stacked {
  align-items: stretch;
  flex-direction: column;
}

.section-more {
  color: var(--amber-bright);
  font-weight: 900;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.12);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.68);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 191, 36, 0.38);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.28);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 5px 12px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-bright), var(--orange));
}

.rank-badge {
  left: 12px;
  top: 12px;
  padding: 5px 10px;
  color: #fde68a;
  background: rgba(2, 6, 23, 0.82);
  border: 1px solid rgba(251, 191, 36, 0.24);
}

.card-body {
  padding: 16px;
}

.meta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--amber-bright);
  font-size: 12px;
  font-weight: 800;
}

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

.movie-card h3 a:hover {
  color: var(--amber-bright);
}

.movie-card p {
  margin: 0 0 12px;
  font-size: 14px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 172px;
  padding: 22px;
  border: 1px solid rgba(251, 191, 36, 0.14);
  border-radius: 24px;
  background:
    radial-gradient(circle at 85% 10%, rgba(251, 191, 36, 0.2), transparent 6rem),
    rgba(15, 23, 42, 0.72);
  transition: 0.25s ease;
}

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

.category-count {
  color: var(--amber-bright);
  font-size: 13px;
  font-weight: 900;
}

.category-card h3 {
  margin: 28px 0 10px;
  font-size: 24px;
}

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

.rank-strip {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  margin-top: 54px;
  padding: 24px;
  border-radius: var(--radius);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 46px 56px 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 74px;
  padding: 10px;
  border: 1px solid rgba(251, 191, 36, 0.1);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.35);
}

.rank-row span {
  color: var(--amber-bright);
  font-size: 18px;
  font-weight: 900;
}

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

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

.rank-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.page-main,
.detail-main {
  padding: 34px 0 70px;
}

.page-hero {
  padding: 34px;
  border-radius: 28px;
}

.small-hero h1 {
  font-size: clamp(36px, 5vw, 62px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #fde68a;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 170px 170px;
  gap: 10px;
  padding: 10px;
  border-radius: 20px;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(251, 191, 36, 0.12);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.34);
}

.filter-panel option {
  color: #111827;
}

.filter-empty {
  margin: 18px 0 0;
  padding: 18px;
  border: 1px solid rgba(251, 191, 36, 0.14);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.62);
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  margin-top: 18px;
}

.player-card {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  border-radius: 28px;
  background: #000;
}

.video-player {
  width: 100%;
  height: 100%;
  min-height: 520px;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--text);
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.78));
}

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

.play-circle {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  font-size: 38px;
  background: linear-gradient(135deg, var(--amber-bright), var(--orange));
  box-shadow: 0 22px 60px rgba(245, 158, 11, 0.36);
}

.player-overlay strong {
  max-width: min(82%, 720px);
  font-size: clamp(24px, 4vw, 42px);
  text-align: center;
}

.detail-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-poster {
  width: 100%;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 28px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.detail-info {
  margin-top: 30px;
  padding: 28px;
  border-radius: 28px;
}

.title-block h1 {
  margin-bottom: 12px;
  font-size: clamp(34px, 5vw, 64px);
}

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

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 26px;
}

.info-grid article {
  padding: 20px;
  border: 1px solid rgba(251, 191, 36, 0.12);
  border-radius: 22px;
  background: rgba(2, 6, 23, 0.28);
}

.info-grid h2 {
  margin: 0 0 12px;
  color: #fde68a;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
}

.info-list dt {
  color: var(--muted);
}

.info-list dd {
  margin: 0;
}

.site-footer {
  padding: 42px 0;
  border-top: 1px solid rgba(251, 191, 36, 0.1);
  background: rgba(2, 6, 23, 0.52);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

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

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

.footer-links a {
  padding: 10px 14px;
  border: 1px solid rgba(251, 191, 36, 0.14);
  border-radius: 999px;
  color: #fde68a;
}

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

  .hero-content,
  .detail-layout,
  .rank-strip,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster,
  .detail-side {
    max-width: 360px;
  }
}

@media (max-width: 860px) {
  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .nav-shell {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .nav-links,
  .header-search {
    display: none;
    width: 100%;
  }

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

  .nav-links.is-open {
    flex-direction: column;
    align-items: stretch;
  }

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

  .hero,
  .hero-content,
  .hero-control {
    min-height: 760px;
  }

  .hero-content {
    align-content: center;
    gap: 28px;
    padding-top: 40px;
  }

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

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

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

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

  .movie-card h3 {
    font-size: 16px;
  }

  .card-body {
    padding: 12px;
  }

  .section-head,
  .quick-panel,
  .page-hero,
  .detail-info {
    padding: 18px;
  }

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

  .hero-summary {
    font-size: 15px;
  }

  .hero-poster {
    display: none;
  }

  .player-card,
  .video-player {
    min-height: 260px;
  }

  .footer-grid {
    flex-direction: column;
  }

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