:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-solid: #0f172a;
  --panel-soft: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.16);
  --cyan: #22d3ee;
  --rose: #fb7185;
  --emerald: #34d399;
  --shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(
      circle at 10% 5%,
      rgba(245, 158, 11, 0.18),
      transparent 30%
    ),
    radial-gradient(
      circle at 92% 12%,
      rgba(34, 211, 238, 0.14),
      transparent 28%
    ),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  color: var(--text);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

body.menu-open {
  overflow: hidden;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.header-inner,
.footer-inner,
.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  color: #0f172a;
  background: linear-gradient(135deg, var(--amber), #fde68a);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

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

.main-nav a,
.mobile-nav a {
  padding: 10px 13px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  transition: 0.2s ease;
}

.main-nav a:hover,
.mobile-nav a:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.14);
}

.header-search {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.header-search input,
.filter-input {
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.52);
  outline: none;
}

.header-search input:focus,
.filter-input:focus {
  border-color: rgba(245, 158, 11, 0.75);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.13);
}

.search-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 70;
  width: min(620px, calc(100vw - 32px));
  max-height: 70vh;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
  padding: 12px;
}

.search-hit {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  transition: 0.2s ease;
}

.search-hit:hover {
  background: rgba(148, 163, 184, 0.12);
}

.search-hit img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.08);
}

.search-hit strong {
  display: block;
  margin-bottom: 4px;
}

.search-hit span,
.empty-search {
  color: var(--subtle);
  font-size: 13px;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: var(--text);
  background: rgba(148, 163, 184, 0.14);
}

.mobile-nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.78);
}

.page-shell {
  padding: 36px 0 68px;
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  background-position: center;
  background-size: cover;
  transition: opacity 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(2, 6, 23, 0.96) 0%,
      rgba(15, 23, 42, 0.75) 45%,
      rgba(15, 23, 42, 0.22) 100%
    ),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.2) 42%, transparent 100%);
}

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 120px 0 86px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 12px;
  border: 1px solid rgba(245, 158, 11, 0.26);
  border-radius: 999px;
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.12);
  font-size: 13px;
  font-weight: 800;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 7vw, 88px);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 700px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

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

.button,
.mini-button,
.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  color: #0f172a;
  background: linear-gradient(135deg, var(--amber), #fde68a);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(245, 158, 11, 0.23);
}

.button.secondary,
.play-button.secondary {
  color: var(--text);
  background: rgba(148, 163, 184, 0.14);
  box-shadow: none;
}

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

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

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

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 58px 0 22px;
}

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

.section-head p,
.page-title p,
.detail-title p {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--subtle);
  line-height: 1.8;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.38);
  box-shadow: 0 24px 80px rgba(245, 158, 11, 0.12);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.08);
}

.poster-wrap img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-year,
.rank-num {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #0f172a;
  background: #fcd34d;
  font-size: 12px;
  font-weight: 900;
}

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

.meta-line {
  color: var(--subtle);
  font-size: 13px;
}

.movie-card h3,
.rank-copy h3,
.related-copy h3 {
  margin: 8px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p,
.rank-copy p,
.related-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

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

.tag-row span,
.detail-tags span {
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 999px;
  padding: 5px 9px;
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.08);
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  min-height: 170px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(34, 211, 238, 0.08)),
    rgba(15, 23, 42, 0.72);
  transition: 0.25s ease;
}

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

.category-card h3 {
  margin: 0 0 12px;
  font-size: 21px;
}

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

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

.rank-row {
  position: relative;
  display: grid;
  grid-template-columns: 60px 90px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.rank-row .rank-num {
  position: static;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  padding: 0;
  font-size: 16px;
}

.rank-cover img {
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  object-fit: cover;
  background: rgba(148, 163, 184, 0.08);
}

.page-title,
.detail-title {
  padding: 28px 0 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--subtle);
  font-size: 14px;
}

.breadcrumb a {
  color: #fcd34d;
}

.category-section {
  margin-top: 34px;
  padding-top: 8px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 360px;
  gap: 24px;
  align-items: start;
}

.player-card,
.detail-card,
.side-card {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.player-stage {
  position: relative;
  background: #000;
}

.player-stage video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  display: block;
}

.play-gate {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--text);
  background: linear-gradient(
    180deg,
    rgba(2, 6, 23, 0.22),
    rgba(2, 6, 23, 0.8)
  );
  cursor: pointer;
}

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

.play-icon {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 999px;
  color: #0f172a;
  background: linear-gradient(135deg, var(--amber), #fde68a);
  font-size: 36px;
  box-shadow: 0 18px 50px rgba(245, 158, 11, 0.32);
}

.player-copy,
.detail-card,
.side-card {
  padding: 22px;
}

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

.detail-meta span {
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.12);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}

.prose {
  color: var(--muted);
  line-height: 1.9;
  font-size: 16px;
}

.prose h2 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 24px;
}

.prose p {
  margin: 0 0 16px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.28);
}

.related-item img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.08);
}

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

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 34px 0;
  color: var(--subtle);
}

.footer-links {
  display: flex;
  gap: 14px;
  color: var(--muted);
}

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

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

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

@media (max-width: 760px) {
  .header-inner {
    min-height: auto;
    padding: 12px 0;
    flex-wrap: wrap;
  }

  .main-nav {
    display: none;
  }

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

  .header-search {
    flex-basis: 100%;
    order: 3;
  }

  .hero {
    min-height: 580px;
  }

  .hero-content {
    padding: 92px 0 72px;
  }

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

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

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

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

  .rank-row .mini-button {
    grid-column: 2 / 4;
  }

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

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

  .rank-copy p,
  .movie-card p {
    display: none;
  }
}
