:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --border: rgba(34, 211, 238, 0.20);
  --cyan: #22d3ee;
  --blue: #60a5fa;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 34rem),
    radial-gradient(circle at 80% 0%, rgba(96, 165, 250, 0.20), transparent 35rem),
    linear-gradient(135deg, #020617 0%, #0b1b3b 48%, #020617 100%);
  min-height: 100vh;
}

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

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

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

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

.nav-shell {
  max-width: 1240px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--cyan);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #06121f;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 35px rgba(34, 211, 238, 0.28);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #cbd5e1;
  font-size: 15px;
  font-weight: 650;
}

.nav-links a,
.mobile-menu a,
.footer-grid a {
  transition: color 0.2s ease;
}

.nav-links a:hover,
.mobile-menu a:hover,
.footer-grid a:hover {
  color: var(--cyan);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  font-size: 20px;
}

.mobile-menu {
  display: none;
  padding: 0 22px 18px;
  border-top: 1px solid rgba(34, 211, 238, 0.12);
}

.mobile-menu a {
  display: block;
  padding: 12px 0;
  color: #cbd5e1;
  font-weight: 650;
}

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

main {
  min-height: 66vh;
}

.container {
  width: min(1240px, calc(100% - 36px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  border-bottom: 1px solid rgba(34, 211, 238, 0.12);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
  background-size: cover;
  background-position: center;
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.35)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.96), transparent 48%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 36px));
  min-height: 640px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 390px;
  align-items: center;
  gap: 48px;
  padding: 72px 0 58px;
}

.hero-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(8, 47, 73, 0.48);
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.14);
  font-weight: 700;
}

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

.gradient-title {
  background: linear-gradient(90deg, #f8fafc, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  max-width: 720px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.86;
}

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

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #06121f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 45px rgba(34, 211, 238, 0.22);
}

.btn-secondary,
.btn-ghost {
  color: #e2e8f0;
  border: 1px solid rgba(34, 211, 238, 0.22);
  background: rgba(15, 23, 42, 0.62);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.48);
}

.hero-search {
  display: flex;
  max-width: 620px;
  padding: 8px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.58);
  box-shadow: var(--shadow);
}

.hero-search input,
.search-panel input,
.filter-input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 16px;
}

.hero-search input {
  padding: 0 16px;
}

.hero-search button,
.search-panel button {
  border: 0;
  border-radius: 12px;
  color: #06121f;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-weight: 800;
  padding: 0 20px;
}

.hero-side {
  padding: 18px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-side img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 22px;
  object-fit: cover;
  background: linear-gradient(135deg, #0f172a, #164e63);
}

.hero-side h2 {
  margin: 18px 0 8px;
  font-size: 26px;
}

.hero-side p {
  color: var(--muted);
  line-height: 1.75;
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 1px solid rgba(226, 232, 240, 0.55);
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.36);
}

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

.section {
  padding: 64px 0 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.16;
}

.section-desc {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.7;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.16);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.46);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.30);
}

.card-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #164e63);
}

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

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

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: #06121f;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.95);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.score-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #06121f;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

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

.card-body p {
  min-height: 48px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

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

.meta-line span,
.tag-row span,
.detail-tags span,
.breadcrumb a,
.breadcrumb span {
  padding: 5px 9px;
  border: 1px solid rgba(34, 211, 238, 0.14);
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(8, 47, 73, 0.42);
  font-size: 12px;
}

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

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

.category-card {
  padding: 22px;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.50));
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-card h3 {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 21px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 15px;
  padding: 12px;
  border: 1px solid rgba(34, 211, 238, 0.16);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.68);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.45);
}

.rank-item img {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(135deg, #0f172a, #164e63);
}

.rank-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

.rank-item em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.5;
}

.rank-item b {
  color: var(--cyan);
  font-size: 18px;
}

.page-hero {
  padding: 76px 0 28px;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 820px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.85;
}

.filter-bar,
.search-panel {
  margin: 26px 0;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.68);
}

.filter-bar {
  padding: 16px 18px;
}

.filter-input {
  padding: 14px 4px;
}

.search-panel {
  display: flex;
  gap: 12px;
  padding: 10px;
}

.search-panel input {
  padding: 0 14px;
}

.search-panel button {
  min-width: 96px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 30px;
  align-items: start;
  padding-top: 32px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 26px;
  background: #020617;
  box-shadow: var(--shadow);
}

.player-box video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
  object-fit: cover;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 0;
  color: #06121f;
  background: rgba(2, 6, 23, 0.28);
}

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

.player-cover span {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 70px rgba(34, 211, 238, 0.36);
  font-size: 30px;
}

.detail-panel,
.side-panel {
  border: 1px solid rgba(34, 211, 238, 0.16);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.2);
}

.detail-panel {
  margin-top: 24px;
  padding: 28px;
}

.detail-panel h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.12;
}

.detail-panel h2,
.side-panel h2 {
  margin: 0 0 16px;
  color: var(--cyan);
  font-size: 24px;
}

.detail-panel p {
  color: #cbd5e1;
  line-height: 1.9;
}

.detail-tags {
  margin: 18px 0 24px;
}

.side-panel {
  padding: 18px;
}

.side-panel + .side-panel {
  margin-top: 20px;
}

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

.site-footer {
  margin-top: 78px;
  border-top: 1px solid rgba(34, 211, 238, 0.16);
  background: rgba(2, 6, 23, 0.50);
}

.footer-grid {
  width: min(1240px, calc(100% - 36px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 34px;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: var(--cyan);
}

.footer-grid p,
.footer-grid li {
  color: var(--muted);
  line-height: 1.8;
}

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

.footer-bottom {
  width: min(1240px, calc(100% - 36px));
  margin: 0 auto;
  padding: 18px 0 34px;
  color: var(--muted-2);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.hidden-card {
  display: none;
}

.index-list {
  columns: 4 240px;
  column-gap: 28px;
  margin-top: 18px;
}

.index-list a {
  display: block;
  break-inside: avoid;
  padding: 9px 0;
  color: #cbd5e1;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.index-list a:hover {
  color: var(--cyan);
}

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

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

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

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

  .nav-toggle {
    display: block;
  }

  .hero,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 58px 0 72px;
  }

  .hero-side {
    display: none;
  }

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

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

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

@media (max-width: 560px) {
  .container,
  .hero-content,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 28px, 1240px);
  }

  .hero-search,
  .search-panel,
  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-search button,
  .search-panel button {
    height: 44px;
  }

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

  .rank-item {
    grid-template-columns: 58px 1fr;
  }

  .rank-item b {
    display: none;
  }

  .rank-item img {
    width: 58px;
    height: 78px;
  }

  .detail-panel {
    padding: 20px;
  }
}
