:root {
  color-scheme: dark;
  --deepblue-950: #020617;
  --deepblue-900: #0f172a;
  --deepblue-850: #12203a;
  --deepblue-800: #1e293b;
  --deepblue-700: #26364f;
  --ocean-500: #06b6d4;
  --ocean-400: #22d3ee;
  --ocean-300: #67e8f9;
  --gold-500: #f59e0b;
  --gold-300: #fcd34d;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --card: rgba(15, 23, 42, 0.78);
  --glass: rgba(15, 23, 42, 0.68);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 34rem),
    radial-gradient(circle at 70% 15%, rgba(245, 158, 11, 0.12), transparent 28rem),
    linear-gradient(180deg, var(--deepblue-950), var(--deepblue-900) 42%, var(--deepblue-950));
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.site-logo span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #061827;
  background: linear-gradient(135deg, var(--ocean-300), var(--gold-300));
  box-shadow: 0 14px 34px rgba(34, 211, 238, 0.28);
}

.site-logo strong {
  font-size: 1.16rem;
}

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

.desktop-nav a,
.mobile-nav a,
.footer-links a,
.section-link {
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a {
  padding: 10px 14px;
  border-radius: 999px;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover,
.section-link:hover {
  color: var(--text);
  background: rgba(34, 211, 238, 0.1);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

.mobile-nav a {
  display: block;
  padding: 14px;
  border-radius: 12px;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-stage,
.hero-slide,
.hero-slide img,
.hero-shade {
  position: absolute;
  inset: 0;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(15, 23, 42, 0.86) 42%, rgba(15, 23, 42, 0.24) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.12) 46%, rgba(2, 6, 23, 0.62));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1440px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 1440px;
}

.eyebrow,
.hero-content .eyebrow,
.page-hero p,
.rank-panel-head p,
.section-head p {
  margin: 0 0 10px;
  color: var(--ocean-300);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 6.8rem);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.hero-content p {
  max-width: 720px;
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: clamp(1rem, 1.8vw, 1.32rem);
  line-height: 1.9;
}

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

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

.hero-tags span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(103, 232, 249, 0.2);
  border-radius: 999px;
  color: var(--ocean-300);
  background: rgba(8, 47, 73, 0.58);
  font-size: 0.78rem;
}

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

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

.btn-primary,
.hero-search button,
.page-search button {
  color: #061827;
  border: 0;
  background: linear-gradient(135deg, var(--ocean-300), var(--gold-300));
  box-shadow: 0 18px 40px rgba(34, 211, 238, 0.22);
}

.btn-ghost {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
}

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

.hero-panel {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 4;
  width: min(1440px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.hero-search,
.page-search {
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(16px);
}

.hero-search input,
.page-search input,
.page-search select {
  min-width: 220px;
  height: 44px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.page-search select {
  min-width: 140px;
  padding: 0 12px;
  border-left: 1px solid var(--line);
}

.page-search option {
  color: #111827;
}

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

.hero-dot {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 56px;
  background: linear-gradient(135deg, var(--ocean-300), var(--gold-300));
}

.content-section {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0;
}

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

.section-head h2,
.rank-panel-head h2,
.detail-article h2,
.detail-side h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.4vw, 2.4rem);
  letter-spacing: -0.04em;
}

.section-head span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.section-link {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

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

.category-tile,
.category-overview-card,
.movie-card,
.rank-panel,
.player-card,
.detail-article,
.detail-side {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.74));
  box-shadow: var(--shadow);
}

.category-tile {
  min-height: 150px;
  padding: 24px;
}

.category-tile:before,
.category-overview-card:before,
.movie-card:before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.16), transparent 45%);
  pointer-events: none;
}

.category-tile strong,
.category-overview-card strong {
  position: relative;
  display: block;
  font-size: 1.28rem;
  margin-bottom: 12px;
}

.category-tile span,
.category-overview-card p {
  position: relative;
  color: var(--muted);
  line-height: 1.7;
}

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

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

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(103, 232, 249, 0.44);
  box-shadow: 0 34px 80px rgba(8, 145, 178, 0.16);
}

.movie-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  margin: 0;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(245, 158, 11, 0.12));
}

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

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

.movie-poster em,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  border-radius: 999px;
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 900;
}

.movie-poster em {
  right: 12px;
  padding: 5px 9px;
  color: #061827;
  background: var(--gold-300);
}

.rank-badge {
  left: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #061827;
  background: var(--ocean-300);
}

.movie-card-body {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.movie-card-body strong {
  font-size: 1rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-body p {
  min-height: 3.2em;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--ocean-300);
  font-size: 0.78rem;
}

.movie-card-compact .movie-card-body p {
  -webkit-line-clamp: 1;
  min-height: 1.6em;
}

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

.rank-panel {
  padding: 22px;
}

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

.rank-panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.rank-panel-head a {
  color: var(--ocean-300);
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 38px 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.32);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(103, 232, 249, 0.26);
}

