:root {
  --bg: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --panel: #ffffff;
  --line: rgba(148, 163, 184, 0.24);
  --dark: #0f172a;
  --dark-2: #1e293b;
  --amber: #f59e0b;
  --amber-2: #fbbf24;
  --red: #ef4444;
  --radius: 22px;
  --shadow: 0 20px 55px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
}

img {
  max-width: 100%;
}

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.94);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}

.nav-shell {
  max-width: 1320px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--amber), #ef4444);
  color: #fff;
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.28);
}

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

.site-nav a,
.nav-dropdown > button {
  color: #e2e8f0;
  border: 0;
  background: transparent;
  padding: 8px 0;
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active,
.nav-dropdown > button:hover {
  color: var(--amber-2);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 16px);
  width: 220px;
  display: grid;
  gap: 2px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-dropdown-panel a {
  padding: 9px 12px;
  border-radius: 12px;
}

.nav-dropdown-panel a:hover {
  background: rgba(245, 158, 11, 0.12);
}

.site-search {
  display: flex;
  align-items: center;
  width: min(300px, 28vw);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.9);
}

.site-search input {
  min-width: 0;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
}

.site-search input::placeholder {
  color: #94a3b8;
}

.site-search button,
.inline-filter button {
  border: 0;
  padding: 10px 16px;
  color: #0f172a;
  background: var(--amber-2);
  font-weight: 700;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #fff;
  font-size: 24px;
  background: transparent;
}

.hero-carousel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  color: #fff;
  background: var(--dark);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  filter: saturate(1.05) contrast(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 70% 30%,
      rgba(245, 158, 11, 0.36),
      transparent 34%
    ),
    linear-gradient(
      90deg,
      rgba(15, 23, 42, 0.95) 0%,
      rgba(15, 23, 42, 0.76) 42%,
      rgba(15, 23, 42, 0.18) 100%
    ),
    linear-gradient(0deg, rgba(15, 23, 42, 0.86), transparent 46%);
}

.hero-content {
  position: relative;
  width: min(720px, calc(100% - 48px));
  margin-left: max(24px, calc((100vw - 1320px) / 2 + 24px));
  padding: 76px 0 112px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber-2);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 16px 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-line,
.page-hero p,
.detail-line {
  max-width: 760px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.9;
}

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

.tag-row span {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags {
  margin: 24px 0 30px;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

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

.btn-primary {
  color: #0f172a;
  background: linear-gradient(135deg, var(--amber-2), var(--amber));
  box-shadow: 0 16px 36px rgba(245, 158, 11, 0.28);
}

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.hero-control {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.hero-control button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.hero-control span {
  display: inline-flex;
  gap: 8px;
}

.hero-dot {
  width: 9px !important;
  height: 9px !important;
  background: rgba(255, 255, 255, 0.36) !important;
}

.hero-dot.is-active {
  width: 26px !important;
  border-radius: 999px !important;
  background: var(--amber-2) !important;
}

.quick-panel {
  max-width: 1180px;
  margin: -46px auto 46px;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 0 24px;
}

.quick-panel a {
  min-height: 112px;
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  border: 1px solid rgba(148, 163, 184, 0.2);
  display: grid;
  gap: 8px;
}

.quick-panel strong {
  font-size: 22px;
}

.quick-panel span {
  color: var(--muted);
}

.section-shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 72px 24px;
}

.section-head {
  max-width: 760px;
  margin: 0 auto 34px;
  text-align: center;
}

.section-head.align-left {
  margin-left: 0;
  text-align: left;
}

.section-head h2,
.rank-panel h2,
.player-section h2,
.content-block h2,
.detail-side h2 {
  margin: 10px 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-head p {
  color: var(--muted);
  line-height: 1.8;
}

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

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

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

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

.movie-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 52px rgba(15, 23, 42, 0.16);
}

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

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

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

.movie-card-body {
  min-height: 214px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
}

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

.movie-card strong {
  font-size: 20px;
  line-height: 1.25;
  font-weight: 900;
}

.movie-line {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.movie-card .tag-row {
  margin-top: auto;
}

.dark-strip {
  max-width: none;
  background:
    radial-gradient(
      circle at top left,
      rgba(245, 158, 11, 0.18),
      transparent 30%
    ),
    linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
}

.dark-strip .section-head p {
  color: #cbd5e1;
}

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

.category-tile,
.category-card {
  display: grid;
  gap: 12px;
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-4px);
  background: rgba(245, 158, 11, 0.15);
}

.category-tile span,
.category-card strong {
  font-size: 22px;
  font-weight: 900;
}

.category-tile small,
.category-card span {
  color: #cbd5e1;
  line-height: 1.7;
}

.category-card-grid .category-card {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.category-card-grid .category-card span {
  color: var(--muted);
}

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

.category-covers img {
  aspect-ratio: 4 / 5;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  background: #111827;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: start;
}

.rank-panel,
.detail-side {
  position: sticky;
  top: 96px;
  padding: 24px;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.rank-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.rank-index {
  grid-row: span 2;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--red));
  font-weight: 900;
}

.rank-title {
  font-weight: 800;
}

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

.text-link {
  display: inline-flex;
  margin-top: 18px;
  color: #b45309;
  font-weight: 800;
}

.page-hero {
  min-height: 340px;
  display: grid;
  place-content: center;
  padding: 82px 24px;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(
      circle at 75% 20%,
      rgba(245, 158, 11, 0.28),
      transparent 32%
    ),
    linear-gradient(135deg, #0f172a, #1e293b);
}

.page-hero h1 {
  font-size: clamp(42px, 6vw, 68px);
}

.inline-filter {
  width: min(720px, 100%);
  margin: 28px auto 0;
  display: flex;
  align-items: center;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.18);
}

.inline-filter input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 16px 20px;
  color: var(--ink);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 980px;
  margin: 22px auto 0;
}

.chip-row button {
  border: 1px solid rgba(255, 255, 255, 0.26);
  color: #fff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  padding: 9px 14px;
}

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

.rank-card {
  position: relative;
}

.rank-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 2;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--red));
  border-radius: 16px;
  font-weight: 900;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.24);
}

