:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.86);
  --border: rgba(148, 163, 184, 0.22);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --gold: #facc15;
  --rose: #fb7185;
  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(34, 211, 238, 0.16), transparent 32rem),
    radial-gradient(circle at 90% 6%, rgba(59, 130, 246, 0.14), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  color: var(--text);
}

body.menu-open {
  overflow: hidden;
}

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

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

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #00111a;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 10px 34px rgba(34, 211, 238, 0.36);
}

.brand-text,
.footer-logo {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  color: #cbd5e1;
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cyan);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.88);
  cursor: pointer;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #cbd5e1;
  border-radius: 2px;
}

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

.mobile-nav a {
  display: block;
  padding: 12px 10px;
  color: #cbd5e1;
  font-weight: 700;
}

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

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

.hero {
  position: relative;
  margin: 28px auto 42px;
  min-height: 580px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 34px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.62));
  box-shadow: var(--shadow);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: auto;
  border-radius: 999px;
  filter: blur(24px);
  pointer-events: none;
}

.hero::before {
  width: 320px;
  height: 320px;
  right: -110px;
  top: -120px;
  background: rgba(34, 211, 238, 0.28);
}

.hero::after {
  width: 260px;
  height: 260px;
  left: -70px;
  bottom: -80px;
  background: rgba(59, 130, 246, 0.22);
}

