:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #07111f;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-solid: #0f172a;
  --line: rgba(148, 163, 184, 0.16);
  --text: #e5edf7;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #06b6d4;
  --accent-2: #f97316;
  --gold: #f59e0b;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --shadow: 0 22px 80px rgba(0, 0, 0, 0.35);
  --max: 1280px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 5%, rgba(6, 182, 212, 0.20), transparent 32rem),
    radial-gradient(circle at 82% 2%, rgba(249, 115, 22, 0.14), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #07111f 48%, #020617 100%);
  color: var(--text);
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

img.is-missing {
  opacity: 0;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 18px 24px;
  backdrop-filter: blur(22px);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 10px 12px;
  z-index: -1;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  box-shadow: 0 14px 50px rgba(0, 0, 0, 0.22);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--accent), #2563eb 48%, var(--accent-2));
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 12px 36px rgba(6, 182, 212, 0.26);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 18px;
  letter-spacing: 0.04em;
}

.brand-text small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

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

.site-nav a {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--soft);
  transition: 0.24s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  background: rgba(6, 182, 212, 0.14);
  color: #ffffff;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
  color: #ffffff;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  border-radius: 2px;
}

main {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 0 24px 60px;
}

.hero {
  position: relative;
  min-height: calc(100vh - 96px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(8, 47, 73, 0.44));
  box-shadow: var(--shadow);
}

.hero-stage {
  position: relative;
  min-height: calc(100vh - 96px);
}

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

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

.hero-slide > img {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  filter: blur(2px) saturate(1.12);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.70) 44%, rgba(2, 6, 23, 0.28) 100%),
    radial-gradient(circle at 72% 32%, rgba(6, 182, 212, 0.26), transparent 23rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.62fr);
  gap: 48px;
  align-items: center;
  min-height: calc(100vh - 96px);
  padding: clamp(34px, 7vw, 86px);
}

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

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy h2 {
  margin-top: 16px;
  color: #f8fafc;
  font-size: clamp(26px, 3.8vw, 52px);
}

.hero-copy p,
.page-hero p,
.detail-copy p {
  color: var(--soft);
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.8;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 0;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
  color: #dbeafe;
  font-size: 13px;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.24s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), #2563eb);
  color: #ffffff;
  box-shadow: 0 18px 46px rgba(6, 182, 212, 0.28);
}

.ghost-button {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.64);
  color: #ffffff;
}

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

.small-actions {
  margin-top: 20px;
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  background:
    radial-gradient(circle at 35% 20%, rgba(6, 182, 212, 0.32), transparent 12rem),
    linear-gradient(135deg, #111827, #0f172a);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

.hero-poster::after,
.poster::after,
.ranking-cover::after,
.category-covers::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(2, 6, 23, 0.52));
  pointer-events: none;
}

.hero-controls {
  position: absolute;
  right: clamp(20px, 5vw, 68px);
  bottom: clamp(20px, 5vw, 54px);
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-controls button {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.76);
  color: #ffffff;
  cursor: pointer;
  transition: 0.2s ease;
}

.hero-controls > button {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  font-size: 28px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
}

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

.section-wrap,
.category-section {
  margin-top: 34px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.48);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.20);
}

.dark-panel {
  background:
    radial-gradient(circle at 10% 0%, rgba(6, 182, 212, 0.14), transparent 22rem),
    rgba(2, 6, 23, 0.72);
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading p {
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.2;
}

.section-heading.with-link {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.section-heading.with-link a {
  flex: none;
  color: var(--accent);
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(150px, 0.32fr));
  gap: 12px;
  margin-bottom: 24px;
}

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

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(6, 182, 212, 0.66);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

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

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

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

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

.movie-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.70);
  transition: 0.24s ease;
}

.movie-link:hover {
  transform: translateY(-5px);
  border-color: rgba(6, 182, 212, 0.40);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.28);
}

.poster,
.ranking-cover,
.category-covers {
  position: relative;
  display: block;
  overflow: hidden;
  background:
    radial-gradient(circle at 45% 18%, rgba(6, 182, 212, 0.22), transparent 10rem),
    linear-gradient(135deg, #111827, #0f172a);
}

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

.movie-link:hover .poster img,
.category-card:hover img,
.ranking-row:hover img {
  transform: scale(1.06);
}

.poster img,
.category-card img,
.ranking-row img {
  transition: transform 0.5s ease, opacity 0.3s ease;
}

.movie-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
}

.movie-info strong {
  color: #ffffff;
  font-size: 17px;
  line-height: 1.35;
}