.detail-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 72px max(24px, calc((100vw - 1320px) / 2 + 24px));
  color: #fff;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 18% 30%,
      rgba(245, 158, 11, 0.28),
      transparent 30%
    ),
    linear-gradient(135deg, #0f172a, #111827 58%, #1e293b);
}

.detail-cover {
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 34px 74px rgba(0, 0, 0, 0.36);
  background: #111827;
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb a {
  color: var(--amber-2);
}

.detail-tags {
  margin: 24px 0 28px;
}

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

.detail-main {
  display: grid;
  gap: 24px;
}

.player-section,
.content-block {
  padding: 26px;
  border-radius: 28px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.movie-player {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.movie-player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: #fff;
  background: radial-gradient(
    circle,
    rgba(15, 23, 42, 0.15),
    rgba(15, 23, 42, 0.68)
  );
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
}

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

.play-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #0f172a;
  background: var(--amber-2);
  font-size: 28px;
  box-shadow: 0 16px 38px rgba(245, 158, 11, 0.32);
}

.content-block p {
  color: #334155;
  font-size: 17px;
  line-height: 2;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.info-list dt {
  color: var(--muted);
}

.info-list dd {
  margin: 0;
  font-weight: 700;
}

.info-list a {
  color: #b45309;
}

.side-rank {
  margin-top: 26px;
}

.side-rank h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
}

.footer-shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 44px 24px;
  display: grid;
  gap: 26px;
}

.footer-shell strong {
  color: #fff;
  font-size: 22px;
}

.footer-shell p {
  margin: 8px 0 0;
}

.footer-shell nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
}

.footer-shell a:hover {
  color: var(--amber-2);
}

.copyright {
  color: #94a3b8;
  font-size: 14px;
}

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

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

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

  .rank-panel,
  .detail-side {
    position: static;
  }
}

@media (max-width: 860px) {
  .nav-shell {
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 18px;
  }

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

  .site-nav,
  .site-search {
    display: none;
    width: 100%;
  }

  body.nav-open .site-nav,
  body.nav-open .site-search {
    display: flex;
  }

  .site-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .site-search {
    width: 100%;
  }

  .nav-dropdown-panel {
    position: static;
    width: 100%;
    margin-top: 8px;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .hero-carousel {
    min-height: 580px;
  }

  .quick-panel {
    grid-template-columns: 1fr;
    margin-top: 22px;
  }

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

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

@media (max-width: 560px) {
  .hero-content h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 36px;
  }

  .hero-line,
  .page-hero p,
  .detail-line {
    font-size: 16px;
  }

  .movie-grid,
  .featured-grid,
  .compact-grid,
  .catalog-grid,
  .rank-grid,
  .category-grid,
  .category-card-grid {
    grid-template-columns: 1fr;
  }

  .inline-filter {
    border-radius: 22px;
    flex-direction: column;
    align-items: stretch;
  }

  .inline-filter button {
    width: 100%;
  }

  .section-shell {
    padding: 54px 18px;
  }

  .detail-hero {
    padding: 52px 18px;
  }
}
