:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.72);
  --bg-card-strong: rgba(30, 41, 59, 0.88);
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #38bdf8;
  --accent-strong: #0284c7;
  --accent-soft: rgba(56, 189, 248, 0.15);
  --danger: #fb7185;
  --shadow: 0 24px 60px rgba(2, 6, 23, 0.34);
  --radius: 18px;
  --radius-lg: 28px;
  --max: 1280px;
}

* {
  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(14, 165, 233, 0.15), transparent 34rem),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

.header-inner {
  width: min(100% - 32px, var(--max));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.logo-mark {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  box-shadow: 0 12px 28px rgba(56, 189, 248, 0.26);
}

.logo strong,
.logo small {
  display: block;
  white-space: nowrap;
}

.logo strong {
  font-size: 18px;
  letter-spacing: 0.02em;
}

.logo small {
  color: var(--muted);
  font-size: 12px;
}

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

.desktop-nav a,
.mobile-nav a {
  color: var(--muted-strong);
  font-weight: 600;
  transition: color 0.2s ease;
}

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

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(28vw, 320px);
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
}

.header-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 8px 4px 8px 12px;
}

.header-search button {
  border: 0;
  border-radius: 999px;
  color: white;
  background: var(--accent-strong);
  padding: 8px 14px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
}

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

.mobile-nav {
  display: none;
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 12px 0 18px;
  border-top: 1px solid var(--line);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
  filter: blur(2px) saturate(1.05);
  transform: scale(1.04);
}

.hero-overlay,
.detail-bg-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.75) 48%, rgba(2, 6, 23, 0.32) 100%),
    linear-gradient(0deg, #020617 0%, transparent 30%, transparent 70%, rgba(2, 6, 23, 0.55) 100%);
}

.hero-layout {
  position: relative;
  z-index: 2;
  min-height: 620px;
  padding: 86px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 48px;
  align-items: center;
}

.hero-copy {
  max-width: 720px;
}

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

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 14px 0 18px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
  margin: 0;
  color: var(--muted-strong);
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.75;
}

.hero-tags,
.tag-cloud,
.mini-badges,
.badge-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-cloud span,
.mini-badges span,
.badge-row span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(226, 232, 240, 0.1);
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.64);
  padding: 7px 12px;
  font-size: 12px;
  font-style: normal;
}

.hero-actions,
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

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

.primary-btn {
  color: white;
  background: linear-gradient(135deg, var(--accent-strong), #2563eb);
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.28);
}

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

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

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.14);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 10;
  background: var(--bg-soft);
}

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

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

.hero-controls {
  position: absolute;
  z-index: 4;
  right: calc((100% - min(100% - 32px, var(--max))) / 2);
  bottom: 40px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-controls button {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(10px);
}

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

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

.hero-dots button {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  padding: 0;
  opacity: 0.55;
}

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

.section-block {
  padding: 72px 0;
  background: #020617;
}

.gradient-block {
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
}

.dark-block {
  background: linear-gradient(180deg, #020617 0%, #0f172a 100%);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.section-title.compact {
  margin-bottom: 16px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.section-title h2 + a,
.section-title > a {
  margin-left: auto;
  color: var(--accent);
  font-weight: 700;
}

.section-icon {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 240px);
  gap: 20px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  scrollbar-width: none;
}

.scroll-row::-webkit-scrollbar {
  display: none;
}

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

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.16);
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  background: var(--bg-card-strong);
  transform: translateY(-4px) scale(1.015);
  box-shadow: 0 20px 44px rgba(2, 6, 23, 0.28);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--bg-soft);
}

.poster-wrap img,
.feature-card img,
.category-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover .poster-wrap img,
.feature-card:hover img {
  transform: scale(1.08);
}

.poster-badge {
  position: absolute;
  top: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 9px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  padding: 0 9px;
  backdrop-filter: blur(8px);
}

.poster-badge.left {
  left: 10px;
  background: rgba(2, 132, 199, 0.88);
}

.poster-badge.right {
  right: 10px;
  background: rgba(2, 6, 23, 0.72);
}

.movie-info {
  display: block;
  padding: 14px;
}

.movie-info strong,
.movie-row strong,
.rank-item strong,
.feature-content strong {
  display: block;
  color: var(--text);
  font-weight: 800;
}

.movie-info strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.movie-info em,
.movie-row em,
.rank-item em,
.feature-content em {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  color: #64748b;
  font-size: 12px;
}

.movie-meta span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

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

.category-tile,
.category-overview-card,
.year-card,
.article-card,
.meta-card,
.ranking-panel,
.filter-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 14px 32px rgba(2, 6, 23, 0.16);
}

.category-tile {
  min-height: 126px;
  padding: 22px;
  transition: transform 0.25s ease, background 0.25s ease;
}

.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-3px);
  background: var(--bg-card-strong);
}

.category-tile span,
.category-overview-body strong,
.year-card h3 {
  display: block;
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
}

.category-tile small,
.category-overview-body em,
.category-overview-body small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-style: normal;
  line-height: 1.65;
}

