:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.22);
  --muted: #94a3b8;
  --text: #f8fafc;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --violet: #8b5cf6;
  --rose: #fb7185;
  --amber: #f59e0b;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.52);
  --radius: 24px;
}

* {
  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(34, 211, 238, 0.18), transparent 34rem),
    radial-gradient(circle at top right, rgba(139, 92, 246, 0.18), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.96));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 50px rgba(2, 6, 23, 0.46);
}

.header-inner,
.footer-inner,
.section-inner,
.hero-shell,
.page-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.36);
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

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

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

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

.desktop-nav a,
.mobile-nav a,
.footer-links a {
  color: var(--soft);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a {
  padding: 10px 15px;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
  color: #ffffff;
  background: rgba(148, 163, 184, 0.14);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.68);
  color: #fff;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #e2e8f0;
  border-radius: 999px;
}

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

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

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

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

.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.74) 44%, rgba(2, 6, 23, 0.32) 100%),
    radial-gradient(circle at 20% 18%, rgba(34, 211, 238, 0.22), transparent 32rem);
  z-index: 1;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) brightness(0.72);
}

.hero-shell {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 76vh;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 44px;
  align-items: center;
  padding: 74px 0;
}

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

.hero-kicker,
.section-kicker,
.breadcrumb {
  color: var(--cyan);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(40px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 700px;
  color: #e2e8f0;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.card-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  color: var(--soft);
}

.hero-meta span,
.detail-meta span,
.card-meta span,
.card-meta a,
.rank-meta span,
.tag-row span {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
}

.hero-meta span,
.detail-meta span,
.rank-meta span {
  padding: 7px 11px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 14px 34px rgba(2, 6, 23, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
  box-shadow: 0 18px 38px rgba(8, 145, 178, 0.32);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(2, 6, 23, 0.38);
}

.hero-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.58);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  overflow: hidden;
}

.hero-panel img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.hero-panel-body {
  padding: 20px;
}

.hero-panel-body strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
}

.hero-dots button.is-active {
  width: 34px;
  background: var(--cyan);
}

section {
  scroll-margin-top: 96px;
}

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

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

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-head p,
.page-title p,
.category-card p,
.detail-title p,
.copy-block p,
.hero-panel-body p {
  color: var(--soft);
  line-height: 1.75;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 16px 44px rgba(2, 6, 23, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.48);
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.34);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.84);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 44%, rgba(2, 6, 23, 0.82) 100%);
}

.play-dot {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  box-shadow: 0 14px 34px rgba(34, 211, 238, 0.34);
}

.rank-num {
  position: absolute;
  top: 12px;
  left: 12px;
  display: grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: #020617;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
}

.card-body {
  padding: 17px;
}

.card-meta {
  gap: 7px;
  font-size: 12px;
}

.card-meta span,
.card-meta a {
  padding: 4px 8px;
}

.card-body h3 {
  margin: 12px 0 9px;
  font-size: 19px;
  line-height: 1.35;
}

.card-body p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 3.4em;
  margin: 0;
  color: var(--soft);
  font-size: 14px;
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag-row span {
  padding: 4px 8px;
  color: var(--muted);
  font-size: 12px;
}

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

.category-card {
  min-height: 188px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.22), transparent 9rem),
    rgba(15, 23, 42, 0.72);
  box-shadow: 0 16px 42px rgba(2, 6, 23, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.48);
}

.category-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
}

.page-main {
  padding: 54px 0 80px;
}

.page-title {
  display: grid;
  gap: 14px;
  margin-bottom: 30px;
}

.filter-panel {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
}

.search-box {
  display: grid;
  flex: 1 1 360px;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  color: #ffffff;
  outline: none;
  background: rgba(2, 6, 23, 0.54);
}

.search-box input:focus {
  border-color: rgba(34, 211, 238, 0.58);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-actions button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(2, 6, 23, 0.42);
}

.filter-actions button.is-active,
.filter-actions button:hover {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
}

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

.rank-item {
  display: grid;
  grid-template-columns: 74px 104px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

.rank-index {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 18px;
  color: #020617;
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
}

.rank-item img {
  width: 104px;
  height: 138px;
  border-radius: 16px;
  object-fit: cover;
}

.rank-copy h2 {
  margin: 0 0 9px;
  font-size: 24px;
}

.rank-copy p {
  margin: 10px 0 0;
  color: var(--soft);
  line-height: 1.7;
}

.detail-hero {
  padding: 40px 0 34px;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 28rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.68), rgba(2, 6, 23, 0));
}

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

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: var(--shadow);
}

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

.detail-title {
  display: grid;
  gap: 18px;
}

.detail-title h1 {
  font-size: clamp(36px, 6vw, 68px);
}

.player-card {
  margin-top: 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

.player-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

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

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.66));
  cursor: pointer;
}

.player-start span {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 50%;
  font-size: 32px;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  box-shadow: 0 22px 58px rgba(34, 211, 238, 0.36);
}

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

.copy-block {
  display: grid;
  gap: 18px;
  margin-top: 34px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.72);
}

.copy-block h2 {
  margin: 0;
  font-size: 26px;
}

.detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

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

.footer-inner {
  display: flex;
  gap: 30px;
  align-items: center;
  justify-content: space-between;
  padding: 34px 0;
}

.footer-inner p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.footer-links a {
  padding: 9px 13px;
}

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

.empty-state {
  display: none;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 22px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.72);
}

.empty-state.is-visible {
  display: block;
}

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

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

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

  .hero-panel {
    max-width: 420px;
  }
}

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

  .menu-button {
    display: block;
  }

  .hero,
  .hero-shell {
    min-height: 68vh;
  }

  .hero-shell {
    padding: 48px 0 74px;
  }

  .hero-panel {
    display: none;
  }

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

  .section-head,
  .filter-panel,
  .footer-inner {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .rank-item {
    grid-template-columns: 52px 88px minmax(0, 1fr);
  }

  .rank-item .btn {
    grid-column: 2 / -1;
  }

  .rank-item img {
    width: 88px;
    height: 120px;
  }
}

@media (max-width: 540px) {
  .header-inner,
  .footer-inner,
  .section-inner,
  .hero-shell,
  .page-main {
    width: min(100% - 22px, 1180px);
  }

  .brand-text em {
    display: none;
  }

  .hero h1 {
    font-size: 38px;
  }

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

  .rank-item {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .rank-item img {
    display: none;
  }

  .rank-item .btn {
    grid-column: 1 / -1;
  }
}
