/* ==========================================================================
   SOULDREAM 幻梦短剧 — landing page styles
   Dark cinematic theme. System font stack (no external font CDN — keeps the
   page fast and dependency-free inside mainland China networks).
   ========================================================================== */

:root {
  --bg: #0a0a0d;
  --bg-elev: #121218;
  --bg-elev-2: #191922;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f2f2f5;
  --text-dim: #a0a0ae;
  --text-faint: #6e6e7c;
  --accent: #ff4d6d;
  --accent-2: #ff9a5a;
  --accent-soft: rgba(255, 77, 109, 0.14);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --header-h: 64px;
  --container: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 22px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------------------------------------------------------------- header */

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  background: rgba(10, 10, 13, 0.55);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: background 0.25s, border-color 0.25s;
}
.site-header.is-scrolled {
  background: rgba(10, 10, 13, 0.86);
  border-bottom-color: var(--line);
}

.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
}

.brand { display: flex; align-items: baseline; gap: 9px; flex-shrink: 0; }
.brand-mark { width: 26px; height: 26px; align-self: center; }
.brand-name {
  font-weight: 800; letter-spacing: 0.12em; font-size: 17px;
  background: linear-gradient(92deg, #fff, #ffd9df 60%, var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-sub { font-size: 12px; color: var(--text-faint); letter-spacing: 0.2em; }

.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav a { font-size: 14.5px; color: var(--text-dim); transition: color 0.18s; }
.main-nav a:hover { color: var(--text); }
.main-nav .nav-cta {
  color: #fff; background: var(--accent);
  padding: 8px 18px; border-radius: 999px; font-weight: 600;
  box-shadow: 0 6px 20px rgba(255, 77, 109, 0.35);
  transition: transform 0.18s, box-shadow 0.18s;
}
.main-nav .nav-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(255, 77, 109, 0.45); }

.nav-toggle {
  display: none; flex-direction: column; gap: 4.5px;
  background: none; border: 0; padding: 10px;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.2s; }

.nav-drawer {
  display: none; flex-direction: column; gap: 4px;
  padding: 8px 22px 18px;
  background: rgba(10, 10, 13, 0.97);
  border-bottom: 1px solid var(--line);
}
.nav-drawer a { padding: 11px 4px; color: var(--text-dim); border-bottom: 1px solid rgba(255,255,255,0.05); }
.nav-drawer a.nav-cta {
  color: #fff; background: var(--accent); text-align: center; border-radius: 999px;
  border: 0; margin-top: 10px; padding: 12px;
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  min-height: max(620px, 92vh);
  display: flex; align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.hero-slides { position: absolute; inset: 0; z-index: -2; }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transform: scale(1.06);
  transition: opacity 1.1s ease, transform 7s linear;
}
.hero-slide.is-active { opacity: 1; transform: scale(1); }

.hero-scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(10,10,13,0.72) 0%, rgba(10,10,13,0.20) 34%, rgba(10,10,13,0.86) 74%, var(--bg) 100%),
    radial-gradient(120% 90% at 12% 88%, rgba(255,77,109,0.20), transparent 58%);
}

.hero-content { padding: 140px 22px 64px; position: relative; }
.hero-eyebrow {
  margin: 0 0 14px; font-size: 13px; letter-spacing: 0.28em;
  color: var(--accent-2); text-transform: uppercase; font-weight: 600;
}
.hero-title {
  margin: 0 0 16px;
  font-size: clamp(34px, 6.4vw, 62px);
  line-height: 1.14; font-weight: 800; letter-spacing: -0.01em;
  max-width: 15em; text-wrap: balance;
  text-shadow: 0 4px 30px rgba(0,0,0,0.5);
}
.hero-sub {
  margin: 0 0 28px; max-width: 34em;
  color: var(--text-dim); font-size: clamp(15px, 1.8vw, 17.5px);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 30px; border-radius: 999px; font-size: 15.5px; font-weight: 600;
  border: 1px solid transparent; transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
}
.btn-primary {
  background: linear-gradient(94deg, var(--accent), var(--accent-2));
  color: #fff; box-shadow: 0 10px 30px rgba(255, 77, 109, 0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 38px rgba(255, 77, 109, 0.5); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.07); color: var(--text);
  border-color: rgba(255, 255, 255, 0.18); backdrop-filter: blur(6px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.13); }

