:root {
  color-scheme: dark;
  --deep-950: #000d12;
  --deep-900: #00141a;
  --deep-850: #001f2b;
  --deep-800: #002840;
  --deep-760: #00344d;
  --ocean-900: #001a26;
  --ocean-700: #005580;
  --ocean-500: #0099e6;
  --ocean-400: #1ab1ff;
  --ocean-300: #4dc2ff;
  --ocean-200: #80d4ff;
  --ocean-100: #b3e5ff;
  --teal-500: #14b8a6;
  --white: #ffffff;
  --muted: rgba(179, 229, 255, .72);
  --line: rgba(128, 212, 255, .18);
  --card: rgba(0, 40, 64, .68);
  --card-strong: rgba(0, 40, 64, .94);
  --shadow: 0 24px 80px rgba(0, 0, 0, .34);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ocean-100);
  background:
    radial-gradient(circle at 12% 6%, rgba(26, 177, 255, .18), transparent 34rem),
    radial-gradient(circle at 92% 2%, rgba(20, 184, 166, .14), transparent 28rem),
    linear-gradient(135deg, var(--deep-900), var(--deep-950) 58%, #00080c);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

img {
  display: block;
  width: 100%;
}

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(0, 20, 26, .9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
}

.brand-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--ocean-400), var(--teal-500));
  box-shadow: 0 14px 30px rgba(26, 177, 255, .24);
}

.brand strong,
.footer-brand {
  display: block;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: .03em;
}

.brand em {
  display: block;
  color: var(--ocean-200);
  font-size: 12px;
  font-style: normal;
}

.desktop-nav,
.nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.desktop-nav a,
.nav-dropdown button,
.search-toggle,
.menu-toggle {
  border: 0;
  color: var(--ocean-100);
  background: transparent;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}

.desktop-nav a,
.nav-dropdown button,
.search-toggle {
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 650;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.nav-dropdown button:hover,
.search-toggle:hover,
.menu-toggle:hover {
  color: var(--white);
  background: rgba(0, 85, 128, .52);
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: 220px;
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(0, 26, 38, .96);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: .2s ease;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(0, 40, 64, .96);
}

.mobile-nav.is-open {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.mobile-nav a {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 85, 128, .28);
}

.search-panel {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(0, 26, 38, .96);
  box-shadow: var(--shadow);
}

.search-panel.is-open {
  display: block;
}

.search-box,
.inline-filter {
  display: flex;
  gap: 10px;
}

.search-box input,
.inline-filter input {
  min-width: 0;
  flex: 1;
  color: var(--white);
  border: 2px solid rgba(26, 177, 255, .26);
  border-radius: 16px;
  background: rgba(0, 20, 26, .7);
  padding: 13px 16px;
  outline: none;
}

.search-box input:focus,
.inline-filter input:focus {
  border-color: var(--ocean-400);
}

.search-box button,
.inline-filter button,
.primary-button,
.ghost-button {
  border: 0;
  border-radius: 16px;
  padding: 13px 18px;
  font-weight: 800;
}

.search-box button,
.inline-filter button,
.primary-button {
  color: var(--white);
  background: linear-gradient(135deg, var(--ocean-400), var(--teal-500));
  box-shadow: 0 18px 36px rgba(26, 177, 255, .18);
}

.ghost-button {
  color: var(--ocean-100);
  border: 1px solid var(--line);
  background: rgba(0, 40, 64, .66);
}

.search-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.search-result-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(0, 40, 64, .72);
}

.search-result-item strong {
  color: var(--white);
}

.search-result-item span {
  color: var(--muted);
  font-size: 13px;
}

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

.hero-track,
.hero-slide,
.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity .7s ease;
}

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

.hero-bg {
  background-position: center;
  background-size: cover;
  transform: scale(1.04);
  filter: saturate(1.05);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(0, 13, 18, 1), rgba(0, 13, 18, .12) 40%, rgba(0, 13, 18, .76)),
    radial-gradient(circle at 72% 30%, rgba(26, 177, 255, .2), transparent 28rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  min-height: calc(100vh - 76px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 84px 420px 110px 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--ocean-300);
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: var(--white);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -.04em;
}

