:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(255, 255, 255, 0.1);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --amber: #f59e0b;
  --orange: #f97316;
  --blue: #1e3a8a;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 5%, rgba(245, 158, 11, 0.18), transparent 28rem),
    radial-gradient(circle at 82% 12%, rgba(37, 99, 235, 0.22), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.32);
}

.brand-text {
  font-size: 21px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #fcd34d, #fb923c, #fbbf24);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

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

.main-nav a {
  position: relative;
  color: #dbeafe;
  font-size: 15px;
  font-weight: 650;
  transition: color 0.2s ease;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: #fcd34d;
}

.main-nav a:hover::after,
.main-nav a.is-active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #0f172a;
}

.hero-slider {
  position: absolute;
  inset: 0;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.76) 45%, rgba(15, 23, 42, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.08) 50%, rgba(2, 6, 23, 0.38) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 610px;
  align-items: center;
  padding: 88px 0 72px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  font-size: 13px;
  font-weight: 700;
}

.hero-copy {
  max-width: 720px;
}

.hero-copy h1 {
  margin: 20px 0 16px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 22px;
  color: #e2e8f0;
  font-size: clamp(16px, 2.2vw, 21px);
}

.hero-meta,
.movie-meta-line,
.detail-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--subtle);
  font-size: 14px;
}

.hero-meta span,
.movie-meta-line span,
.detail-meta span,
.rank-meta span {
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.5);
}

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

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 16px 34px rgba(249, 115, 22, 0.32);
}

.btn-secondary,
.btn-ghost {
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(14px);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: inline-flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
}

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

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

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

.hero-dots button {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: #f59e0b;
}

.section {
  padding: 70px 0 0;
}

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

.section-heading h1,
.section-heading h2 {
  margin: 12px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-lead {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
}

.search-panel {
  display: grid;
  gap: 16px;
  margin: 28px 0 30px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.search-box input {
  width: 100%;
  height: 48px;
  color: #fff;
  border: 0;
  outline: 0;
  background: transparent;
}

.search-box input::placeholder {
  color: #94a3b8;
}

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

.filter-chips button,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.1);
}

.filter-chips button {
  padding: 8px 13px;
}

.filter-chips button.is-active,
.filter-chips button:hover {
  color: #fff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.96));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.36);
  transform: translateY(-6px);
}

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

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

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

.poster-shine {
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent);
}

.movie-card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

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

.movie-card h2 a:hover {
  color: #fbbf24;
}

.movie-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

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

.tag-row span,
.detail-tags span {
  padding: 4px 9px;
  font-size: 12px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  box-shadow: var(--shadow);
}

.category-card::after {
  content: "";
  position: absolute;
  right: -48px;
  top: -48px;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.18);
}

.category-card h2 {
  margin: 0 0 12px;
  font-size: 25px;
}

.category-card p {
  margin: 0 0 20px;
  color: var(--muted);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 76px 92px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
}

.rank-num {
  display: inline-flex;
  width: 58px;
  height: 58px;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-size: 22px;
  font-weight: 900;
}

.rank-cover {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  background: #111827;
}

.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-info h2 {
  margin: 0 0 7px;
  font-size: 20px;
}

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

.page-hero {
  padding: 72px 0 24px;
}

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

.player-card,
.detail-card,
.related-panel {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.84);
  box-shadow: var(--shadow);
}

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

.player-box video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: rgba(2, 6, 23, 0.12);
  cursor: pointer;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.54);
}

.play-circle {
  position: relative;
  z-index: 2;
  display: inline-flex;
  width: 86px;
  height: 86px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 18px 50px rgba(249, 115, 22, 0.42);
  font-size: 32px;
}

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

.player-copy,
.detail-card,
.related-panel {
  padding: 24px;
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-card h2,
.related-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-card p,
.player-copy p,
.related-panel p {
  color: var(--muted);
}

.detail-section {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.info-table {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.info-table div {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  color: var(--muted);
}

.info-table strong {
  color: #fff;
}

.related-list {
  display: grid;
  gap: 14px;
}

.related-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
}

.related-card img {
  width: 72px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: #111827;
}

.related-card h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.related-card p {
  margin: 0;
  font-size: 13px;
}

.site-footer {
  margin-top: 84px;
  padding: 48px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(2, 6, 23, 0.92);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 30px;
}

.footer-grid p {
  max-width: 420px;
  color: var(--subtle);
}

.footer-grid h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.footer-grid a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: var(--muted);
}

.footer-grid a:hover {
  color: #fbbf24;
}

.copyright {
  margin-top: 34px;
  color: #64748b;
  font-size: 13px;
}

.empty-state {
  display: none;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.76);
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

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

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

  .rank-item {
    grid-template-columns: 58px 80px 1fr;
  }

  .rank-item .btn-ghost {
    grid-column: 3;
    width: fit-content;
  }
}

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

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

  .main-nav a {
    padding: 12px 14px;
    border-radius: 12px;
  }

  .main-nav a:hover,
  .main-nav a.is-active {
    background: rgba(245, 158, 11, 0.12);
  }

  .main-nav a::after {
    display: none;
  }

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

  .hero-control {
    display: none;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .rank-item {
    grid-template-columns: 52px 72px 1fr;
    gap: 12px;
  }

  .rank-num {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    font-size: 18px;
  }

  .rank-info p {
    display: none;
  }
}