.hero-stats {
  display: flex; gap: clamp(24px, 5vw, 58px); margin: 0; padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}
.hero-stats dt { font-size: 12.5px; color: var(--text-faint); letter-spacing: 0.08em; }
.hero-stats dd {
  margin: 2px 0 0; font-size: clamp(22px, 3vw, 30px); font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.hero-dots {
  position: absolute; right: 26px; bottom: 40px; display: flex; gap: 9px; z-index: 2;
}
.hero-dot {
  width: 26px; height: 3px; border-radius: 3px; border: 0; padding: 0;
  background: rgba(255, 255, 255, 0.28); transition: background 0.3s, width 0.3s;
}
.hero-dot.is-active { background: var(--accent); width: 40px; }

/* ------------------------------------------------------------ categories */

.categories { padding: 40px 0 6px; }
.chip-row {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px;
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; padding: 9px 20px; border-radius: 999px;
  background: var(--bg-elev); border: 1px solid var(--line);
  color: var(--text-dim); font-size: 14px; transition: 0.18s;
}
.chip:hover { color: var(--text); border-color: rgba(255,255,255,0.22); }
.chip.is-active {
  background: var(--accent-soft); border-color: rgba(255,77,109,0.5);
  color: #fff; font-weight: 600;
}

/* -------------------------------------------------------------- sections */

.section { padding: 34px 0 8px; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 18px; margin-bottom: 18px;
}
.section-title {
  margin: 0; font-size: clamp(21px, 2.6vw, 27px); font-weight: 800; letter-spacing: -0.01em;
}
.section-sub { margin: 4px 0 0; color: var(--text-faint); font-size: 14px; }
.section-more { color: var(--text-dim); font-size: 14px; white-space: nowrap; }
.section-more:hover { color: var(--accent); }

.card-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
}

