:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --line: #1e293b;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --accent-soft: rgba(245, 158, 11, 0.16);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.08), transparent 32rem), var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

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

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #fbbf24);
  color: #111827;
  font-weight: 900;
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.26);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-text em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

.nav-links a {
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--accent);
}

.menu-button {
  display: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  padding: 8px 12px;
}

.hero-slider {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.82) 36%, rgba(2, 6, 23, 0.28) 100%), linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 52%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 72vh;
  align-items: center;
}

.hero-copy {
  width: min(650px, 100%);
  padding: 86px 0 110px;
}

.eyebrow,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #fbbf24;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  padding: 8px 12px;
}

.hero-title {
  margin: 22px 0 20px;
  font-size: clamp(42px, 7vw, 76px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.hero-summary {
  max-width: 620px;
  margin: 0 0 30px;
  color: var(--muted-strong);
  font-size: 18px;
}

.hero-actions,
.section-head,
.card-meta,
.detail-meta,
.filter-bar,
.player-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #111827;
  font-weight: 900;
  padding: 10px 18px;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.button.is-ghost {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.65);
  color: var(--text);
}

.button.is-ghost:hover {
  border-color: rgba(245, 158, 11, 0.7);
  background: rgba(245, 158, 11, 0.1);
}

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

.hero-dots button {
  width: 42px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
  padding: 0;
}

.hero-dots button.is-active {
  background: var(--accent);
}

.section {
  padding: 64px 0;
}

.section.is-muted {
  background: rgba(15, 23, 42, 0.48);
  border-top: 1px solid rgba(30, 41, 59, 0.7);
  border-bottom: 1px solid rgba(30, 41, 59, 0.7);
}

.section-head {
  justify-content: space-between;
  margin-bottom: 26px;
}

.section-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 900;
  letter-spacing: -0.035em;
}

.section-desc {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
}

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

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

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

.movie-card {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.96));
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.16);
  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.6);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
  transform: translateY(-5px);
}

.card-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111827;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.card-rank {
  position: absolute;
  left: 12px;
  top: 12px;
  display: inline-grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.72);
  color: #fbbf24;
  font-size: 13px;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  margin: 12px 0 8px;
  overflow: hidden;
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-desc {
  display: -webkit-box;
  min-height: 45px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta,
.detail-meta {
  margin-top: auto;
  color: var(--muted);
  font-size: 13px;
}

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

.category-tile {
  min-height: 170px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.22), transparent 70%), linear-gradient(150deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
  padding: 22px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-tile h2,
.category-tile h3 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 900;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 116px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.82);
  padding: 12px;
}

.rank-number {
  color: #fbbf24;
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.rank-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: #111827;
}

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

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

.rank-info {
  color: var(--muted);
  font-size: 13px;
}

.page-hero {
  padding: 74px 0 34px;
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.15), transparent 32rem);
}

.page-hero h1 {
  max-width: 980px;
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: var(--muted-strong);
  font-size: 17px;
}

.filter-panel {
  position: sticky;
  top: 69px;
  z-index: 20;
  padding: 14px 0;
  background: rgba(2, 6, 23, 0.86);
  border-bottom: 1px solid rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(12px);
}

.filter-bar input,
.filter-bar select {
  min-height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  outline: none;
  background: rgba(15, 23, 42, 0.94);
  color: var(--text);
  padding: 0 14px;
}

.filter-bar input {
  flex: 1 1 280px;
}

.filter-bar select {
  flex: 0 0 150px;
}

.empty-state {
  display: none;
  border: 1px dashed rgba(148, 163, 184, 0.25);
  border-radius: 20px;
  color: var(--muted);
  padding: 28px;
  text-align: center;
}

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

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 26px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.play-trigger {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.94);
  color: #111827;
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  padding: 18px 30px;
  transform: translate(-50%, -50%);
  box-shadow: 0 20px 70px rgba(245, 158, 11, 0.26);
}

.play-trigger.is-hidden {
  display: none;
}

.detail-panel,
.side-panel {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.82);
  padding: 24px;
}

.detail-panel h2,
.side-panel h2 {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 900;
}

.detail-panel p {
  color: var(--muted-strong);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.tag-list span {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--muted-strong);
  font-size: 13px;
  padding: 7px 11px;
}

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

.side-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.side-card img {
  width: 112px;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  object-fit: cover;
}

.side-card strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.side-card span {
  color: var(--muted);
  font-size: 12px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #0f172a;
  color: var(--muted);
  padding: 38px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.7fr;
  gap: 28px;
}

.footer-grid h2,
.footer-grid h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.footer-grid p,
.footer-grid a {
  color: var(--muted);
  font-size: 14px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

@media (max-width: 1080px) {
  .movie-grid,
  .movie-grid.is-category {
    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,
  .container {
    width: min(100% - 24px, 1180px);
  }

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

  .nav-links {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
    padding: 16px;
  }

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

  .hero-slider,
  .hero-content {
    min-height: 78vh;
  }

  .hero-copy {
    padding: 74px 0 96px;
  }

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

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

  .rank-item {
    grid-template-columns: 42px 92px minmax(0, 1fr);
  }

  .rank-action {
    grid-column: 1 / -1;
  }

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

  .side-card {
    grid-template-columns: 98px minmax(0, 1fr);
  }

  .side-card img {
    width: 98px;
  }
}
