:root {
  --mist-950: #020617;
  --mist-900: #0f172a;
  --mist-850: #111c2f;
  --mist-800: #1e293b;
  --mist-700: #334155;
  --mist-500: #64748b;
  --mist-300: #cbd5e1;
  --mist-200: #e2e8f0;
  --lake-700: #0369a1;
  --lake-500: #0ea5e9;
  --lake-400: #38bdf8;
  --lake-100: #e0f2fe;
  --sepia-50: #faf8f5;
  --amber-400: #fbbf24;
  --rose-400: #fb7185;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-soft: rgba(30, 41, 59, 0.72);
  --border: rgba(148, 163, 184, 0.2);
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.35);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --max-width: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--mist-200);
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.24), transparent 34rem),
    linear-gradient(135deg, var(--mist-950), var(--mist-900) 46%, #0c4a6e);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 70%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 40px rgba(2, 6, 23, 0.3);
}

.header-inner {
  max-width: var(--max-width);
  height: 72px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--lake-500), #7dd3fc 50%, #0c4a6e);
  box-shadow: 0 14px 34px rgba(14, 165, 233, 0.3);
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 18px;
  letter-spacing: 0.02em;
  color: white;
}

.brand-copy small {
  color: var(--mist-300);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--mist-300);
  font-size: 14px;
}

.desktop-nav a {
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active {
  color: var(--lake-400);
  border-color: var(--lake-400);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.75);
  color: white;
}

.mobile-menu-button span {
  width: 18px;
  height: 2px;
  margin: 4px auto;
  display: block;
  background: currentColor;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 22px 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

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

.mobile-nav a {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(30, 41, 59, 0.75);
  color: var(--mist-200);
}

main {
  min-height: 70vh;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 22px 34px;
}

.hero-backdrop {
  position: absolute;
  inset: 32px 22px;
  border-radius: 36px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(30, 41, 59, 0.78)),
    radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.38), transparent 24rem);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: var(--shadow);
}

.hero-track {
  position: relative;
  min-height: 570px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
  gap: 48px;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.98);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.hero-media {
  position: relative;
  min-height: 520px;
  border-radius: 34px;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.7);
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.45);
}

.hero-media img {
  width: 100%;
  height: 520px;
  object-fit: cover;
}

.hero-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, rgba(2, 6, 23, 0.7), transparent 55%);
}

.hero-glow {
  position: absolute;
  inset: auto 18px 18px 18px;
  height: 110px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.28), rgba(251, 191, 36, 0.18));
  filter: blur(22px);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-right: 20px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--lake-400);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  color: white;
  font-size: clamp(36px, 5vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-lead,
.page-hero p,
.detail-copy .hero-lead {
  max-width: 760px;
  color: var(--mist-300);
  font-size: 18px;
}

.hero-actions,
.detail-copy .primary-button {
  margin-top: 28px;
}

.primary-button,
.ghost-button,
.quick-search-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.quick-search-form button {
  color: white;
  background: linear-gradient(135deg, var(--lake-500), var(--lake-700));
  box-shadow: 0 18px 40px rgba(14, 165, 233, 0.28);
}

.ghost-button {
  margin-left: 12px;
  color: var(--mist-200);
  border-color: var(--border);
  background: rgba(15, 23, 42, 0.5);
}

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

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 52px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

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

.hero-dots button.is-active {
  width: 36px;
  background: var(--lake-400);
}

.quick-search-panel,
.content-section,
.page-hero,
.detail-hero {
  width: min(var(--max-width), calc(100% - 44px));
  margin-left: auto;
  margin-right: auto;
}

.quick-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.28);
}

.quick-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
}

.quick-search-form label,
.catalog-toolbar label {
  display: grid;
  gap: 8px;
  color: var(--mist-300);
  font-size: 13px;
}

.quick-search-form input,
.catalog-toolbar input,
.catalog-toolbar select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  padding: 0 16px;
  color: white;
  background: rgba(15, 23, 42, 0.76);
  outline: none;
}

.quick-stats {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
  color: var(--mist-300);
}

.quick-stats span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.76);
}

.quick-stats strong {
  color: white;
}

.content-section {
  padding: 48px 0;
}

.soft-panel {
  padding: 34px;
  margin-top: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.52);
}

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

.section-heading h2 {
  margin: 0;
  color: white;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.15;
}

.section-heading p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--mist-300);
}

.section-link,
.text-link {
  color: var(--lake-400);
  font-weight: 800;
}

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

.category-tile {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel-soft);
  box-shadow: 0 20px 48px rgba(2, 6, 23, 0.28);
}

.category-tile img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  opacity: 0.72;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-tile:hover img {
  transform: scale(1.06);
  opacity: 0.9;
}

.category-tile::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, rgba(2, 6, 23, 0.86), transparent 70%);
}

.category-tile span,
.category-tile strong {
  position: absolute;
  z-index: 2;
  left: 18px;
}

.category-tile span {
  bottom: 44px;
  color: white;
  font-size: 20px;
  font-weight: 900;
}

.category-tile strong {
  bottom: 18px;
  color: var(--lake-400);
  font-size: 14px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.24);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 26px 58px rgba(2, 6, 23, 0.36);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(14, 165, 233, 0.18));
}

