:root {
    --brand: #d7263d;
    --brand-dark: #9e182a;
    --bg: #0d0b12;
    --card: #181420;
    --text: #f4f1f7;
    --muted: #a39bb0;
    --gold: #f2c14e;
    --radius: 14px;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; }
  body {
    background: var(--bg);
    color: var(--text);
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
  }
  img { display: block; max-width: 100%; }
  a { color: inherit; text-decoration: none; }

  /* 顶部播放进度条 & 选集条 */
  .top-bar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(13, 11, 18, 0.92);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .progress-track { height: 3px; background: rgba(255,255,255,0.1); position: relative; }
  .progress-fill { height: 100%; width: 0; background: var(--brand); transition: width 0.15s linear; }
  .bar-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 8px 16px;
  }
  .brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
  .brand img { height: 30px; width: auto; }
  .episodes { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .episodes::-webkit-scrollbar { display: none; }
  .episodes a {
    font-size: 12px; padding: 4px 10px; border-radius: 20px; white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.15); color: var(--muted); transition: 0.2s;
  }
  .episodes a:hover, .episodes a.active { color: #fff; background: var(--brand); border-color: var(--brand); }

  main { padding-top: 62px; }

  /* 通用幕结构 */
  .act { padding: 64px 20px; position: relative; }
  .act-label {
    display: inline-block; font-size: 12px; letter-spacing: 2px;
    color: var(--brand); border: 1px solid rgba(215,38,61,0.5);
    padding: 2px 10px; border-radius: 20px; margin-bottom: 14px;
  }
  .act h2 { font-size: clamp(22px, 4vw, 32px); margin-bottom: 10px; line-height: 1.3; }
  .act h2 .hl { color: var(--brand); }
  .act-intro { color: var(--muted); max-width: 640px; margin-bottom: 32px; font-size: 15px; }
  .wrap { max-width: 1180px; margin: 0 auto; }

  /* 第1幕 首屏 */
  .hero {
    min-height: 82vh; display: flex; flex-direction: column; justify-content: center;
    padding: 70px 20px 30px; text-align: center;
    background: radial-gradient(circle at 50% 20%, #2a1220 0%, var(--bg) 60%);
  }
  .hero h1 { font-size: clamp(28px, 6vw, 52px); line-height: 1.25; margin-bottom: 18px; }
  .hero h1 .hl { color: var(--brand); }
  .hero p { color: var(--muted); max-width: 620px; margin: 0 auto 26px; font-size: 16px; }
  .btn-download {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--brand); color: #fff; font-weight: 700;
    padding: 14px 34px; border-radius: 40px; font-size: 16px;
    box-shadow: 0 8px 24px rgba(215,38,61,0.35); transition: transform 0.2s, background 0.2s;
  }
  .btn-download:hover { transform: translateY(-2px); background: var(--brand-dark); }
  .btn-sub { display: block; margin-top: 12px; font-size: 13px; color: var(--muted); }

  /* 跑马灯 */
  .marquee { margin-top: 48px; overflow: hidden; }
  .marquee-track { display: flex; gap: 10px; width: max-content; animation: scrollX 40s linear infinite; }
  .marquee:hover .marquee-track { animation-play-state: paused; }
  .marquee img { height: 120px; width: auto; border-radius: 8px; object-fit: cover; }
  @keyframes scrollX { from { transform: translateX(0); } to { transform: translateX(-50%); } }

  /* 第2幕 登场人物 */
  .cast-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px;
  }
  .cast-card {
    background: var(--card); border-radius: var(--radius); overflow: hidden;
    opacity: 1; transform: translateY(18px); transition: transform 0.6s ease;
  }
  .cast-card.in { transform: translateY(0); }
  .cast-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
  .cast-body { padding: 12px; }
  .cast-body h3 { font-size: 15px; margin-bottom: 4px; }
  .cast-tags { font-size: 12px; color: var(--muted); }
  .cast-tags span { display: inline-block; background: rgba(255,255,255,0.07); padding: 1px 7px; border-radius: 10px; margin-right: 4px; margin-top: 6px; }

  /* 第3幕 剧本 */
  .script-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
  .script-card {
    background: #f6f1e7; color: #2b2320; border-radius: 6px; padding: 22px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4); transform: perspective(900px) rotateY(0deg);
    transition: transform 0.4s ease;
  }
  .script-card:hover { transform: perspective(900px) rotateY(-2deg); }
  .script-card h3 { font-size: 17px; margin-bottom: 10px; color: var(--brand-dark); }
  .script-pic-row { display: flex; gap: 8px; margin-bottom: 12px; }
  .script-pic-row img { width: 33%; border-radius: 4px; aspect-ratio: 3/4; object-fit: cover; }
  .script-line { font-size: 14px; line-height: 1.9; border-left: 2px solid var(--brand); padding-left: 10px; }

  /* 第4幕 照片墙 */
  .polaroid-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 22px; }
  .polaroid {
    background: #fdfcf8; padding: 9px 9px 38px; border-radius: 4px;
    position: relative; color: #333; transition: transform 0.3s;
  }
  .polaroid:nth-child(odd) { transform: rotate(-2.5deg); }
  .polaroid:nth-child(even) { transform: rotate(2deg); }
  .polaroid:hover { transform: rotate(0) scale(1.03); z-index: 2; }
  .polaroid img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 2px; }
  .polaroid .tape {
    position: absolute; top: -10px; left: 50%; transform: translateX(-50%) rotate(-4deg);
    width: 54px; height: 18px; background: rgba(230,220,190,0.85);
  }
  .polaroid .rank { font-family: "Kaiti SC", "STKaiti", cursive; font-size: 16px; color: var(--brand-dark); margin-top: 8px; }
  .polaroid .review { font-family: "Kaiti SC", "STKaiti", cursive; font-size: 12px; color: #666; }
  .polaroid.top3 { border: 3px solid var(--gold); transform: rotate(0) scale(1.04); }
  .polaroid.top3 img { aspect-ratio: 3/4; }

  /* 第5幕 预告 */
  .preview-box {
    background: var(--brand); border-radius: var(--radius); padding: 36px 26px;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
  }
  .preview-box h3 { font-size: clamp(24px, 4vw, 38px); line-height: 1.25; color: #fff; }
  .countdown { display: flex; gap: 10px; }
  .countdown span {
    display: inline-block; background: rgba(0,0,0,0.3); color: #fff;
    font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums;
    padding: 8px 14px; border-radius: 8px;
  }
  .preview-strip { display: flex; gap: 10px; overflow-x: auto; margin-top: 22px; padding-bottom: 8px; }
  .preview-strip img { height: 110px; width: auto; border-radius: 6px; object-fit: cover; flex: 0 0 auto; }
  .btn-book {
    display: inline-block; background: #fff; color: var(--brand-dark);
    font-weight: 700; padding: 12px 30px; border-radius: 30px; margin-top: 18px;
  }

  /* 第6幕 大结局 */
  .finale { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; }
  .phone {
    width: 240px; margin: 0 auto; background: #000; border: 8px solid #2a2a2a;
    border-radius: 34px; padding: 10px 6px; box-shadow: 0 18px 40px rgba(0,0,0,0.6);
    overflow: hidden; position: relative;
  }
  .phone-track { display: flex; flex-direction: column; gap: 8px; animation: scrollY 26s linear infinite; }
  .phone:hover .phone-track { animation-play-state: paused; }
  .phone-track img { width: 100%; border-radius: 6px; aspect-ratio: 3/4; object-fit: cover; }
  @keyframes scrollY { from { transform: translateY(0); } to { transform: translateY(-50%); } }
  .finale-text h2 { text-align: left; }
  .dl-list { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
  .dl-btn {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--card); border: 1px solid rgba(255,255,255,0.12);
    padding: 14px 20px; border-radius: 12px; transition: 0.2s;
  }
  .dl-btn:hover { border-color: var(--brand); background: rgba(215,38,61,0.1); }
  .dl-btn b { font-size: 15px; }
  .dl-btn small { color: var(--muted); font-size: 12px; }
  .dl-btn span { color: var(--brand); font-weight: 700; }

  /* 弹幕 */
  .danmaku-layer {
    position: fixed; bottom: 12px; left: 0; right: 0; z-index: 50; pointer-events: none;
    overflow: hidden; height: 44px;
  }
  .danmaku { display: flex; gap: 30px; width: max-content; animation: scrollX 55s linear infinite; }
  .danmaku:hover { animation-play-state: paused; }
  .danmaku-item {
    display: flex; align-items: center; gap: 6px; background: rgba(0,0,0,0.55);
    color: #fff; font-size: 12px; padding: 5px 12px; border-radius: 20px; white-space: nowrap;
  }
  .danmaku-item img { height: 18px; width: 18px; border-radius: 50%; object-fit: cover; }

  /* 页脚 */
  footer {
    background: #08060c; border-top: 1px solid rgba(255,255,255,0.06);
    padding: 40px 20px 60px; font-size: 12px; color: #77707f;
  }
  .footer-inner { max-width: 1000px; margin: 0 auto; text-align: center; line-height: 2; }
  .footer-inner a { color: #9b93a6; }
  .footer-inner a:hover { color: var(--brand); }
  .footer-links span { margin: 0 8px; }
  .footer-social { margin: 10px 0; }
  .footer-social a { margin: 0 10px; }
  .copyright { margin-top: 14px; }

  /* 响应式 */
  @media (max-width: 1024px) {
    .finale { gap: 24px; }
    .phone { width: 200px; }
  }
  @media (max-width: 768px) {
    .script-grid { grid-template-columns: 1fr; }
    .finale { grid-template-columns: 1fr; text-align: center; }
    .finale-text h2 { text-align: center; }
    .preview-box { flex-direction: column; text-align: center; }
    .bar-inner { padding: 6px 10px; }
    .episodes a { font-size: 11px; padding: 3px 8px; }
    .danmaku-layer { display: none; }
    .act { padding: 48px 16px; }
  }
  @media (max-width: 480px) {
    .hero { min-height: 76vh; }
    .btn-download { padding: 12px 26px; font-size: 15px; }
    .marquee img { height: 96px; }
    .countdown span { font-size: 20px; padding: 6px 10px; }
    .polaroid-wall { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .cast-grid { grid-template-columns: repeat(2, 1fr); }
  }