:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --panel: #111111;
  --panel-2: #171717;
  --muted: #a3a3a3;
  --line: #262626;
  --text: #f5f5f5;
  --soft: #d4d4d4;
  --gold: #f59e0b;
  --gold-2: #fbbf24;
  --gold-dark: #78350f;
  --shadow: 0 24px 70px rgba(245, 158, 11, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.12), transparent 28%), var(--bg);
  color: var(--text);
  font-family: 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,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(38, 38, 38, 0.95);
  background: rgba(10, 10, 10, 0.86);
  backdrop-filter: blur(18px);
}

.nav-shell {
  max-width: 1240px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #111111;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  font-weight: 900;
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  letter-spacing: 0.04em;
}

.brand-text span {
  font-size: 20px;
  font-weight: 850;
}

.brand-text small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
}

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

.nav-link,
.mobile-link {
  padding: 10px 16px;
  border-radius: 12px;
  color: #d4d4d4;
  font-weight: 650;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.is-active,
.mobile-link.is-active {
  color: #111111;
  background: var(--gold);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #171717;
  color: var(--text);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  border-radius: 99px;
}

.mobile-menu {
  display: none;
  padding: 0 18px 16px;
  border-top: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.96);
}

.mobile-menu.is-open {
  display: grid;
  gap: 8px;
}

.hero-carousel {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #050505;
}

.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-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.06) contrast(1.04);
}

.hero-slide.is-active .hero-bg {
  animation: heroZoom 8s ease forwards;
}

@keyframes heroZoom {
  from {
    transform: scale(1.08);
  }
  to {
    transform: scale(1.01);
  }
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 10, 10, 0.98) 0%, rgba(10, 10, 10, 0.82) 42%, rgba(10, 10, 10, 0.18) 100%),
    linear-gradient(0deg, #0a0a0a 0%, rgba(10, 10, 10, 0.18) 42%, rgba(10, 10, 10, 0.72) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  min-height: 70vh;
  margin: 0 auto;
  padding: 72px 24px 80px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 420px);
  align-items: center;
  gap: 50px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--gold-2);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 38px;
  height: 2px;
  border-radius: 99px;
  background: var(--gold);
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-shadow: 0 18px 54px rgba(0, 0, 0, 0.55);
}

.hero-copy h2 {
  margin: 18px 0 0;
  font-size: clamp(24px, 4vw, 42px);
  line-height: 1.12;
}

.hero-copy p {
  max-width: 680px;
  margin: 20px 0 0;
  color: #d4d4d4;
  font-size: 17px;
}

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

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

.hero-tags span,
.card-tags span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 999px;
  color: var(--gold-2);
  background: rgba(17, 17, 17, 0.72);
  backdrop-filter: blur(10px);
}

.hero-tags span {
  padding: 7px 12px;
  font-size: 13px;
}

.card-tags span,
.detail-tags span {
  padding: 4px 8px;
  font-size: 12px;
}

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

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 13px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.btn-primary {
  color: #111111;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  box-shadow: 0 14px 38px rgba(245, 158, 11, 0.25);
}

.btn-secondary,
.btn-ghost {
  color: #f5f5f5;
  border: 1px solid rgba(245, 158, 11, 0.38);
  background: rgba(23, 23, 23, 0.7);
  backdrop-filter: blur(14px);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 28px;
  background: #171717;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.52);
}

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

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

.hero-mini {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 20px;
  background: rgba(10, 10, 10, 0.78);
  backdrop-filter: blur(18px);
}

.hero-mini strong {
  display: block;
  font-size: 20px;
}

.hero-mini span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 26px;
  width: min(1240px, calc(100% - 48px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-buttons {
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

.hero-button {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 999px;
  color: #f5f5f5;
  background: rgba(23, 23, 23, 0.72);
  backdrop-filter: blur(12px);
}

.hero-dots {
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.hero-dot {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
}

.hero-dot.is-active {
  background: var(--gold);
}

.section,
.page-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 64px 24px 0;
}

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

.section-kicker {
  color: var(--gold-2);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.section h1,
.section h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  letter-spacing: -0.04em;
}

.section h2,
.page-hero h1,
.detail-title h1 {
  font-size: clamp(30px, 4.4vw, 48px);
  line-height: 1.08;
}

.section-header p,
.page-hero p,
.detail-title p {
  margin: 12px 0 0;
  color: var(--muted);
  max-width: 720px;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, #171717, #101010);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(245, 158, 11, 0.76);
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #111111;
}

.movie-card.is-compact .poster-link {
  aspect-ratio: 3 / 4;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 18%, rgba(0, 0, 0, 0.72) 100%);
  opacity: 0.88;
}

.play-chip,
.rank-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  min-width: 56px;
  height: 34px;
  color: #111111;
  background: var(--gold);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-chip {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  left: 12px;
  top: 12px;
  width: 42px;
  height: 42px;
  color: #111111;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.card-body {
  padding: 16px;
}

.card-body h2 {
  margin: 12px 0 0;
  font-size: 18px;
  line-height: 1.28;
}

.card-body p {
  min-height: 46px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  color: #c7c7c7;
  font-size: 13px;
}

.meta-line span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #222222;
}

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

.category-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #151515;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.72);
  box-shadow: var(--shadow);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.category-card:hover img {
  transform: scale(1.08);
}

.category-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.86));
}