.card {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-align: left; padding: 0; color: inherit;
  transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
  display: flex; flex-direction: column;
  cursor: pointer;
}
.card:hover {
  transform: translateY(-5px); box-shadow: var(--shadow);
  border-color: rgba(255, 255, 255, 0.2);
}
.card-poster {
  position: relative; aspect-ratio: 2 / 3; overflow: hidden; background: var(--bg-elev-2);
}
.card-poster img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease, filter 0.3s;
}
.card:hover .card-poster img { transform: scale(1.06); }
.card-badge {
  position: absolute; top: 10px; left: 10px;
  padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  background: rgba(10, 10, 13, 0.72); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22); backdrop-filter: blur(6px);
}
.card-badge.is-hot { background: var(--accent); border-color: transparent; }
.card-score {
  position: absolute; top: 10px; right: 10px;
  padding: 3px 8px; border-radius: 7px; font-size: 12px; font-weight: 800;
  background: rgba(255, 214, 102, 0.95); color: #241a00; font-variant-numeric: tabular-nums;
}
.card-body { padding: 12px 13px 14px; display: flex; flex-direction: column; gap: 5px; }
.card-title {
  margin: 0; font-size: 15.5px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-sub {
  margin: 0; font-size: 12.5px; color: var(--text-faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-meta { display: flex; align-items: center; gap: 8px; margin-top: 3px; font-size: 11.5px; color: var(--text-faint); }
.card-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.6; }

/* ranking list */
.rank-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.rank-item {
  display: flex; gap: 14px; align-items: center;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px; cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
  text-align: left; color: inherit;
}
.rank-item:hover { transform: translateX(3px); border-color: rgba(255,255,255,0.22); }
.rank-num {
  width: 34px; text-align: center; flex-shrink: 0;
  font-size: 22px; font-weight: 900; font-style: italic;
  color: var(--text-faint); font-variant-numeric: tabular-nums;
}
.rank-item:nth-child(1) .rank-num, .rank-grid > .rank-item:first-child .rank-num { color: var(--accent); }
.rank-poster { width: 52px; aspect-ratio: 2/3; border-radius: 7px; overflow: hidden; flex-shrink: 0; }
.rank-poster img { width: 100%; height: 100%; object-fit: cover; }
.rank-info { min-width: 0; }
.rank-title { margin: 0; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-sub { margin: 2px 0 0; font-size: 12.5px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-heat { margin-left: auto; flex-shrink: 0; font-size: 12px; color: var(--accent-2); font-variant-numeric: tabular-nums; }

.empty-state {
  padding: 48px 20px; text-align: center; color: var(--text-faint);
  border: 1px dashed var(--line); border-radius: var(--radius);
}

/* -------------------------------------------------------------- features */

.features { padding: 72px 0 20px; }
.section-sub-center { text-align: center; margin: 6px 0 34px; color: var(--text-faint); font-size: 15px; }
.features .section-title { text-align: center; }
.feature-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.feature-card {
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 22px;
  transition: transform 0.22s, border-color 0.22s;
}
.feature-card:hover { transform: translateY(-4px); border-color: rgba(255, 77, 109, 0.4); }
.feature-icon {
  width: 44px; height: 44px; border-radius: 12px; margin-bottom: 14px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-card h3 { margin: 0 0 6px; font-size: 17px; }
.feature-card p { margin: 0; font-size: 14px; color: var(--text-dim); }

/* -------------------------------------------------------------- download */

.download { padding: 70px 0 90px; }
.download-inner {
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 44px; align-items: center;
  background: linear-gradient(120deg, var(--bg-elev) 0%, #1a1220 100%);
  border: 1px solid var(--line); border-radius: 22px; padding: clamp(28px, 4vw, 52px);
  position: relative; overflow: hidden;
}
.download-inner::before {
  content: ""; position: absolute; inset: auto -10% -60% auto; width: 60%; height: 140%;
  background: radial-gradient(closest-side, rgba(255, 77, 109, 0.18), transparent);
  pointer-events: none;
}
.download-copy h2 { margin: 0 0 10px; font-size: clamp(23px, 3vw, 31px); font-weight: 800; }
.download-copy > p { margin: 0 0 24px; color: var(--text-dim); }
.dl-buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.dl-btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 22px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.16);
  transition: 0.2s;
}
.dl-btn:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-2px); }
.dl-btn svg { width: 26px; height: 26px; }
.dl-btn span { display: flex; flex-direction: column; line-height: 1.25; font-size: 14.5px; font-weight: 600; }
.dl-btn small { font-size: 11px; color: var(--text-faint); font-weight: 500; letter-spacing: 0.06em; }
.dl-hint { margin: 0; font-size: 12.5px; color: var(--text-faint); max-width: 46ch; }

.download-visual { display: grid; place-items: center; }
.phone {
  width: min(230px, 62vw); aspect-ratio: 9 / 19;
  border-radius: 34px; padding: 9px;
  background: linear-gradient(160deg, #2b2b36, #101016);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255,255,255,0.08);
  position: relative;
}
.phone-notch {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 34%; height: 17px; border-radius: 999px; background: #0a0a0d; z-index: 2;
}
.phone-screen { border-radius: 26px; overflow: hidden; height: 100%; position: relative; }
.phone-screen img { width: 100%; height: 100%; object-fit: cover; }
.phone-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.28);
}
.phone-play svg { width: 52px; height: 52px; color: #fff; opacity: 0.94; filter: drop-shadow(0 4px 16px rgba(0,0,0,0.5)); }

/* ---------------------------------------------------------------- footer */

.site-footer { border-top: 1px solid var(--line); background: #070709; padding: 46px 0 30px; }
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; align-items: flex-start;
  padding-bottom: 26px; margin-bottom: 22px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.footer-brand { display: flex; flex-direction: column; gap: 4px; }
.footer-note { margin: 8px 0 0; font-size: 13.5px; color: var(--text-faint); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.footer-links a { font-size: 14px; color: var(--text-dim); }
.footer-links a:hover { color: var(--text); }
.footer-legal {
  display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between;
  font-size: 12.5px; color: var(--text-faint);
}

/* ----------------------------------------------------------------- modal */

.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4, 4, 6, 0.78); backdrop-filter: blur(6px); }
.modal-panel {
  position: relative; width: min(660px, 100%);
  max-height: min(86vh, 780px); overflow-y: auto;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow);
  animation: modalIn 0.24s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(0.985); } }
