:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: #111827;
  --panel-2: #1e293b;
  --line: rgba(34, 211, 238, 0.22);
  --line-strong: rgba(34, 211, 238, 0.42);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --blue: #38bdf8;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.14), transparent 34rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.16), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 72%);
  z-index: -1;
}

img {
  display: block;
  max-width: 100%;
  background: linear-gradient(135deg, #0f172a, #164e63);
}

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

button,
input {
  font: inherit;
}

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

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), #2563eb);
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

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

.brand-text em {
  font-style: normal;
  color: var(--cyan);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

.nav-link,
.mobile-link {
  color: #cbd5e1;
  border-radius: 999px;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-link {
  padding: 10px 15px;
  font-size: 14px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: white;
  background: rgba(34, 211, 238, 0.16);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  color: white;
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
  width: min(1200px, 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.is-open {
  display: grid;
}

.mobile-link {
  padding: 12px 14px;
}

main {
  overflow: hidden;
}

.hero-section {
  position: relative;
  min-height: 720px;
  padding: 88px 0 64px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero-orb {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  filter: blur(20px);
  opacity: 0.36;
  pointer-events: none;
}

.orb-a {
  left: -140px;
  top: 80px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.55), transparent 65%);
}

.orb-b {
  right: -120px;
  bottom: 80px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.52), transparent 65%);
}

.hero-slider {
  position: relative;
  width: min(1200px, calc(100% - 32px));
  min-height: 560px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: 52px;
  min-height: 560px;
  animation: fadeUp 0.65s ease both;
}

.hero-slide.is-active {
  display: grid;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 82px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-desc,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

.hero-tags,
.detail-meta,
.tag-list,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags a,
.hero-tags span,
.detail-meta span,
.tag-list span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #dbeafe;
  font-size: 12px;
}

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

.compact-actions {
  margin-top: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: white;
  background: linear-gradient(135deg, var(--cyan), #2563eb);
  box-shadow: 0 16px 36px rgba(34, 211, 238, 0.24);
}

.btn.ghost {
  color: white;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid var(--line-strong);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 32px;
  transform: perspective(1000px) rotateY(-4deg) rotateX(2deg);
}

.hero-poster img {
  width: 100%;
  height: min(56vw, 520px);
  min-height: 420px;
  object-fit: cover;
  border-radius: 32px;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow), 0 0 60px rgba(34, 211, 238, 0.18);
}

.poster-glow {
  position: absolute;
  inset: 14px;
  border-radius: inherit;
  box-shadow: inset 0 0 80px rgba(2, 6, 23, 0.3);
}

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

.hero-dot {
  width: 38px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.38);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--cyan);
}

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

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

.intro-section {
  padding-top: 42px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading.wide {
  max-width: 960px;
}

.section-heading h2,
.text-panel h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.section-heading p,
.text-panel p,
.category-overview-card p,
.site-footer p {
  margin: 0;
  color: var(--muted);
  line-height: 1.85;
}

.search-panel {
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr);
  align-items: center;
  gap: 16px;
  margin: 26px 0 34px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
}

.search-label {
  color: var(--cyan);
  font-weight: 700;
}

.search-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  color: white;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  outline: none;
  background: rgba(2, 6, 23, 0.76);
}

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

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

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

.movie-card {
  min-width: 0;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.82);
  overflow: hidden;
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card.is-hidden,
.rank-row.is-hidden {
  display: none;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: var(--line-strong);
  box-shadow: 0 22px 45px rgba(2, 6, 23, 0.35), 0 0 32px rgba(34, 211, 238, 0.08);
}

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

.movie-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 0.6s ease;
}

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

.movie-cover-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.1), transparent);
}

.movie-chip,
.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 700;
  background: rgba(8, 145, 178, 0.88);
  backdrop-filter: blur(12px);
}

.rank-badge {
  left: auto;
  right: 12px;
  background: rgba(37, 99, 235, 0.88);
}

.play-hover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  font-size: 30px;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-hover {
  opacity: 1;
  transform: scale(1.12);
}

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

.movie-card h3 {
  margin: 0 0 10px;
  color: white;
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.movie-meta span {
  color: #bfdbfe;
  background: rgba(30, 41, 59, 0.8);
}

.ranking-preview {
  position: relative;
}

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

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

.rank-row {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.78);
  overflow: hidden;
}

.rank-row-link {
  display: grid;
  grid-template-columns: 54px 84px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 94px;
  padding: 12px 16px;
}

