:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-solid: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --accent: #f59e0b;
  --accent-2: #fbbf24;
  --accent-dark: #92400e;
  --green: #10b981;
  --rose: #fb7185;
  --cyan: #22d3ee;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body.is-locked {
  overflow: hidden;
}

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

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.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(2, 6, 23, 0.78);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

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

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

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

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--accent-2);
  background: rgba(245, 158, 11, 0.11);
  transform: translateY(-1px);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.mobile-menu-button span,
.mobile-menu-button span::before,
.mobile-menu-button span::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
  content: "";
}

.mobile-menu-button span::before {
  transform: translateY(-6px);
}

.mobile-menu-button span::after {
  transform: translateY(4px);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.24;
  filter: saturate(1.12);
}

.hero-slide::before,
.detail-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.84) 42%, rgba(146, 64, 14, 0.35) 100%),
    radial-gradient(circle at 72% 26%, rgba(245, 158, 11, 0.22), transparent 25rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 42px;
  padding: 76px 0 96px;
}

.hero-eyebrow,
.section-eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--accent-2);
  background: rgba(245, 158, 11, 0.1);
  font-size: 13px;
  font-weight: 800;
}

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

.hero-title-gradient {
  color: transparent;
  background: linear-gradient(135deg, #ffffff 8%, #fde68a 48%, #f59e0b 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-summary {
  max-width: 760px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.82;
}

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

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 850;
  line-height: 1;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

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

.button-primary {
  color: #111827;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.24);
}

.button-ghost {
  color: var(--text);
  border-color: var(--line);
  background: rgba(15, 23, 42, 0.62);
}

.button-ghost:hover {
  border-color: rgba(245, 158, 11, 0.42);
  color: var(--accent-2);
}

.hero-poster-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.64);
  box-shadow: var(--shadow);
}

.hero-poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(135deg, #111827, #2b1705);
}

.hero-card-caption {
  position: absolute;
  inset: auto 14px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 14px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(14px);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(-50%);
}

.hero-dot,
.hero-arrow {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 99px;
  padding: 0;
}

.hero-dot.is-active {
  width: 32px;
  background: var(--accent);
}

.hero-arrow {
  width: 40px;
  height: 40px;
  border-radius: 999px;
}

.section {
  padding: 70px 0;
}

.section-compact {
  padding: 42px 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-subtitle {
  max-width: 680px;
  margin: 12px 0 0;
  color: var(--subtle);
  line-height: 1.75;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.18);
  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 24px 64px rgba(0, 0, 0, 0.34);
  transform: translateY(-5px);
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.2), transparent 40%),
    linear-gradient(145deg, #111827, #020617);
}

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

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

.cover-missing {
  opacity: 0;
}

.badge-row,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--accent-2);
  background: rgba(245, 158, 11, 0.1);
  font-size: 12px;
  font-weight: 800;
}

.badge-soft {
  border-color: rgba(148, 163, 184, 0.18);
  color: var(--muted);
  background: rgba(148, 163, 184, 0.08);
}

.score-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 7px 9px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.24);
}

.card-body {
  padding: 14px;
}

.card-title {
  display: -webkit-box;
  min-height: 44px;
  margin: 0;
  overflow: hidden;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-desc {
  display: -webkit-box;
  margin: 10px 0 0;
  overflow: hidden;
  color: var(--subtle);
  font-size: 13px;
  line-height: 1.65;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.meta-row {
  margin-top: 10px;
  color: var(--subtle);
  font-size: 12px;
}

.feature-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-pad {
  padding: 24px;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  align-items: center;
  margin-bottom: 26px;
}

.search-input,
.select-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 16px;
  color: var(--text);
  outline: none;
  background: rgba(2, 6, 23, 0.62);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.category-cloud,
.category-grid {
  display: grid;
  gap: 14px;
}

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

.category-card {
  display: flex;
  min-height: 132px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 20px;
  color: var(--text);
  background:
    radial-gradient(circle at 100% 0%, rgba(245, 158, 11, 0.16), transparent 50%),
    rgba(15, 23, 42, 0.7);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-card strong {
  font-size: 20px;
}

.category-card span {
  color: var(--subtle);
  font-size: 13px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 48px 72px 1fr auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 10px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.62);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  border-color: rgba(245, 158, 11, 0.42);
  transform: translateY(-2px);
}

.rank-no {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  font-weight: 950;
}

.rank-cover img {
  width: 72px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
  background: linear-gradient(145deg, #111827, #020617);
}

.rank-title {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
}

.rank-desc {
  display: -webkit-box;
  margin: 6px 0 0;
  overflow: hidden;
  color: var(--subtle);
  font-size: 13px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-score {
  color: var(--accent-2);
  font-size: 18px;
  font-weight: 950;
}

.page-hero {
  position: relative;
  padding: 80px 0 46px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.page-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 12% 12%, rgba(245, 158, 11, 0.17), transparent 28rem),
    radial-gradient(circle at 90% 20%, rgba(34, 211, 238, 0.11), transparent 24rem);
}

.page-hero .container {
  position: relative;
  z-index: 2;
}

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

.breadcrumb a {
  color: var(--accent-2);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 36px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 30px;
  background: linear-gradient(145deg, #111827, #020617);
  box-shadow: var(--shadow);
}

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

.detail-title {
  margin: 0;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.detail-one-line {
  max-width: 820px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.85;
}

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--text);
  background:
    radial-gradient(circle at center, rgba(245, 158, 11, 0.18), transparent 18rem),
    rgba(2, 6, 23, 0.42);
  cursor: pointer;
}

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

.play-button-core {
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 24px 60px rgba(245, 158, 11, 0.38);
  font-size: 34px;
  transform: translateZ(0);
  transition: transform 0.2s ease;
}

.play-overlay:hover .play-button-core {
  transform: scale(1.06);
}

.player-message {
  margin-top: 10px;
  color: var(--subtle);
  font-size: 13px;
}

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

.info-list div {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

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

.info-list dd {
  margin: 0;
  color: var(--text);
  font-weight: 750;
}

.article-content {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.95;
}

.article-content p {
  margin: 0 0 18px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 42px 0;
  color: var(--subtle);
  background: rgba(2, 6, 23, 0.76);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 24px;
}

.footer h2,
.footer h3 {
  margin: 0 0 12px;
  color: var(--text);
}

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

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

.empty-state {
  display: none;
  border: 1px dashed rgba(148, 163, 184, 0.26);
  border-radius: 22px;
  padding: 32px;
  color: var(--subtle);
  text-align: center;
}

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

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

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

@media (max-width: 920px) {
  .nav-links {
    position: fixed;
    top: 72px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 12px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

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

  .mobile-menu-button {
    display: inline-flex;
  }

  .hero {
    min-height: 720px;
  }

  .hero-content,
  .detail-layout,
  .watch-layout,
  .feature-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster-card,
  .detail-poster {
    max-width: 280px;
  }

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

  .search-panel {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 38px 62px 1fr;
  }

  .rank-score {
    grid-column: 3;
    width: fit-content;
  }
}

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

  .hero {
    min-height: 680px;
  }

  .hero-content {
    gap: 24px;
    padding: 44px 0 88px;
  }

  .hero-summary,
  .detail-one-line {
    font-size: 16px;
  }

  .section {
    padding: 48px 0;
  }

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

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

  .card-body {
    padding: 12px;
  }

  .detail-layout {
    gap: 24px;
  }

  .watch-layout {
    gap: 16px;
  }

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

  .rank-item {
    grid-template-columns: 34px 58px 1fr;
    gap: 10px;
  }

  .rank-cover img {
    width: 58px;
    height: 78px;
  }
}