.hero-content h1 {
  max-width: 780px;
  font-size: clamp(42px, 7vw, 92px);
}

.hero-summary {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--ocean-100);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.detail-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  border: 1px solid rgba(128, 212, 255, .22);
  border-radius: 999px;
  color: var(--ocean-100);
  background: rgba(0, 40, 64, .62);
  padding: 6px 10px;
  font-size: 13px;
}

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

.hero-poster {
  position: absolute;
  z-index: 3;
  right: max(32px, calc((100% - 1200px) / 2));
  top: 50%;
  width: min(330px, 28vw);
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(179, 229, 255, .22);
  border-radius: 30px;
  overflow: hidden;
  transform: translateY(-46%);
  box-shadow: var(--shadow);
}

.hero-poster img,
.movie-poster img,
.compact-card img,
.rank-cover img,
.category-cover img,
.category-tile img {
  height: 100%;
  object-fit: cover;
  transition: transform .36s ease, filter .36s ease;
}

.hero-poster:hover img,
.movie-card:hover .movie-poster img,
.compact-card:hover img,
.rank-card:hover .rank-cover img,
.category-tile:hover img {
  transform: scale(1.06);
  filter: brightness(1.08);
}

.hero-control {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 26, 38, .78);
  backdrop-filter: blur(16px);
}

.hero-control button {
  border: 0;
  color: var(--white);
  background: rgba(0, 85, 128, .44);
}

.hero-control > button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 24px;
}

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

.hero-dots button {
  width: 11px;
  height: 11px;
  padding: 0;
  border-radius: 999px;
  background: rgba(179, 229, 255, .32);
}

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

.section-block,
.page-main,
.detail-main {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

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

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

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

.section-head a {
  color: var(--ocean-200);
  font-weight: 800;
}

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

.category-movie-grid {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.movie-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 12px 44px rgba(0, 0, 0, .16);
  transition: transform .24s ease, border-color .24s ease, background .24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(26, 177, 255, .56);
  background: rgba(0, 40, 64, .86);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(0, 20, 26, .58);
}

.play-badge {
  position: absolute;
  inset: auto 14px 14px auto;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--ocean-400), var(--teal-500));
  box-shadow: 0 14px 24px rgba(0, 0, 0, .26);
}

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

.movie-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--white);
  font-weight: 800;
  line-height: 1.35;
}

.movie-line {
  display: -webkit-box;
  min-height: 45px;
  margin: 8px 0 10px;
  color: var(--muted);
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
}

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

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  padding: 4px 8px;
  font-size: 12px;
}

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

.category-tile {
  position: relative;
  min-height: 150px;
  display: flex;
  align-items: end;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 13, 18, .94), rgba(0, 13, 18, .18));
}

.category-tile img {
  position: absolute;
  inset: 0;
}

.category-tile span {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  padding: 18px;
}

.category-tile strong {
  color: var(--white);
  font-size: 22px;
}

.category-tile em,
.compact-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.compact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.compact-card {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 116px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(0, 40, 64, .58);
}

.compact-card img {
  height: 92px;
  border-radius: 14px;
}

.compact-card span {
  display: grid;
  gap: 7px;
}

.compact-card strong {
  color: var(--white);
}

.page-main {
  padding: 46px 0 30px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 56px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 88% 16%, rgba(26, 177, 255, .2), transparent 28rem),
    linear-gradient(135deg, rgba(0, 40, 64, .88), rgba(0, 20, 26, .96));
  box-shadow: var(--shadow);
}

.page-hero h1,
.detail-info h1 {
  font-size: clamp(34px, 5vw, 62px);
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--ocean-100);
  font-size: 18px;
}

.inline-filter {
  max-width: 760px;
  margin-top: 28px;
}

.category-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 22px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.category-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
}

.category-overview-card h2 {
  margin: 0;
  color: var(--white);
  font-size: 24px;
}

.category-overview-card p {
  color: var(--muted);
}

.mini-links {
  display: grid;
  gap: 6px;
}