.rank-number {
  color: var(--cyan);
  font-size: 21px;
  font-weight: 900;
}

.rank-row img {
  width: 84px;
  height: 62px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.rank-copy strong {
  overflow: hidden;
  color: white;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy em,
.rank-hot {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.rank-hot {
  color: var(--cyan);
  font-weight: 800;
}

.center-action {
  margin-top: 28px;
  text-align: center;
}

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

.category-tile {
  position: relative;
  min-height: 230px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: #0f172a;
}

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

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  transition: transform 0.6s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-tile span,
.category-tile em {
  position: relative;
  z-index: 1;
}

.category-tile span {
  margin-bottom: 8px;
  color: white;
  font-size: 22px;
  font-weight: 900;
}

.category-tile em {
  color: #cbd5e1;
  font-size: 13px;
  font-style: normal;
  line-height: 1.7;
}

.page-hero {
  padding: 92px 0 34px;
}

.page-hero.slim {
  padding-bottom: 12px;
}

.page-hero > div,
.detail-hero,
.text-panel,
.player-shell,
.category-overview-card {
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.page-hero > div {
  padding: clamp(28px, 5vw, 58px);
  border-radius: 32px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 20px;
  padding: 16px;
  border-radius: 24px;
}

.category-overview-media img {
  width: 190px;
  height: 150px;
  border-radius: 18px;
  object-fit: cover;
}

.category-overview-card h2 {
  margin: 0 0 10px;
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.mini-links a {
  padding: 6px 9px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(30, 41, 59, 0.9);
  font-size: 12px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(280px, 430px) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 54px);
  margin-top: 54px;
  padding: clamp(18px, 4vw, 42px);
  border-radius: 34px;
}

.detail-poster img {
  width: 100%;
  height: 100%;
  min-height: 460px;
  object-fit: cover;
  border-radius: 26px;
  border: 1px solid var(--line);
}

.detail-copy {
  align-self: center;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-copy h1 {
  font-size: clamp(38px, 6vw, 70px);
}

.detail-one-line {
  margin: 20px 0;
}

.tag-list {
  margin-top: 16px;
}

.player-section {
  padding-top: 48px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
}

.video-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  outline: none;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 28px;
  border: 0;
  color: white;
  background:
    radial-gradient(circle, rgba(34, 211, 238, 0.26), transparent 18rem),
    linear-gradient(to top, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.38));
  cursor: pointer;
}

.player-overlay[hidden] {
  display: none;
}

.player-button {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  font-size: 34px;
  background: linear-gradient(135deg, var(--cyan), #2563eb);
  box-shadow: 0 0 42px rgba(34, 211, 238, 0.38);
}

.player-overlay strong {
  font-size: clamp(24px, 4vw, 42px);
}

.player-overlay em {
  color: #cbd5e1;
  font-style: normal;
}

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

.text-panel {
  padding: clamp(22px, 4vw, 36px);
  border-radius: 26px;
}

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

.footer-grid,
.footer-bottom {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 36px;
  padding: 48px 0 32px;
}

.footer-brand {
  margin-bottom: 12px;
  color: white;
  font-size: 20px;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: white;
  font-size: 18px;
}

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

.footer-links a {
  padding: 7px 10px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.9);
}

.footer-links a:hover {
  color: white;
  background: rgba(34, 211, 238, 0.16);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 28px;
  color: var(--muted-2);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 13px;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

  .hero-poster img {
    height: 420px;
  }

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

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

  .menu-toggle {
    display: block;
  }

  .nav-shell {
    height: 66px;
  }

  .brand-text strong {
    font-size: 17px;
  }

  .hero-section {
    min-height: auto;
    padding-top: 46px;
  }

  .hero-slider,
  .hero-slide {
    min-height: auto;
  }

  .hero-slide {
    gap: 28px;
  }

  .hero-poster {
    transform: none;
  }

  .hero-poster img {
    min-height: 300px;
    height: 320px;
  }

  .hero-dots {
    position: static;
    transform: none;
    justify-content: center;
    margin-top: 18px;
  }

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

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

  .search-panel {
    grid-template-columns: 1fr;
  }

  .rank-row-link {
    grid-template-columns: 42px 70px minmax(0, 1fr);
  }

  .rank-hot {
    display: none;
  }

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

  .category-overview-media img {
    width: 100%;
  }

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

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .featured-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

  .page-hero {
    padding-top: 54px;
  }

  .detail-hero {
    margin-top: 28px;
  }

  .detail-poster img {
    min-height: 320px;
  }
}
