/* =========================================================
   《夜色沉溺》短剧宣传 / 下载落地页
   风格：暗黑视频平台风（深黑底 + 红紫渐变 + 电光蓝点缀）
   ========================================================= */

/* ---------- 1. 主题变量 ---------- */
:root {
  /* 底色 */
  --bg: #0a0709;
  --bg-soft: #150e14;
  --bg-deep: #060406;

  /* 主色 */
  --primary: #ff2f5e;
  --secondary: #7c3aed;
  --accent: #22d3ee;

  /* 文字 */
  --text: #f6f1f5;
  --text-muted: rgba(246, 241, 245, 0.62);
  --text-dim: rgba(246, 241, 245, 0.4);

  /* 结构 */
  --line: rgba(255, 255, 255, 0.09);
  --card: rgba(255, 255, 255, 0.04);
  --card-hover: rgba(255, 255, 255, 0.075);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  /* 渐变与阴影 */
  --grad: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  --grad-text: linear-gradient(120deg, #ff9ab4 0%, var(--primary) 38%, var(--secondary) 100%);
  --shadow-glow: 0 18px 50px -18px rgba(255, 47, 94, 0.65);
  --shadow-card: 0 20px 45px -28px rgba(0, 0, 0, 0.95);

  /* 尺寸 */
  --header-h: 68px;
  --container: 1180px;
}

/* ---------- 2. 基础重置 ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 页面顶部氛围光 */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 620px;
  background:
    radial-gradient(60% 60% at 18% 0%, rgba(255, 47, 94, 0.20), transparent 70%),
    radial-gradient(55% 55% at 85% 8%, rgba(124, 58, 237, 0.22), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

ul {
  list-style: none;
}

::selection {
  background: var(--primary);
  color: #fff;
}

/* ---------- 3. 通用布局 ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.container-narrow {
  max-width: 860px;
}

.section {
  padding: 96px 0;
  position: relative;
}

.section-alt {
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.022) 22%, transparent);
}

.section-head {
  max-width: 720px;
  margin: 0 auto 52px;
  text-align: center;
}

.section-kicker {
  font-size: 13px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.28;
  letter-spacing: 0.01em;
}

.section-sub {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 15px;
}

/* ---------- 4. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 60px -18px rgba(255, 47, 94, 0.85);
}

.btn-ghost {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(255, 47, 94, 0.55);
  background: rgba(255, 47, 94, 0.1);
}

.btn-sm {
  height: 40px;
  padding: 0 20px;
  font-size: 14px;
}

.btn-lg {
  height: 56px;
  padding: 0 30px;
  font-size: 16px;
  flex-direction: column;
  gap: 0;
}

.btn-lg .btn-sub {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.8;
  letter-spacing: 0.04em;
}

.btn-block {
  width: 100%;
}

/* ---------- 5. 顶部导航 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  height: var(--header-h);
  transition: background-color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(10, 7, 9, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand-mark {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--grad);
  font-weight: 700;
  font-size: 19px;
  color: #fff;
  box-shadow: 0 10px 26px -12px rgba(255, 47, 94, 0.9);
}

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

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

.brand-text em {
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-dim);
}

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

.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 15px;
  color: var(--text-muted);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-cta {
  margin-left: 10px;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- 6. 首屏 Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 72px) 0 84px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: saturate(1.15) contrast(1.05);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 7, 9, 0.72) 0%, rgba(10, 7, 9, 0.88) 55%, var(--bg) 100%),
    radial-gradient(70% 55% at 78% 32%, rgba(124, 58, 237, 0.25), transparent 70%);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: 56px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 47, 94, 0.35);
  background: rgba(255, 47, 94, 0.1);
  font-size: 13px;
  color: #ffc2d1;
  margin-bottom: 22px;
}

.hero-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 0 rgba(255, 47, 94, 0.7);
  animation: pulse 1.9s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 47, 94, 0.6); }
  70% { box-shadow: 0 0 0 9px rgba(255, 47, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 47, 94, 0); }
}

.hero-title {
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.06;
  letter-spacing: 0.02em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-title-sub {
  display: block;
  margin-top: 16px;
  font-size: clamp(15px, 2vw, 20px);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  -webkit-text-fill-color: var(--text-muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 22px;
}

.tag {
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  color: var(--text-muted);
}

.tag-hot {
  border-color: transparent;
  background: var(--grad);
  color: #fff;
  font-weight: 600;
}

.hero-desc {
  max-width: 620px;
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.95;
}

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

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.hero-stats strong {
  display: block;
  font-size: clamp(22px, 3vw, 30px);
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-stats span {
  font-size: 12.5px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

/* 海报 */
.hero-poster {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 380px;
}

.poster-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 1), 0 0 0 1px rgba(255, 47, 94, 0.12);
  aspect-ratio: 9 / 14;
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-frame::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(180deg, transparent, rgba(6, 4, 6, 0.92));
}

.poster-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: grid;
  place-items: center;
  transition: transform 0.28s ease, background-color 0.28s ease;
}

