:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-strong: rgba(255, 255, 255, 0.1);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --dim: #94a3b8;
  --accent: #facc15;
  --accent-strong: #f59e0b;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 12% 0%, rgba(250, 204, 21, 0.14), transparent 28rem),
    radial-gradient(circle at 86% 12%, rgba(59, 130, 246, 0.16), transparent 24rem),
    linear-gradient(180deg, #0f172a 0%, #020617 42%, #000 100%);
}

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(22px);
}

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

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #111827;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), #fff7ad);
  box-shadow: 0 10px 32px rgba(250, 204, 21, 0.28);
}

.brand-text strong,
.footer-brand {
  display: block;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #fde68a, #fef9c3, #f59e0b);
  -webkit-background-clip: text;
  color: transparent;
}

.brand-text small {
  display: block;
  margin-top: 1px;
  color: var(--dim);
  font-size: 12px;
}

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

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

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

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: var(--panel);
  padding: 8px 11px;
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(310px, 30vw);
}

.top-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 11px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(250, 204, 21, 0.7);
  box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.12);
  background: rgba(255, 255, 255, 0.12);
}

.top-search button,
.btn,
.section-more,
.pager-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.top-search button,
.btn.primary {
  color: #111827;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.25);
}

.top-search button:hover,
.btn:hover,
.section-more:hover,
.pager-links a:hover {
  transform: translateY(-2px);
}

.btn.ghost,
.section-more,
.pager-links a {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
}

.hero-section {
  padding: 34px 0 48px;
}

.hero-shell {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 720px;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 56px);
  border: 1px solid var(--line);
  border-radius: 34px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.86)),
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.22), transparent 22rem);
  box-shadow: var(--shadow);
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-shell > h1,
.page-hero h1 {
  max-width: 760px;
  margin: 16px 0 12px;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-intro,
.page-hero p {
  max-width: 720px;
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.hero-slider {
  position: relative;
  min-height: 430px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
  gap: clamp(24px, 4vw, 54px);
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.985);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.hero-backdrop {
  position: absolute;
  inset: -56px;
  z-index: -1;
  background-size: cover;
  background-position: center;
  filter: saturate(1.08);
}

.hero-copy h2 {
  margin: 12px 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero-one {
  max-width: 680px;
  margin: 0 0 14px;
  color: #fef3c7;
  font-size: 20px;
  line-height: 1.65;
}

.hero-summary {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.8;
}

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

.tag-row span,
.tag-cloud span,
.detail-meta span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(250, 204, 21, 0.24);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(250, 204, 21, 0.1);
  padding: 5px 10px;
  font-size: 12px;
  line-height: 1;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-poster,
.detail-cover,
.poster,
.rank-cover {
  position: relative;
  overflow: hidden;
  background-color: #111827;
  background-size: cover;
  background-position: center;
}

.hero-poster {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  min-height: 420px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.48);
}

.hero-poster::after,
.poster::after,
.detail-cover::after,
.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(2, 6, 23, 0.78) 100%);
}

.hero-poster span,
.poster-play,
.detail-cover span {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  color: #111827;
  background: rgba(250, 204, 21, 0.92);
  box-shadow: 0 20px 50px rgba(250, 204, 21, 0.24);
}

.hero-controls {
  position: absolute;
  left: clamp(28px, 4vw, 56px);
  right: clamp(28px, 4vw, 56px);
  bottom: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.hero-controls > button,
.hero-dots button {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.hero-controls > button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
}

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

.hero-dots button {
  width: 32px;
  height: 8px;
  border-radius: 99px;
  padding: 0;
}

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

.section-block {
  padding: 44px 0;
}

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

.section-head h2,
.rank-copy-main h2,
.story-block h2,
.side-panel h2 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
}

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

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

