:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: #0f172a;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #f59e0b;
  --accent-2: #fbbf24;
  --danger: #ef4444;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.14), transparent 32rem),
    radial-gradient(circle at 85% 8%, rgba(56, 189, 248, 0.12), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(1200px, 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.78);
  backdrop-filter: blur(18px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 14px 32px rgba(245, 158, 11, 0.25);
}

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

.nav-links a {
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--soft);
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.12);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.92);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: var(--text);
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.05);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.58) 46%, rgba(2, 6, 23, 0.2)),
    linear-gradient(0deg, #020617 0%, transparent 46%);
}

.hero-content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: clamp(92px, 13vh, 140px);
}

.hero-kicker,
.eyebrow {
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 820px;
  margin: 10px 0 0;
  font-size: clamp(38px, 7vw, 82px);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: -0.055em;
}

.hero-content h2 {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--accent-2);
  font-size: clamp(24px, 3vw, 42px);
  line-height: 1.1;
  font-weight: 900;
}

.hero-content p {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--soft);
  font-size: clamp(15px, 1.5vw, 18px);
}

.hero-tags,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-tags span,
.chip-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.1);
  font-size: 12px;
  font-weight: 800;
}

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

.primary-button,
.secondary-button,
.ghost-link,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.secondary-button,
.ghost-link,
.section-more {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.74);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-link:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateX(-50%);
  pointer-events: none;
}

.hero-arrow,
.hero-dots button {
  pointer-events: auto;
}

.hero-arrow {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(12px);
}

.hero-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.42);
  cursor: pointer;
}

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

.section-block {
  padding: clamp(44px, 7vw, 88px) 0;
}

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

.section-heading.inside {
  width: 100%;
}

.section-heading h2,
.category-section h2,
.content-card h2 {
  margin: 0;
  font-size: clamp(26px, 3.4vw, 42px);
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -0.035em;
}

.eyebrow {
  margin: 0 0 8px;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #020617);
}

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

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

.poster-shadow {
  position: absolute;
  inset: auto 0 0;
  height: 54%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent);
}

.poster-pill {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #111827;
  background: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.movie-card h3,
.rank-info h3 {
  margin: 8px 0 8px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.28;
  font-weight: 950;
}

.movie-card p,
.rank-info p,
.page-hero p,
.footer-grid p,
.content-card p {
  color: var(--soft);
}

.movie-card p {
  min-height: 52px;
  margin: 0;
  font-size: 14px;
}

.compact-card .movie-card-body {
  padding: 14px;
}

.compact-card h3 {
  font-size: 16px;
}

.compact-card p {
  min-height: 46px;
  font-size: 13px;
}

.slate-panel-wrap {
  padding-top: 16px;
  padding-bottom: 16px;
}

.slate-panel {
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 15% 0%, rgba(245, 158, 11, 0.18), transparent 34rem),
    rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.category-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.category-cloud a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(2, 6, 23, 0.35);
  font-weight: 850;
  transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.category-cloud a:hover {
  color: #fff;
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.46);
}

.large-cloud {
  margin-top: 16px;
}

.category-section {
  margin-bottom: 38px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.54);
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 9vw, 132px) 0 clamp(54px, 7vw, 88px);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 12% 0%, rgba(245, 158, 11, 0.18), transparent 32rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.96));
}

.compact-page-hero h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.compact-page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  font-size: 17px;
}

.filter-panel {
  position: sticky;
  top: 86px;
  z-index: 40;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(18px);
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.9);
  padding: 0 14px;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(245, 158, 11, 0.58);
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 86px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.7);
}

.compact-rank .rank-row:nth-child(n + 6) {
  display: none;
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  color: #111827;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  font-size: 20px;
  font-weight: 950;
}

.rank-thumb {
  overflow: hidden;
  width: 86px;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  background: #0f172a;
}

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

.rank-info p {
  margin: 0 0 8px;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: flex-end;
  padding: 86px 0 64px;
  background-image: var(--cover);
  background-size: cover;
  background-position: center;
}

.detail-hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.74) 48%, rgba(2, 6, 23, 0.38)),
    linear-gradient(0deg, #020617 0%, transparent 50%);
  backdrop-filter: blur(2px);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: clamp(24px, 5vw, 54px);
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  box-shadow: var(--shadow);
  background: #0f172a;
}

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

.detail-copy h1 {
  max-width: 900px;
  margin: 6px 0 0;
  font-size: clamp(34px, 5.8vw, 72px);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.detail-intro {
  max-width: 850px;
  color: var(--soft);
  font-size: 18px;
}

.player-section {
  padding-top: 36px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.26);
  border-radius: 32px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-player,
.play-overlay,
.play-overlay img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-player {
  z-index: 1;
  background: #000;
}

.play-overlay {
  z-index: 3;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #000;
}

.play-overlay img {
  object-fit: cover;
  opacity: 0.48;
}

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

.play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(76px, 10vw, 118px);
  height: clamp(76px, 10vw, 118px);
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 24px 70px rgba(245, 158, 11, 0.42);
  transform: translate(-50%, -50%);
}

.play-button span {
  margin-left: 6px;
  font-size: clamp(28px, 4vw, 46px);
}

.detail-body {
  padding-top: 28px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 0.9fr;
  gap: 20px;
}

.content-card {
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.7);
}

.content-card h2 {
  margin-bottom: 14px;
  font-size: 26px;
}

.content-card p {
  margin: 0;
}

.info-card dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

.info-card div {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
}

.info-card dt {
  color: var(--muted);
  font-weight: 900;
}

.info-card dd {
  margin: 0;
  color: var(--text);
}

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

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

.footer-logo {
  margin-bottom: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 10px;
}

.footer-links a {
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
}

.footer-bottom {
  padding: 18px 0 28px;
  color: var(--muted);
  font-size: 14px;
}

.is-filtered-out {
  display: none !important;
}

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

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

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

@media (max-width: 820px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(2, 6, 23, 0.94);
  }

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

  .nav-links a {
    text-align: center;
  }

  .hero {
    min-height: 640px;
  }

  .hero-content {
    padding-bottom: 112px;
  }

  .hero-controls {
    bottom: 22px;
  }

  .section-heading,
  .footer-grid {
    align-items: start;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

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

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

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

  .rank-row .ghost-link {
    grid-column: 2 / 4;
    width: 100%;
  }

  .rank-number {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 16px;
  }

  .rank-thumb {
    width: 70px;
  }

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

  .detail-poster {
    width: min(260px, 72vw);
  }
}

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

  .movie-grid,
  .home-grid,
  .all-movie-grid {
    grid-template-columns: 1fr;
  }

  .movie-card {
    display: grid;
    grid-template-columns: 120px 1fr;
  }

  .movie-poster {
    height: 100%;
    min-height: 178px;
  }

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

  .category-section,
  .slate-panel,
  .content-card {
    border-radius: 22px;
    padding: 22px;
  }
}