.poster-play svg {
  width: 26px;
  height: 26px;
  fill: #fff;
  margin-left: 3px;
}

.poster-play:hover {
  transform: translate(-50%, -50%) scale(1.1);
  background: var(--primary);
  border-color: transparent;
}

.poster-tag {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 2;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(6, 4, 6, 0.72);
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--text-muted);
}

.poster-glow {
  position: absolute;
  inset: 12% -14% -14% -14%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 47, 94, 0.35), transparent 70%);
  filter: blur(38px);
  z-index: -1;
}

/* ---------- 7. 卡片网格 ---------- */
.card-grid {
  display: grid;
  gap: 20px;
}

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

.feature-card {
  padding: 28px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 47, 94, 0.4);
  background: var(--card-hover);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(255, 47, 94, 0.12);
  border: 1px solid rgba(255, 47, 94, 0.28);
  font-size: 22px;
  margin-bottom: 18px;
}

.feature-card h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ---------- 8. 剧情 & 演员 ---------- */
.story-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: 28px;
  align-items: start;
}

.story-text {
  padding: 34px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--card);
}

.story-text p {
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 2;
  margin-bottom: 16px;
  text-indent: 2em;
}

.story-points {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px dashed var(--line);
}

.story-points li {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 14.5px;
  color: var(--text-muted);
}

.story-points strong {
  flex: none;
  color: var(--accent);
  font-weight: 600;
}

.cast-panel {
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--card);
}

.panel-title {
  font-size: 16px;
  margin-bottom: 18px;
  padding-left: 12px;
  border-left: 3px solid var(--primary);
}

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

.cast-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border-radius: var(--radius);
  transition: background-color 0.25s ease;
}

.cast-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.cast-item img {
  width: 54px;
  height: 54px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 47, 94, 0.35);
}

.cast-item strong {
  display: block;
  font-size: 15px;
}

.cast-item span {
  font-size: 12.5px;
  color: var(--text-dim);
}

/* ---------- 9. 选集 ---------- */
.episode-wrap {
  padding: 30px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--card);
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 12px;
  max-height: 420px;
  overflow: hidden;
  transition: max-height 0.45s ease;
}

.episode-grid.is-collapsed {
  max-height: 268px;
  -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
}

.ep-chip {
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  font-size: 14px;
  color: var(--text-muted);
  transition: all 0.22s ease;
}

.ep-chip:hover {
  color: #fff;
  border-color: transparent;
  background: var(--grad);
  transform: translateY(-3px);
}

.ep-chip.is-latest {
  color: #ffc2d1;
  border-color: rgba(255, 47, 94, 0.45);
}

#episodeToggle {
  margin-top: 24px;
}

/* ---------- 10. 剧照 ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  cursor: zoom-in;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.gallery-item:hover img {
  transform: scale(1.07);
}

.gallery-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 34px 18px 14px;
  font-size: 13.5px;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(6, 4, 6, 0.9));
}

/* ---------- 11. 下载中心 ---------- */
.download {
  scroll-margin-top: var(--header-h);
}

.download::before {
  content: "";
  position: absolute;
  inset: 8% 0;
  background: radial-gradient(45% 55% at 50% 50%, rgba(255, 47, 94, 0.14), transparent 72%);
  pointer-events: none;
}

.download-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: 24px;
  align-items: start;
}

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

.download-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  transition: transform 0.28s ease, border-color 0.28s ease, background-color 0.28s ease;
}

.download-item:hover {
  transform: translateX(6px);
  border-color: rgba(255, 47, 94, 0.45);
  background: var(--card-hover);
}

.download-item.is-primary {
  border-color: rgba(255, 47, 94, 0.5);
  background: linear-gradient(120deg, rgba(255, 47, 94, 0.16), rgba(124, 58, 237, 0.14));
}

.dl-icon {
  width: 52px;
  height: 52px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line);
  font-size: 24px;
}

.dl-body {
  flex: 1;
  min-width: 0;
}

.dl-body strong {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
}

.dl-body em {
  font-style: normal;
  font-size: 13px;
  color: var(--text-dim);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dl-go {
  flex: none;
  padding: 9px 20px;
  border-radius: 999px;
  background: var(--grad);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

/* 下载侧栏 */
.download-panel {
  padding: 26px 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--card);
  text-align: center;
}

.qr-box {
  width: 168px;
  height: 168px;
  margin: 0 auto;
  padding: 8px;
  border-radius: var(--radius);
  background: #fff;
}

.qr-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  border: 2px dashed rgba(0, 0, 0, 0.28);
  display: grid;
  place-content: center;
  gap: 6px;
  color: #4b4b4b;
}

.qr-placeholder span {
  font-size: 15px;
  font-weight: 700;
}

.qr-placeholder small {
  font-size: 11px;
  color: #8a8a8a;
  max-width: 110px;
  line-height: 1.4;
}

.qr-tip {
  margin: 16px 0 22px;
  font-size: 13px;
  color: var(--text-muted);
}