.movie-info small,
.movie-info span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.meta-line em {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.10);
  color: #bae6fd;
  font-style: normal;
  font-size: 12px;
}

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 4;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold), var(--accent-2));
  color: #ffffff;
  font-weight: 900;
}

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

.category-card a {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.65);
  transition: 0.24s ease;
}

.category-card a:hover {
  transform: translateY(-5px);
  border-color: rgba(6, 182, 212, 0.40);
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  aspect-ratio: 16 / 9;
}

.category-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.category-copy strong {
  color: #ffffff;
  font-size: 18px;
}

.category-copy small {
  color: var(--muted);
  line-height: 1.65;
}

.category-copy em {
  margin-top: auto;
  color: var(--accent);
  font-style: normal;
  font-weight: 800;
}

.page-main,
.detail-main {
  padding-top: 12px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 15% 15%, rgba(6, 182, 212, 0.18), transparent 22rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(8, 47, 73, 0.44));
  box-shadow: var(--shadow);
}

.compact-hero {
  padding: clamp(34px, 7vw, 72px);
}

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

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

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

.ranking-row a {
  display: grid;
  grid-template-columns: 54px 92px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.62);
  transition: 0.24s ease;
}

.ranking-row a:hover {
  transform: translateX(5px);
  border-color: rgba(6, 182, 212, 0.42);
}

.ranking-number {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 16px;
  background: rgba(6, 182, 212, 0.14);
  color: var(--accent);
  font-weight: 900;
}

.ranking-cover {
  aspect-ratio: 3 / 4;
  border-radius: 16px;
}

.ranking-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
}

.ranking-copy strong {
  color: #ffffff;
  font-size: 20px;
}

.ranking-copy small,
.ranking-copy em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.55;
}

.mini-tags {
  margin-top: 0;
}

.mini-tags span {
  min-height: 26px;
  padding: 4px 9px;
  font-size: 12px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 8px 0 20px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #bae6fd;
}

.detail-hero {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 30px;
  align-items: stretch;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 85% 20%, rgba(249, 115, 22, 0.13), transparent 20rem),
    rgba(15, 23, 42, 0.60);
  box-shadow: var(--shadow);
}

.detail-poster {
  border-radius: 28px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
}

.detail-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.detail-meta span {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.38);
  color: var(--soft);
  font-size: 13px;
}

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

.player-panel {
  margin-top: 30px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 32px;
  background:
    radial-gradient(circle at 50% 30%, rgba(6, 182, 212, 0.16), transparent 20rem),
    #020617;
  box-shadow: 0 24px 82px rgba(0, 0, 0, 0.42);
}

.movie-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #020617;
  cursor: pointer;
}

.player-launch {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 0;
  background:
    radial-gradient(circle at center, rgba(6, 182, 212, 0.20), transparent 16rem),
    linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.74));
  color: #ffffff;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-launch span {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  box-shadow: 0 18px 56px rgba(6, 182, 212, 0.32);
  font-size: 38px;
  text-indent: 5px;
}

.player-shell.is-started .player-launch {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.detail-text {
  color: var(--soft);
  line-height: 1.9;
}

.detail-text h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 26px;
}

.detail-text h2 + p {
  margin-top: 0;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  width: min(100%, var(--max));
  margin: 30px auto 0;
  padding: 30px 24px 42px;
  color: var(--muted);
}

.site-footer div {
  display: grid;
  gap: 6px;
}

.site-footer strong {
  color: #ffffff;
}

.site-footer p {
  margin: 0;
}

[data-movie-card].is-hidden {
  display: none;
}

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

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

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

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

@media (max-width: 820px) {
  .site-header {
    padding: 12px 14px;
  }

  .site-header::before {
    inset: 6px;
    border-radius: 24px;
  }

  .menu-toggle {
    display: block;
  }

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

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

  .site-nav a {
    border-radius: 14px;
  }

  main {
    padding: 0 14px 34px;
  }

  .hero,
  .hero-stage,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    padding: 28px;
  }

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

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

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

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

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

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

  .ranking-row a {
    grid-template-columns: 42px 74px minmax(0, 1fr);
    gap: 10px;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .brand-text small {
    display: none;
  }

  .hero,
  .hero-stage,
  .hero-content {
    min-height: 680px;
  }

  .hero-controls {
    left: 28px;
    right: auto;
  }

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

  .movie-card.compact .movie-link {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .player-launch span {
    width: 72px;
    height: 72px;
    font-size: 30px;
  }
}
