:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-card-strong: rgba(15, 23, 42, 0.95);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --brand: #38bdf8;
  --brand-2: #0ea5e9;
  --accent: #f97316;
  --green: #22c55e;
  --radius: 22px;
  --shadow: 0 22px 70px rgba(2, 6, 23, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(14, 165, 233, 0.24), transparent 30rem),
    radial-gradient(circle at 92% 18%, rgba(249, 115, 22, 0.16), transparent 26rem),
    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;
  min-height: 100vh;
}

body.no-scroll {
  overflow: hidden;
}

img {
  display: block;
  max-width: 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: 40;
  background: rgba(2, 6, 23, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  font-size: 22px;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #00111f;
  box-shadow: 0 12px 35px rgba(56, 189, 248, 0.32);
}

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

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

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: rgba(56, 189, 248, 0.13);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.88);
  color: var(--text);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 9px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.8s ease, transform 1.2s ease;
  pointer-events: none;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

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

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.68) 42%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.2) 35%, rgba(2, 6, 23, 0.45) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 70vh;
  display: grid;
  align-items: center;
  padding: 112px 0 86px;
}

.hero-copy {
  width: min(680px, 100%);
}

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

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(40px, 7vw, 88px);
  line-height: 0.96;
  letter-spacing: -0.06em;
  text-shadow: 0 18px 70px rgba(0, 0, 0, 0.55);
}

.hero p {
  color: #dbeafe;
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.85;
  margin: 0 0 22px;
  max-width: 62ch;
}

.hero-meta,
.detail-meta,
.movie-card-tags,
.info-tags,
.badge-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta span,
.detail-meta span,
.movie-card-tags span,
.info-tags span,
.badge-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #dbeafe;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.58);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 800;
}

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

.btn,
.section-more,
.play-button,
.hero-dot,
.hero-arrow,
.filter-chip {
  border: 0;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #00111f;
  box-shadow: 0 16px 45px rgba(56, 189, 248, 0.28);
}

.btn-secondary {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.62);
}

.btn:hover,
.section-more:hover,
.play-button:hover {
  transform: translateY(-2px);
}

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

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

.hero-dot {
  width: 32px;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.38);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.hero-arrow {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.75);
}

.main-wrap {
  padding: 54px 0 76px;
}

.section {
  margin-top: 62px;
}

.section:first-child {
  margin-top: 0;
}

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

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

.section-heading p,
.page-title p,
.detail-title p {
  color: var(--muted);
  margin: 12px 0 0;
  line-height: 1.8;
}

.section-more {
  color: var(--brand);
  font-weight: 900;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.18);
  padding: 10px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

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

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

.movie-card {
  min-width: 0;
}

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

.movie-card-link {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.82));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 16px 45px rgba(2, 6, 23, 0.24);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card-link:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.42);
  box-shadow: 0 26px 70px rgba(2, 6, 23, 0.46);
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  margin: 0;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(15, 23, 42, 0.9));
  overflow: hidden;
}

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

.movie-card-link:hover img {
  transform: scale(1.06);
  filter: saturate(1.08);
}

.poster-year,
.rank-badge {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
}

.poster-year {
  right: 12px;
  background: rgba(2, 6, 23, 0.72);
  color: #dbeafe;
}

.rank-badge {
  left: 12px;
  background: linear-gradient(135deg, var(--accent), #facc15);
  color: #1f1300;
}

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

.movie-card-tags {
  gap: 6px;
}

.movie-card-tags span {
  padding: 5px 8px;
  font-size: 11px;
}

.movie-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.movie-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  flex: 1;
}

.movie-card-meta {
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.5;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 174px;
  border-radius: var(--radius);
  padding: 20px;
  background:
    radial-gradient(circle at 86% 12%, rgba(56, 189, 248, 0.32), transparent 38%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.86));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.4);
}

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

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

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.filter-panel {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 24px;
  box-shadow: 0 16px 45px rgba(2, 6, 23, 0.25);
}

.filter-controls {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 14px;
}

.search-box,
.select-box {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}

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

.search-box input:focus,
.select-box select:focus {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.filter-chip {
  border-radius: 999px;
  padding: 9px 13px;
  color: var(--muted);
  background: rgba(2, 6, 23, 0.42);
  border: 1px solid var(--line);
  font-weight: 800;
}

.filter-chip:hover,
.filter-chip.active {
  color: var(--text);
  background: rgba(56, 189, 248, 0.13);
  border-color: rgba(56, 189, 248, 0.34);
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.8fr);
  gap: 24px;
}

.rank-panel,
.detail-panel,
.info-panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.rank-panel {
  padding: 18px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: auto 54px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
  background: rgba(56, 189, 248, 0.09);
  border-color: rgba(56, 189, 248, 0.18);
}

.list-rank {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  color: #00111f;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  font-weight: 900;
}

.rank-row img {
  width: 54px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-title {
  font-weight: 900;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.page-hero {
  padding: 70px 0 38px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 14% 18%, rgba(56, 189, 248, 0.18), transparent 34rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(2, 6, 23, 0.2));
}

.page-title {
  width: min(780px, 100%);
}

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

.breadcrumbs a:hover {
  color: var(--brand);
}

.detail-hero {
  padding: 42px 0 0;
}

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

.player-card {
  position: relative;
  background: #000;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 0.42), rgba(2, 6, 23, 0.1)),
    radial-gradient(circle at center, rgba(56, 189, 248, 0.24), transparent 28%);
  transition: opacity 0.2s ease, visibility 0.2s ease;
  cursor: pointer;
}

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

.play-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border-radius: 999px;
  padding: 15px 23px;
  color: #00111f;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  font-weight: 900;
  box-shadow: 0 18px 55px rgba(56, 189, 248, 0.35);
}

.play-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.72);
}

.play-icon::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid #00111f;
}

.detail-side {
  display: grid;
  gap: 18px;
}

.detail-poster {
  border-radius: 24px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--line);
}

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

.detail-title {
  padding: 24px 0 8px;
}

.detail-title h1 {
  font-size: clamp(32px, 5vw, 62px);
}

.detail-title p {
  color: #dbeafe;
  font-size: 18px;
}

.detail-panel {
  padding: 24px;
  margin-top: 24px;
}

.detail-panel h2,
.info-panel h2,
.rank-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.detail-panel p,
.info-panel p {
  color: #cbd5e1;
  line-height: 1.9;
  margin: 0;
}

.info-panel {
  padding: 20px;
}

.info-tags {
  margin-top: 12px;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.72);
  padding: 46px 0 24px;
}

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

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

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

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

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

.footer-links a:hover {
  color: var(--text);
  border-color: rgba(56, 189, 248, 0.38);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 14px;
}

@media (max-width: 1100px) {
  .movie-grid,
  .movie-grid.compact,
  .related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .detail-side {
    grid-template-columns: minmax(160px, 240px) 1fr;
  }
}

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

  .header-inner {
    height: 64px;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

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

  .nav-link {
    border-radius: 14px;
  }

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

  .hero-inner {
    padding: 92px 0 84px;
  }

  .hero h1 {
    font-size: 46px;
  }

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

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

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

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

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

  .movie-card p {
    display: none;
  }

  .rank-row {
    grid-template-columns: auto 48px minmax(0, 1fr);
  }

  .rank-meta {
    display: none;
  }

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

  .detail-poster {
    max-width: 260px;
  }
}

@media (max-width: 430px) {
  .movie-grid,
  .movie-grid.compact,
  .related-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