.code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px dashed rgba(255, 47, 94, 0.45);
  background: rgba(255, 47, 94, 0.08);
  text-align: left;
}

.code-label {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
}

.code-box strong {
  font-size: 20px;
  letter-spacing: 0.14em;
  color: #ffc2d1;
}

.safe-list {
  display: grid;
  gap: 10px;
  margin-top: 22px;
  text-align: left;
}

.safe-list li {
  font-size: 13.5px;
  color: var(--text-muted);
}

/* ---------- 12. FAQ ---------- */
.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  overflow: hidden;
  transition: border-color 0.25s ease;
}

.faq-item.is-open {
  border-color: rgba(255, 47, 94, 0.4);
}

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  text-align: left;
  font-size: 15.5px;
  font-weight: 500;
}

.faq-arrow {
  position: relative;
  width: 14px;
  height: 14px;
  flex: none;
}

.faq-arrow::before,
.faq-arrow::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
  transition: transform 0.28s ease;
}

.faq-arrow::after {
  transform: rotate(90deg);
}

.faq-item.is-open .faq-arrow::after {
  transform: rotate(0deg);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-a p {
  padding: 0 22px 20px;
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.9;
}

/* ---------- 13. 页脚 ---------- */
.site-footer {
  margin-top: 40px;
  padding: 52px 0 120px;
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
}

.footer-inner {
  display: grid;
  gap: 20px;
  justify-items: center;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
}

.footer-brand strong {
  display: block;
  font-size: 15px;
}

.footer-brand p {
  font-size: 12.5px;
  color: var(--text-dim);
}

.footer-disclaimer {
  max-width: 760px;
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.9;
}

.footer-copy {
  font-size: 12px;
  color: rgba(246, 241, 245, 0.28);
}

/* ---------- 14. 悬浮下载条 ---------- */
.float-bar {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 95;
  width: min(680px, calc(100% - 32px));
  transform: translate(-50%, 140%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px 12px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 47, 94, 0.35);
  background: rgba(16, 10, 16, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 1);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
  opacity: 0;
}

.float-bar.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.float-info strong {
  display: block;
  font-size: 14.5px;
}

.float-info span {
  font-size: 12px;
  color: var(--text-dim);
}

/* ---------- 15. 回到顶部 ---------- */
.back-top {
  position: fixed;
  right: 22px;
  bottom: 96px;
  z-index: 94;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(16, 10, 16, 0.85);
  backdrop-filter: blur(10px);
  color: var(--text);
  font-size: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.back-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.back-top:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
}

/* ---------- 16. 灯箱 ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-content: center;
  gap: 14px;
  padding: 24px;
  background: rgba(6, 4, 6, 0.92);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.25s ease;
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: min(1000px, 92vw);
  max-height: 76vh;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 1);
}

.lightbox-caption {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

.lightbox-close {
  position: absolute;
  top: 22px;
  right: 26px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  font-size: 24px;
  line-height: 1;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.lightbox-close:hover {
  background: var(--primary);
  border-color: transparent;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- 17. Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  top: 88px;
  z-index: 130;
  transform: translate(-50%, -18px);
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid rgba(255, 47, 94, 0.45);
  background: rgba(20, 12, 18, 0.95);
  backdrop-filter: blur(12px);
  font-size: 14px;
  color: #ffd7e0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- 18. 滚动渐入动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 19. 响应式 ---------- */
@media (max-width: 1080px) {
  .hero-inner {
    gap: 40px;
  }

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

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

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px 20px 24px;
    background: rgba(10, 7, 9, 0.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-14px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.28s ease;
  }

  .nav.is-open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .nav-link {
    padding: 13px 14px;
    font-size: 16px;
  }

  .nav-cta {
    margin: 10px 0 0;
  }

  .hero {
    padding-top: calc(var(--header-h) + 44px);
  }

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-badge,
  .tag-list,
  .hero-actions {
    justify-content: center;
  }

  .hero-desc {
    margin: 0 auto;
  }

  .hero-poster {
    order: -1;
    max-width: 300px;
  }

  .story-layout,
  .download-layout {
    grid-template-columns: 1fr;
  }

  .story-text p {
    text-indent: 0;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 68px 0;
  }

  .container {
    padding: 0 18px;
  }

  .section-head {
    margin-bottom: 34px;
  }

  .cols-4 {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 12px;
  }

  .hero-actions .btn-lg {
    width: 100%;
  }

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

  .episode-grid {
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 9px;
  }

  .episode-wrap,
  .story-text,
  .cast-panel {
    padding: 20px;
  }

  .download-item {
    gap: 14px;
    padding: 16px;
  }

  .dl-icon {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  .dl-body em {
    white-space: normal;
  }

  .dl-go {
    padding: 8px 15px;
    font-size: 13px;
  }

  .float-bar {
    padding: 10px 12px 10px 16px;
  }

  .back-top {
    right: 16px;
    bottom: 88px;
  }

  .site-footer {
    padding-bottom: 108px;
  }
}