.modal-close {
  position: sticky; top: 12px; margin-left: auto; margin-right: 12px;
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.16);
  background: rgba(10,10,13,0.7); color: #fff; display: grid; place-items: center; z-index: 3;
}
.modal-close svg { width: 16px; height: 16px; }
.modal-body { padding: 0 24px 26px; margin-top: -34px; }

.detail-hero { position: relative; border-radius: 14px; overflow: hidden; margin-bottom: 18px; }
.detail-hero img { width: 100%; aspect-ratio: 16/7; object-fit: cover; }
.detail-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, var(--bg-elev) 100%);
}
.detail-head { position: relative; }
.detail-title { margin: 0 0 4px; font-size: 24px; font-weight: 800; }
.detail-sub { margin: 0 0 12px; color: var(--text-faint); font-size: 14px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.tag {
  font-size: 12px; padding: 4px 11px; border-radius: 999px;
  background: var(--bg-elev-2); border: 1px solid var(--line); color: var(--text-dim);
}
.detail-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; color: var(--text-dim); margin-bottom: 14px; }
.detail-synopsis { margin: 0 0 18px; font-size: 14.5px; color: var(--text-dim); line-height: 1.85; }
.ep-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.ep {
  padding: 9px 6px; border-radius: 9px; text-align: center; font-size: 13px;
  background: var(--bg-elev-2); border: 1px solid var(--line); color: var(--text-dim);
}
.ep.is-free { color: #fff; border-color: rgba(255, 77, 109, 0.45); background: var(--accent-soft); }
.ep strong { display: block; font-size: 14px; }
.ep small { font-size: 10.5px; opacity: 0.75; }
.ep-section-title { font-size: 14px; font-weight: 700; margin: 0 0 10px; color: var(--text); }

/* ----------------------------------------------------------------- toast */

.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 20px);
  background: rgba(20, 20, 26, 0.96); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 20px; font-size: 14px; z-index: 300;
  opacity: 0; pointer-events: none; transition: 0.25s;
  max-width: min(90vw, 420px); text-align: center;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------- skeleton */

.skel {
  background: linear-gradient(90deg, var(--bg-elev) 25%, var(--bg-elev-2) 37%, var(--bg-elev) 63%);
  background-size: 400% 100%; animation: shimmer 1.4s infinite linear;
  border-radius: var(--radius);
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ----------------------------------------------------------- responsive */

@media (max-width: 880px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .nav-drawer.is-open { display: flex; }
  .download-inner { grid-template-columns: 1fr; }
  .download-visual { order: -1; }
  .hero-content { padding-top: 118px; }
  .hero-dots { right: auto; left: 22px; bottom: 26px; }
  .hero-stats { gap: 26px; }
  .rank-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 13px; }
  .brand-sub { display: none; }
  .hero-stats dd { font-size: 20px; }
  .modal-body { padding: 0 16px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
  html { scroll-behavior: auto; }
}