.ranking-panel {
  position: sticky;
  top: 92px;
  padding: 22px;
}

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

.rank-list.wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rank-item {
  display: grid;
  grid-template-columns: 34px 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.5);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  background: rgba(30, 41, 59, 0.92);
  transform: translateX(3px);
}

.rank-number {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent-strong), #6366f1);
}

.rank-item img {
  width: 64px;
  height: 86px;
  border-radius: 12px;
  object-fit: cover;
}

.region-groups {
  display: grid;
  gap: 48px;
}

.region-groups h3 {
  margin: 0 0 20px;
  font-size: 22px;
}

.year-grid,
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.year-card {
  padding: 20px;
}

.row-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.movie-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  overflow: hidden;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.5);
}

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

.movie-row-body {
  min-width: 0;
}

.movie-row small {
  display: block;
  margin-top: 8px;
  color: #64748b;
}

.inline-search,
.filter-controls {
  display: grid;
  gap: 14px;
}

.inline-search {
  grid-template-columns: minmax(0, 1fr) 180px;
  margin-bottom: 16px;
}

.inline-search input,
.inline-search select,
.filter-controls input,
.filter-controls select {
  width: 100%;
  border: 1px solid var(--line);
  outline: 0;
  border-radius: 14px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.82);
  padding: 13px 14px;
}

.filter-panel {
  margin-bottom: 26px;
  padding: 22px;
}

.filter-controls {
  grid-template-columns: 1.5fr repeat(3, minmax(140px, 1fr));
}

.filter-controls label span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.filter-result {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--accent);
  font-size: 14px;
}

.page-main {
  min-height: 60vh;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 98px 0 56px;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.18), transparent 38rem),
    linear-gradient(180deg, #0f172a 0%, #020617 100%);
}

.compact-hero h1 {
  max-width: 900px;
}

.compact-hero p {
  max-width: 760px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 18px;
  overflow: hidden;
  padding: 16px;
  transition: transform 0.25s ease, background 0.25s ease;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, 80px);
  gap: 6px;
}

.category-covers img {
  border-radius: 12px;
}

.feature-card {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}

.feature-card img {
  position: absolute;
  inset: 0;
}

.feature-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.2) 72%);
}

.badge-row {
  position: absolute;
  left: 20px;
  top: 20px;
  z-index: 2;
}

.feature-content {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 2;
}

.feature-content strong {
  font-size: 24px;
}

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

.detail-layout {
  position: relative;
  z-index: 2;
  padding: 96px 0 64px;
}

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

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

.detail-info-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-cover {
  width: 100%;
  border: 1px solid rgba(226, 232, 240, 0.14);
  border-radius: var(--radius-lg);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.detail-copy {
  max-width: 860px;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.13);
  border-radius: var(--radius-lg);
  aspect-ratio: 16 / 9;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 10px;
  border: 0;
  color: white;
  text-align: center;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 0.84), rgba(2, 6, 23, 0.38)),
    rgba(2, 6, 23, 0.25);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  width: 76px;
  height: 76px;
  display: inline-grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  box-shadow: 0 20px 44px rgba(56, 189, 248, 0.28);
  font-size: 32px;
  text-indent: 4px;
}

.player-overlay strong {
  font-size: 24px;
}

.player-overlay em,
.player-message {
  color: var(--muted-strong);
  font-style: normal;
}

.player-message {
  position: absolute;
  left: 16px;
  bottom: 12px;
  margin: 0;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  padding: 7px 12px;
  font-size: 13px;
}

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

.article-card,
.meta-card {
  padding: 24px;
}

.article-card h2,
.meta-card h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.article-card p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.9;
}

.meta-card dl {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  margin: 0;
}

.meta-card dt {
  color: var(--muted);
}

.meta-card dd {
  min-width: 0;
  margin: 0;
  color: var(--text);
  word-break: break-word;
}

.is-filter-hidden {
  display: none !important;
}

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

  .slim-grid,
  .year-grid,
  .feature-grid,
  .content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

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

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

  .hero-layout {
    grid-template-columns: 1fr;
    gap: 28px;
    min-height: 690px;
    padding-top: 72px;
  }

  .hero-poster {
    max-width: 520px;
  }

  .hero-controls {
    left: 16px;
    right: auto;
    bottom: 22px;
  }

  .detail-info-grid {
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: start;
  }

  .detail-layout {
    padding-top: 72px;
  }

  .filter-controls,
  .inline-search,
  .category-grid,
  .category-overview-grid,
  .rank-list.wide,
  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .header-inner {
    height: 64px;
  }

  .logo small {
    display: none;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 34px;
  }

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

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

  .scroll-row {
    grid-auto-columns: 178px;
  }

  .movie-info {
    padding: 12px;
  }

  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .category-covers {
    grid-template-rows: repeat(2, 120px);
  }

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

  .detail-cover {
    width: 180px;
  }

  .player-overlay strong {
    font-size: 20px;
  }

  .play-circle {
    width: 62px;
    height: 62px;
    font-size: 26px;
  }
}