.category-tile {
  position: relative;
  display: flex;
  min-height: 180px;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background-color: var(--bg-soft);
  background-size: cover;
  background-position: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile > * {
  position: relative;
  z-index: 2;
}

.category-tile span {
  color: var(--accent);
  font-weight: 900;
}

.category-tile strong {
  font-size: 18px;
  line-height: 1.55;
}

.category-tile em {
  color: var(--muted);
  font-style: normal;
}

.category-tile:hover,
.movie-card:hover {
  border-color: rgba(250, 204, 21, 0.48);
  transform: translateY(-6px);
}

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

.movie-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card.is-hidden {
  display: none;
}

.movie-card.compact .poster {
  aspect-ratio: 16 / 10;
}

.poster {
  display: block;
  aspect-ratio: 16 / 10.5;
}

.poster-badge {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 12px;
  border-radius: 999px;
  color: #111827;
  background: var(--accent);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
}

.poster-play {
  position: absolute;
  z-index: 3;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: scale(1);
}

.movie-info {
  padding: 16px;
}

.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.movie-info h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-info h3 a:hover {
  color: var(--accent);
}

.movie-info p {
  min-height: 48px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.ranking-section {
  margin-top: 24px;
  background:
    radial-gradient(circle at 14% 18%, rgba(250, 204, 21, 0.16), transparent 25rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(300px, 1fr);
  gap: 34px;
  align-items: start;
}

.rank-copy-main p {
  color: var(--muted);
  line-height: 1.8;
}

.rank-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.rank-list a {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.055);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-list a:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.rank-list span {
  color: var(--accent);
  font-size: 20px;
  font-weight: 900;
}

.rank-list small,
.rank-copy small {
  color: var(--dim);
}

.page-hero {
  padding: 54px 0 30px;
}

.compact-hero {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(2, 6, 23, 0));
}

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

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

.breadcrumb b {
  color: var(--text);
  font-weight: 700;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 190px 190px;
  gap: 14px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(255, 255, 255, 0.055);
}

.filter-panel label {
  display: grid;
  gap: 8px;
}

.filter-panel span {
  color: var(--dim);
  font-size: 13px;
}

.empty-state {
  display: none;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  padding: 34px;
  margin-bottom: 20px;
}

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

.detail-hero {
  padding: 34px 0 10px;
}

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

.detail-main,
.detail-side,
.side-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: var(--shadow);
}

.detail-main {
  overflow: hidden;
}

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

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  cursor: pointer;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #111827;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.62));
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-start span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 24px 70px rgba(250, 204, 21, 0.35);
  font-size: 32px;
  transform: translateX(3px);
}

.player-start.is-hidden,
.player-shell.is-playing .player-start {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-shell.has-error .player-start span {
  width: auto;
  min-width: 220px;
  border-radius: 999px;
  padding: 0 22px;
  font-size: 15px;
  transform: none;
}

.detail-copy {
  padding: clamp(20px, 3vw, 34px);
}

.detail-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.detail-lead {
  color: #fef3c7;
  font-size: 19px;
  line-height: 1.75;
}

.story-block {
  margin-top: 28px;
}

.story-block h2,
.side-panel h2 {
  font-size: 24px;
}

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

.tag-cloud {
  margin-top: 28px;
}

.detail-side {
  position: sticky;
  top: 92px;
  padding: 16px;
}

.detail-cover {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  margin-bottom: 16px;
}

.side-panel {
  padding: 18px;
  box-shadow: none;
}

.rank-stack {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.rank-item {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.rank-cover {
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
}

.rank-copy strong {
  display: block;
  line-height: 1.35;
}

.rank-copy small {
  display: block;
  margin-top: 5px;
  line-height: 1.45;
}

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

.pager-links {
  display: flex;
  gap: 10px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 34px;
  padding: 40px 0;
}

.site-footer p,
.site-footer a {
  color: var(--muted);
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 14px;
}

.site-footer a {
  display: block;
  margin: 7px 0;
}

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

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

@media (max-width: 1024px) {
  .top-search {
    width: min(260px, 28vw);
  }

  .hero-shell {
    min-height: 760px;
  }

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

  .hero-poster {
    min-height: 320px;
    aspect-ratio: 16 / 9;
  }

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

  .detail-side {
    position: static;
  }
}

@media (max-width: 780px) {
  .header-inner {
    flex-wrap: wrap;
    min-height: 66px;
    padding: 10px 0;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .nav-links {
    order: 4;
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.95);
    padding: 8px;
  }

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

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

  .top-search {
    order: 3;
    width: 100%;
  }

  .hero-shell {
    min-height: 810px;
    padding: 24px;
    border-radius: 24px;
  }

  .hero-slide {
    gap: 20px;
  }

  .hero-controls {
    left: 24px;
    right: 24px;
  }

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

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

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

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

@media (max-width: 520px) {
  .brand-text small {
    display: none;
  }

  .hero-shell > h1,
  .page-hero h1 {
    font-size: 38px;
  }

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

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

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

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

  .rank-list small {
    grid-column: 2;
  }
}
