:root {
  --bg: #0a0a0a;
  --panel: #141414;
  --panel-soft: #1d1d1d;
  --line: #2a2a2a;
  --text: #f5f5f5;
  --muted: #a3a3a3;
  --dim: #737373;
  --gold: #f59e0b;
  --gold-soft: rgba(245, 158, 11, 0.16);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.14), transparent 34rem),
    linear-gradient(180deg, #101010 0%, var(--bg) 48%, #050505 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 10, 10, 0.78);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #111;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.28);
}

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

.desktop-nav,
.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link,
.mobile-link,
.footer-links a {
  color: #d4d4d4;
  border-radius: 12px;
  transition: 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
}

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

.menu-toggle {
  display: none;
  color: #f5f5f5;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.mobile-nav {
  display: none;
  padding: 0 20px 16px;
  gap: 8px;
}

.mobile-link {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
}

.main-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 20px 70px;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #080808;
}

.hero-track,
.hero-slide {
  min-height: 70vh;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  transition: opacity 0.75s ease, transform 1.2s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.62) 45%, rgba(0, 0, 0, 0.22) 100%),
    linear-gradient(0deg, #0a0a0a 0%, rgba(10, 10, 10, 0.12) 44%, rgba(10, 10, 10, 0.56) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  min-height: 70vh;
  padding: 110px 20px 80px;
  display: grid;
  align-content: center;
  max-width: 980px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  padding: 8px 12px;
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.38);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.hero h1 {
  margin: 24px 0 18px;
  font-size: clamp(38px, 7vw, 82px);
  line-height: 0.96;
  letter-spacing: -0.08em;
}

.hero p {
  max-width: 780px;
  color: #d4d4d4;
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-meta span,
.detail-meta span,
.rank-meta span {
  padding: 7px 10px;
  border-radius: 999px;
  color: #e5e5e5;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: 0.2s ease;
}

.btn-primary {
  color: #111;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 18px 38px rgba(245, 158, 11, 0.28);
}

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

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

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

.hero-arrow {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  color: #fff;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(12px);
}

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

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

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

.section {
  margin-top: 56px;
}

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

.section-title h2,
.page-title h1 {
  margin: 10px 0 8px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-title p,
.page-title p,
.category-card p,
.footer-inner p {
  color: var(--muted);
  line-height: 1.75;
}

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

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

.movie-card,
.category-card,
.rank-card,
.detail-panel,
.filter-panel,
.player-panel {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
  box-shadow: var(--shadow);
}

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  transition: 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(245, 158, 11, 0.7);
  transform: translateY(-5px);
  box-shadow: 0 28px 70px rgba(245, 158, 11, 0.12);
}

.movie-card.is-large {
  grid-column: span 2;
  grid-row: span 2;
}

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

.movie-card.is-large .poster-link {
  aspect-ratio: 16 / 11;
}

.poster-link img,
.detail-poster img,
.small-movie img,
.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img,
.small-movie:hover img,
.rank-card:hover .rank-cover img {
  transform: scale(1.07);
}

.poster-badge,
.poster-play,
.rank-index {
  position: absolute;
  z-index: 2;
}

.poster-badge {
  top: 12px;
  left: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  color: #111;
  background: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.poster-play {
  right: 12px;
  bottom: 12px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #111;
  background: rgba(245, 158, 11, 0.94);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.movie-info {
  padding: 16px;
}

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

.movie-meta,
.movie-line {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.movie-line {
  margin-top: 8px;
  color: #cfcfcf;
}

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

.tag-row span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #f8d28a;
  background: var(--gold-soft);
  font-size: 12px;
}

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

.category-card {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border-radius: var(--radius);
  transition: 0.22s ease;
}

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

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

.category-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--gold);
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border-radius: var(--radius);
  margin: 30px 0;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.24);
}

.search-box input {
  width: 100%;
  color: var(--text);
  border: 0;
  outline: 0;
  background: transparent;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.select-wrap select {
  min-height: 46px;
  color: #f5f5f5;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 0 12px;
  background: #101010;
}

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

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

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

.rank-card {
  position: relative;
  display: grid;
  grid-template-columns: 170px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 16px;
  border-radius: var(--radius);
  overflow: hidden;
}

.rank-cover {
  position: relative;
  height: 106px;
  overflow: hidden;
  border-radius: 16px;
  background: #111;
}

.rank-index {
  top: 12px;
  left: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #111;
  background: var(--gold);
  font-weight: 900;
}

.rank-body h2,
.rank-body h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

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

.rank-score {
  min-width: 96px;
  text-align: center;
  color: #111;
  border-radius: 18px;
  padding: 12px;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  font-weight: 900;
}

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

.breadcrumb a {
  color: #f8d28a;
}

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

.player-panel,
.detail-panel {
  border-radius: var(--radius);
  overflow: hidden;
}

.video-shell {
  position: relative;
  background: #000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #fff;
  border: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-circle {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #111;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 18px 44px rgba(245, 158, 11, 0.34);
  font-size: 26px;
}

.player-title {
  padding: 18px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.player-title h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.16;
}

.player-title p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.detail-panel {
  padding: 24px;
}

.detail-panel h2,
.side-section h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.detail-panel p {
  margin: 0 0 18px;
  color: #d4d4d4;
  line-height: 1.9;
}

.side-column {
  display: grid;
  gap: 20px;
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius);
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-poster img {
  aspect-ratio: 3 / 4;
}

.side-section {
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
}

.small-movie {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.small-movie:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.small-movie img {
  height: 64px;
  border-radius: 12px;
  background: #111;
}

.small-movie strong,
.small-movie em {
  display: block;
}

.small-movie strong {
  margin: 3px 0 6px;
  line-height: 1.35;
}

.small-movie em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #070707;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 34px 20px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand {
  margin-bottom: 10px;
  color: #fff;
  font-size: 20px;
}

.footer-links a {
  padding: 9px 12px;
}

@media (max-width: 1040px) {
  .movie-grid,
  .movie-grid.featured-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;
  }

  .side-column {
    grid-template-columns: minmax(220px, 320px) 1fr;
  }
}

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

  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .mobile-nav.is-open {
    display: grid;
  }

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

  .hero-content {
    padding-top: 92px;
  }

  .section-head,
  .footer-inner,
  .filter-panel {
    display: grid;
  }

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

  .filter-group {
    display: grid;
  }

  .select-wrap {
    justify-content: space-between;
  }

  .select-wrap select {
    width: 70%;
  }

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

  .movie-card.is-large {
    grid-column: span 2;
  }

  .rank-card {
    grid-template-columns: 112px 1fr;
  }

  .rank-score {
    grid-column: 1 / -1;
    text-align: left;
  }

  .rank-cover {
    height: 84px;
  }

  .side-column {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 500px) {
  .main-wrap {
    padding-left: 14px;
    padding-right: 14px;
  }

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

  .movie-card.is-large {
    grid-column: span 1;
  }

  .hero-controls {
    justify-content: center;
  }

  .hero-arrow {
    display: none;
  }
}