.poster-image {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.movie-card:hover .poster-image {
  transform: scale(1.04);
}

.year-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 4px 9px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(12px);
}

.year-badge {
  left: 12px;
}

.rank-badge {
  right: 12px;
  background: linear-gradient(135deg, var(--amber-400), var(--rose-400));
}

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

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

.movie-card h3 {
  margin: 10px 0 8px;
  color: white;
  font-size: 17px;
  line-height: 1.3;
}

.movie-card p {
  min-height: 48px;
  margin: 0;
  color: var(--mist-300);
  font-size: 14px;
}

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

.tag-row span {
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--lake-100);
  font-size: 12px;
  background: rgba(14, 165, 233, 0.1);
}

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

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

.compact-card .poster-image {
  height: 100%;
  aspect-ratio: auto;
}

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

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

.page-hero {
  margin-top: 40px;
  padding: 54px;
  border: 1px solid var(--border);
  border-radius: 36px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.75)),
    radial-gradient(circle at 88% 10%, rgba(56, 189, 248, 0.3), transparent 28rem);
  box-shadow: var(--shadow);
}

.compact-hero h1 {
  font-size: clamp(34px, 4vw, 58px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--mist-300);
  font-size: 14px;
}

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

.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 170px 170px auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.65);
}

.result-count {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 16px;
  color: var(--mist-300);
  background: rgba(30, 41, 59, 0.72);
}

.result-count strong {
  margin-right: 5px;
  color: white;
}

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

.category-card-large {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.24);
}

.category-card-cover {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.category-card-cover img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.category-card-large h2 {
  margin: 0 0 8px;
  color: white;
}

.category-card-large p {
  color: var(--mist-300);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  margin-top: 42px;
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: 36px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.76)),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.26), transparent 25rem);
  box-shadow: var(--shadow);
}

.detail-cover {
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.38);
}

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

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 0;
}

.detail-meta span {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--mist-200);
  background: rgba(15, 23, 42, 0.55);
}

.player-section {
  padding-bottom: 26px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: 32px;
  background: black;
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.44);
}

.player-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: white;
  background:
    linear-gradient(to top, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.15)),
    radial-gradient(circle at center, rgba(56, 189, 248, 0.28), transparent 18rem);
}

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

.play-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--lake-500), var(--lake-700));
  box-shadow: 0 18px 42px rgba(14, 165, 233, 0.42);
}

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

.detail-article,
.detail-aside {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  background: rgba(15, 23, 42, 0.62);
}

.detail-article h2,
.detail-aside h2 {
  margin: 0 0 12px;
  color: white;
}

.detail-article h2:not(:first-child) {
  margin-top: 28px;
}

.detail-article p {
  margin: 0;
  color: var(--mist-300);
  font-size: 16px;
}

.detail-aside dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  margin: 0;
}

.detail-aside dt {
  color: var(--mist-500);
}

.detail-aside dd {
  margin: 0;
  color: var(--mist-200);
}

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

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 44px 22px;
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 1.1fr;
  gap: 34px;
}

.site-footer p,
.site-footer li,
.footer-bottom {
  color: var(--mist-300);
}

.site-footer h3 {
  margin: 0 0 14px;
  color: white;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 8px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.footer-grid li + li {
  margin-top: 0;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 22px 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  text-align: center;
}

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

@media (max-width: 1120px) {
  .desktop-nav {
    display: none;
  }

  .mobile-menu-button {
    display: block;
  }

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

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

  .hero-track {
    min-height: 880px;
  }

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

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

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

  .catalog-toolbar {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .header-inner {
    height: 66px;
    padding: 0 16px;
  }

  .brand-copy small {
    display: none;
  }

  .hero-carousel,
  .quick-search-panel,
  .content-section,
  .page-hero,
  .detail-hero {
    width: min(100% - 28px, var(--max-width));
  }

  .hero-carousel {
    min-height: 840px;
    padding: 24px 0 28px;
  }

  .hero-backdrop {
    inset: 18px 0;
    border-radius: 28px;
  }

  .hero-track {
    min-height: 760px;
  }

  .hero-slide {
    gap: 24px;
    padding: 18px;
  }

  .hero-media,
  .hero-media img {
    min-height: auto;
    height: 390px;
  }

  .hero-content {
    padding-right: 0;
  }

  .hero-actions {
    display: grid;
    gap: 12px;
  }

  .ghost-button {
    margin-left: 0;
  }

  .quick-search-panel,
  .quick-search-form,
  .section-heading,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .quick-stats {
    justify-content: flex-start;
  }

  .category-grid,
  .movie-grid,
  .slim-grid,
  .ranking-grid,
  .full-ranking,
  .category-large-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-toolbar {
    grid-template-columns: 1fr;
  }

  .category-card-large,
  .compact-card {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .detail-hero,
  .soft-panel {
    padding: 24px;
  }

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

@media (max-width: 460px) {
  .category-grid,
  .movie-grid,
  .slim-grid,
  .ranking-grid,
  .full-ranking,
  .category-large-grid {
    grid-template-columns: 1fr;
  }

  .mobile-nav {
    grid-template-columns: 1fr;
  }

  .hero-media,
  .hero-media img {
    height: 330px;
  }
}