.category-name,
.category-desc {
  position: absolute;
  left: 18px;
  right: 18px;
}

.category-name {
  bottom: 58px;
  font-size: 24px;
  font-weight: 900;
}

.category-desc {
  bottom: 20px;
  color: #d7d7d7;
  font-size: 13px;
}

.page-hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 66px 24px 20px;
}

.page-hero-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 42px;
  background:
    radial-gradient(circle at 18% 18%, rgba(245, 158, 11, 0.18), transparent 32%),
    linear-gradient(135deg, #171717, #0d0d0d);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  margin-top: 24px;
}

.search-input,
.filter-select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #303030;
  border-radius: 14px;
  outline: none;
  color: #f5f5f5;
  background: rgba(10, 10, 10, 0.68);
}

.search-input {
  padding: 0 16px;
}

.filter-select {
  padding: 0 38px 0 14px;
}

.search-input:focus,
.filter-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.detail-hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 34px 24px 0;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--gold-2);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 420px);
  gap: 30px;
  align-items: start;
}

.player-card,
.detail-side,
.text-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(17, 17, 17, 0.86);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

.player-card {
  overflow: hidden;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #111111;
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.player-cover[hidden] {
  display: none;
}

.player-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.18), transparent 38%);
}

.player-cover span {
  position: relative;
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  box-shadow: 0 20px 52px rgba(245, 158, 11, 0.32);
  font-size: 34px;
  transform: translateZ(0);
}

.player-info {
  padding: 18px 20px 22px;
}

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

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

.detail-title {
  margin-bottom: 22px;
}

.detail-title .meta-line {
  margin-top: 18px;
}

.detail-side {
  overflow: hidden;
}

.detail-side img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.side-body {
  padding: 20px;
}

.side-body h2 {
  margin: 0 0 12px;
}

.text-panel {
  max-width: 1240px;
  margin: 30px auto 0;
  padding: 28px;
}

.text-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.text-panel p {
  margin: 0 0 18px;
  color: #d8d8d8;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 110px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background: #131313;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, 0.72);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: #111111;
  background: var(--gold);
  font-weight: 950;
}

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

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

.rank-row p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.site-footer {
  margin-top: 74px;
  border-top: 1px solid var(--line);
  background: #080808;
}

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 44px 24px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 28px;
}

.footer-brand {
  color: var(--gold-2);
  font-size: 22px;
  font-weight: 900;
}

.footer-grid p {
  color: var(--muted);
}

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

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

.footer-grid a:hover {
  color: var(--gold-2);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 24px;
  color: #737373;
  text-align: center;
}

.empty-state {
  display: none;
  border: 1px dashed #404040;
  border-radius: 18px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

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

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

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

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

@media (max-width: 760px) {
  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .brand-text span {
    font-size: 17px;
  }

  .hero-inner {
    padding: 48px 18px 100px;
  }

  .hero-poster {
    display: none;
  }

  .hero-controls {
    width: calc(100% - 36px);
    bottom: 18px;
  }

  .section,
  .page-section,
  .page-hero,
  .detail-hero {
    padding-left: 18px;
    padding-right: 18px;
  }

  .section-header,
  .toolbar {
    grid-template-columns: 1fr;
    display: grid;
  }

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

  .page-hero-panel {
    padding: 28px;
  }

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

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

  .rank-row img {
    width: 86px;
    height: 62px;
  }

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

@media (max-width: 480px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

  .hero-copy h2 {
    font-size: 24px;
  }

  .btn-primary,
  .btn-secondary,
  .btn-ghost {
    width: 100%;
  }
}