.hero-track {
  display: flex;
  width: 100%;
  transition: transform 0.65s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.hero-slide {
  min-width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 40px;
  align-items: center;
  padding: 64px;
  position: relative;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 8px 13px;
  color: #bff8ff;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.hero h1,
.hero h2 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.06em;
  font-weight: 950;
}

.gradient-text {
  background: linear-gradient(90deg, #ffffff, #a5f3fc 42%, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.hero-meta span,
.tag-row span,
.meta-chip,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 13px;
  font-weight: 700;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn-primary,
.btn-secondary,
.btn-small,
.clear-search {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  padding: 14px 22px;
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 40px rgba(34, 211, 238, 0.24);
}

.btn-secondary {
  padding: 13px 20px;
  color: #e2e8f0;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.7);
}

.btn-small {
  padding: 9px 14px;
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-small:hover,
.clear-search:hover {
  transform: translateY(-2px);
}

.hero-visual {
  position: relative;
  z-index: 2;
  border-radius: 30px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.06);
}

.hero-poster-info {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-poster-info strong {
  display: block;
  font-size: 21px;
  margin-bottom: 8px;
}

.hero-poster-info p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.6;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-control.prev {
  left: 18px;
}

.hero-control.next {
  right: 18px;
}

.hero-dots {
  position: absolute;
  left: 64px;
  bottom: 30px;
  z-index: 5;
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: rgba(148, 163, 184, 0.62);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.search-panel,
.section-card,
.category-hero,
.detail-hero,
.player-card,
.article-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.search-panel {
  padding: 20px;
  margin: 0 0 34px;
}

.search-box {
  display: flex;
  gap: 12px;
}

.movie-search {
  width: 100%;
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 999px;
  outline: none;
  color: #f8fafc;
  background: rgba(2, 6, 23, 0.66);
  font-size: 16px;
}

.movie-search:focus {
  border-color: rgba(34, 211, 238, 0.64);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.09);
}

.clear-search {
  padding: 0 18px;
  color: #dbeafe;
  background: rgba(51, 65, 85, 0.88);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.filter-row button {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 999px;
  padding: 8px 12px;
  color: #cbd5e1;
  background: rgba(2, 6, 23, 0.48);
  cursor: pointer;
  font-weight: 800;
}

.filter-row button.active,
.filter-row button:hover {
  color: #00111a;
  border-color: transparent;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

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

.section-head h2,
.category-hero h1,
.detail-title h1,
.library-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-head p,
.category-hero p,
.library-title p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 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.44);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(30, 41, 59, 0.86));
}

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

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

.rating-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #111827;
  background: var(--gold);
  font-size: 12px;
  font-weight: 950;
}

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

.movie-card h3,
.movie-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.movie-card h2 a:hover,
.rank-title:hover,
.compact-card:hover span {
  color: var(--cyan);
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.movie-meta span + span::before {
  content: "·";
  margin-right: 8px;
  color: #475569;
}

.movie-card p {
  display: -webkit-box;
  margin: 0 0 12px;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.68;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.card-category {
  display: inline-flex;
  margin-top: 12px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 850;
}

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

.category-card {
  min-height: 178px;
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(34, 211, 238, 0.16), transparent 40%),
    rgba(15, 23, 42, 0.76);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.7;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 64px 78px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-weight: 950;
}

.rank-item img {
  width: 78px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.rank-title {
  display: inline-block;
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 8px;
}

.rank-desc {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.6;
}

.rank-score {
  text-align: right;
  color: var(--gold);
  font-weight: 950;
  font-size: 20px;
}

.category-hero,
.library-title {
  margin: 32px 0 28px;
  padding: 34px;
  background:
    radial-gradient(circle at 96% 12%, rgba(34, 211, 238, 0.18), transparent 34%),
    rgba(15, 23, 42, 0.72);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
  color: #cbd5e1;
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 32px;
  margin: 32px 0;
  padding: 28px;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

.detail-title h1 {
  margin-bottom: 16px;
}

.detail-title .lead {
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.86;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.meta-chip {
  justify-content: center;
  border-radius: 18px;
  min-height: 50px;
}

.player-card {
  padding: 22px;
  margin-bottom: 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle at center, rgba(34, 211, 238, 0.22), transparent 24%),
    rgba(2, 6, 23, 0.32);
  cursor: pointer;
  z-index: 2;
}

.play-overlay span {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #00111a;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 20px 60px rgba(34, 211, 238, 0.34);
  font-size: 34px;
  font-weight: 950;
}

.play-overlay em {
  font-style: normal;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.play-overlay.is-hidden {
  display: none;
}

.article-card {
  padding: 28px;
  margin-bottom: 28px;
}

.article-card h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.article-card p {
  margin: 0 0 16px;
  color: #dbeafe;
  line-height: 1.95;
  font-size: 17px;
}

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

.compact-card {
  display: block;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.compact-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 10px;
}

.compact-card span {
  display: block;
  font-weight: 900;
  line-height: 1.4;
}

.compact-card small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
}

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

.footer-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 1fr;
  gap: 34px;
}

.footer-brand p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links strong {
  color: #f8fafc;
  margin-bottom: 8px;
}

.footer-links a {
  color: #cbd5e1;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 24px;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.empty-state {
  display: none;
  padding: 26px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 22px;
}

.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-slide {
    grid-template-columns: 1fr;
  }

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

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

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

  .menu-toggle {
    display: block;
  }

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

  .hero {
    min-height: auto;
    border-radius: 26px;
  }

  .hero-slide {
    padding: 34px 22px 78px;
    gap: 24px;
  }

  .hero-dots {
    left: 24px;
  }

  .hero-control {
    display: none;
  }

  .section-head {
    display: block;
  }

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

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

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

  .rank-score {
    grid-column: 3;
    text-align: left;
    font-size: 15px;
  }

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

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

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

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

@media (max-width: 520px) {
  .page-main,
  .nav-shell,
  .mobile-nav,
  .footer-shell,
  .footer-bottom {
    width: min(100% - 22px, 1180px);
  }

  .brand-text {
    font-size: 20px;
  }

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

  .hero-desc {
    font-size: 16px;
  }

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

  .search-box {
    display: grid;
  }

  .clear-search {
    min-height: 46px;
  }

  .category-hero,
  .library-title,
  .detail-hero,
  .article-card,
  .player-card {
    padding: 20px;
    border-radius: 22px;
  }
}