.mini-links a {
  color: var(--ocean-200);
  font-size: 14px;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 64px 92px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(0, 40, 64, .56);
  transition: transform .22s ease, border-color .22s ease;
}

.rank-card:hover {
  transform: translateX(6px);
  border-color: rgba(26, 177, 255, .48);
}

.rank-number {
  color: var(--ocean-400);
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}

.rank-cover {
  height: 124px;
  overflow: hidden;
  border-radius: 16px;
}

.rank-info a {
  color: var(--white);
  font-size: 20px;
  font-weight: 850;
}

.rank-info p {
  max-width: 880px;
  margin: 7px 0 9px;
  color: var(--muted);
}

.detail-main {
  padding: 28px 0 30px;
}

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

.breadcrumbs a {
  color: var(--ocean-200);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, .7fr);
  gap: 26px;
  align-items: stretch;
}

.player-shell {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border: 1px solid rgba(179, 229, 255, .18);
  border-radius: var(--radius-xl);
  background: #000;
  box-shadow: var(--shadow);
}

.player-video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  background: #000;
}

.player-trigger {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle, rgba(0, 0, 0, .08), rgba(0, 0, 0, .42));
  transition: opacity .2s ease, visibility .2s ease;
}

.player-trigger span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--ocean-400), var(--teal-500));
  box-shadow: 0 24px 50px rgba(0, 0, 0, .36);
  font-size: 34px;
}

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

.detail-info {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(0, 40, 64, .84), rgba(0, 20, 26, .96));
  box-shadow: var(--shadow);
}

.detail-line {
  margin: 20px 0 0;
  color: var(--ocean-100);
  font-size: 18px;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr minmax(260px, .7fr);
  gap: 22px;
  margin-top: 26px;
}

.detail-content article,
.detail-content aside {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.detail-content h2 {
  margin: 0 0 12px;
  color: var(--white);
  font-size: 24px;
}

.detail-content p {
  margin: 0;
  color: var(--ocean-100);
}

dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

dl div {
  display: grid;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(128, 212, 255, .12);
}

dt {
  color: var(--muted);
  font-size: 13px;
}

dd {
  margin: 0;
  color: var(--white);
  font-weight: 750;
}

.site-footer {
  margin-top: 50px;
  border-top: 1px solid var(--line);
  background: rgba(0, 13, 18, .82);
}

.footer-grid {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 34px;
  padding: 46px 0;
}

.footer-grid p {
  color: var(--muted);
}

.footer-grid h2 {
  margin: 0 0 12px;
  color: var(--white);
  font-size: 18px;
}

.footer-grid a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: var(--ocean-200);
}

.copyright {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: rgba(179, 229, 255, .56);
  border-top: 1px solid rgba(128, 212, 255, .12);
  font-size: 14px;
}

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

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .hero-content {
    padding-right: 0;
    min-height: 760px;
  }

  .hero-poster {
    right: 24px;
    top: auto;
    bottom: 95px;
    width: 180px;
    transform: none;
  }

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

@media (max-width: 640px) {
  .nav-shell,
  .section-block,
  .page-main,
  .detail-main,
  .footer-grid,
  .copyright,
  .search-panel,
  .mobile-nav {
    width: min(100% - 24px, 1200px);
  }

  .brand strong {
    font-size: 18px;
  }

  .brand em {
    display: none;
  }

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

  .hero-content {
    padding: 58px 0 230px;
  }

  .hero-poster {
    left: 24px;
    right: auto;
    bottom: 76px;
    width: 150px;
  }

  .hero-control {
    bottom: 18px;
  }

  .section-head,
  .search-box,
  .inline-filter {
    align-items: stretch;
    flex-direction: column;
  }

  .page-hero {
    padding: 30px;
  }

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

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

  .movie-line {
    min-height: 42px;
    font-size: 13px;
  }

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

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

  .rank-number {
    text-align: left;
  }

  .rank-cover {
    height: 220px;
  }

  .player-shell,
  .player-video {
    min-height: 260px;
  }

  .detail-info,
  .detail-content article,
  .detail-content aside {
    padding: 22px;
  }
}