.rank-item span {
  color: var(--gold-300);
  font-weight: 900;
}

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

.rank-item strong,
.rank-item p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-item strong {
  -webkit-line-clamp: 1;
}

.rank-item p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  -webkit-line-clamp: 2;
}

.page-hero {
  width: min(1440px, calc(100% - 32px));
  min-height: 320px;
  margin: 28px auto 0;
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 12% 15%, rgba(34, 211, 238, 0.25), transparent 28rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.86), rgba(2, 6, 23, 0.76));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 5.2rem);
  line-height: 1;
  letter-spacing: -0.07em;
}

.page-hero span {
  display: block;
  max-width: 740px;
  margin-top: 18px;
  color: #cbd5e1;
  line-height: 1.8;
}

.wide-search {
  min-width: min(100%, 580px);
}

.wide-search input {
  flex: 1;
}

.category-overview-card {
  min-height: 280px;
  padding: 18px;
}

.category-cover-stack {
  position: relative;
  height: 128px;
  margin-bottom: 22px;
}

.category-cover-stack img {
  position: absolute;
  top: 0;
  width: 92px;
  height: 124px;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.28);
}

.category-cover-stack img:nth-child(1) {
  left: 0;
  transform: rotate(-8deg);
}

.category-cover-stack img:nth-child(2) {
  left: 58px;
  transform: rotate(3deg);
}

.category-cover-stack img:nth-child(3) {
  left: 116px;
  transform: rotate(8deg);
}

.category-cover-stack img:nth-child(4) {
  left: 174px;
  transform: rotate(13deg);
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
}

.detail-bg,
.detail-mask {
  position: absolute;
  inset: 0;
}

.detail-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(6px) saturate(1.1);
  transform: scale(1.05);
}

.detail-mask {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.62)),
    linear-gradient(0deg, rgba(2, 6, 23, 1), rgba(2, 6, 23, 0.18));
}

.detail-content {
  position: relative;
  z-index: 2;
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 60px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  margin-bottom: 36px;
}

.crumbs a:hover {
  color: var(--ocean-300);
}

.crumbs b {
  color: var(--text);
}

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

.detail-poster {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

.detail-info h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.4rem, 5.6vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.08em;
}

.detail-one-line {
  max-width: 850px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: 1.16rem;
  line-height: 1.9;
}

.detail-meta,
.detail-tags {
  margin-top: 22px;
}

.detail-info .btn-primary {
  margin-top: 30px;
}

.detail-section {
  padding-top: 28px;
}

.player-card {
  padding: 18px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  background: #000;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: center;
  color: var(--text);
  border: 0;
  background: radial-gradient(circle at center, rgba(34, 211, 238, 0.18), rgba(2, 6, 23, 0.68));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ocean-300), var(--gold-300));
  box-shadow: 0 18px 48px rgba(34, 211, 238, 0.32);
}

.player-overlay span:before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 7px;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 24px solid #061827;
}

.player-overlay strong {
  font-size: 1.12rem;
}

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

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

.detail-article,
.detail-side {
  padding: 28px;
}

.detail-article p {
  color: #dbeafe;
  line-height: 2;
  font-size: 1rem;
}

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

.detail-side dl {
  margin: 18px 0 0;
  display: grid;
  gap: 14px;
}

.detail-side dt {
  color: var(--ocean-300);
  font-size: 0.82rem;
}

.detail-side dd {
  margin: -8px 0 0;
  color: #dbeafe;
  line-height: 1.7;
}

.site-footer {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-logo {
  color: var(--text);
  font-size: 1.2rem;
}

.site-footer p {
  max-width: 560px;
  margin: 10px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
}

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

@media (max-width: 1280px) {
  .movie-grid,
  .small-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

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

  .rank-panel,
  .sticky-panel {
    position: static;
  }
}

@media (max-width: 1024px) {
  .category-grid,
  .category-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .page-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .detail-grid {
    grid-template-columns: 240px minmax(0, 1fr);
  }
}

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

  .menu-toggle {
    display: block;
  }

  body.menu-open .mobile-nav {
    display: block;
  }

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

  .hero-content {
    padding: 72px 0 168px;
    justify-content: flex-end;
  }

  .hero-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-search,
  .page-search {
    width: 100%;
    border-radius: 24px;
    flex-direction: column;
  }

  .hero-search input,
  .page-search input,
  .page-search select,
  .hero-search button,
  .page-search button {
    width: 100%;
    min-width: 0;
  }

  .page-search select {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .section-head,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }

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

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

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

  .movie-card-body p,
  .tag-row {
    display: none;
  }

  .page-hero {
    min-height: 260px;
    padding: 28px;
    border-radius: 26px;
  }

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

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

  .detail-content {
    padding-top: 28px;
  }

  .player-card,
  .detail-article,
  .detail-side {
    padding: 14px;
    border-radius: 20px;
  }
}
