:root {
    --bg-day: #f4f0e6;
    --text-day: #2b2b2b;
    --brand: #b33a3a;
    --brand-hover: #942e2e;
    --gold: #c9a063;
    --bg-night: #16181d;
    --text-night: #e8e6e1;
    --frame-border: #8c6e4a;
    --font-stack: "Songti SC", "STSong", "SimSun", serif;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }

  body {
    font-family: var(--font-stack);
    background-color: var(--bg-day);
    color: var(--text-day);
    line-height: 1.6;
    transition: background-color 0.6s ease, color 0.6s ease;
  }

  /* 日夜切换基础类 */
  body.night-mode {
    background-color: var(--bg-night);
    color: var(--text-night);
  }

  a { text-decoration: none; color: inherit; }
  img { max-width: 100%; display: block; object-fit: cover; }

  /* 吸顶 Header */
  header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    background: rgba(244, 240, 230, 0.95);
    backdrop-filter: blur(8px);
    z-index: 1000;
    border-bottom: 1px solid rgba(140, 110, 74, 0.2);
    transition: background 0.6s ease, border-color 0.6s ease;
  }

  body.night-mode header {
    background: rgba(22, 24, 29, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .logo-area { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; font-weight: bold; }
  .logo-area img { height: 32px; width: auto; border-radius: 4px; }

  .download-btn {
    background-color: var(--brand);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.3s, transform 0.2s;
    min-height: 44px;
  }
  .download-btn:hover { background-color: var(--brand-hover); transform: translateY(-2px); }
  .download-btn svg { width: 18px; height: 18px; fill: currentColor; }

  /* 游园进度条 (侧边/顶部) */
  .progress-container {
    position: fixed;
    top: 64px; left: 0; width: 100%;
    height: 3px; z-index: 999;
    background: transparent;
  }
  .progress-bar {
    height: 100%;
    background: var(--brand);
    width: 0%;
    transition: width 0.1s;
  }

  /* 月洞门首屏 */
  .hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 100px 20px 40px;
    background: url('images/22d1fcdd-08a2-43de-b327-b738d27d.webp') center/cover no-repeat;
  }
  .hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(244, 240, 230, 0.7);
    z-index: 1;
  }
  .moon-gate {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 600px;
    aspect-ratio: 3/4;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50% 50% 0 0 / 40% 40% 0 0;
    border: 4px solid var(--frame-border);
    box-shadow: 0 0 30px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
  }
  .hero h1 { font-size: 2.2rem; margin-bottom: 20px; color: var(--text-day); line-height: 1.3; }
  .hero p { font-size: 1.1rem; color: #555; margin-bottom: 30px; }

  /* 内容区块通用 */
  section {
    padding: 80px 5%;
    position: relative;
  }
  h2 {
    font-size: 2rem;
    margin-bottom: 40px;
    text-align: center;
    color: var(--brand);
  }
  h3 { font-size: 1.4rem; margin-bottom: 15px; }
  .content-text { max-width: 800px; margin: 0 auto; font-size: 1.1rem; text-align: center; }

  /* 日夜切换标记 */
  .night-transition {
    background: linear-gradient(to bottom, var(--bg-day) 0%, var(--bg-night) 100%);
    height: 150px;
  }

  /* 花窗框景 - 题材分类 */
  .genre-section { background-color: #eee9dc; transition: background 0.6s; }
  body.night-mode .genre-section { background-color: #1e2026; }
  
  .genre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
  }
  .genre-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border: 1px solid var(--frame-border);
  }
  body.night-mode .genre-card { background: #2a2c33; border-color: #444; }
  .genre-card img { width: 100%; height: 300px; }
  .genre-info { padding: 20px; }
  .genre-info h3 { color: var(--brand); margin-bottom: 10px; }
  
  /* 团扇带 - 观看体验 */
  .experience-section { text-align: center; }
  .fan-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
  }
  .fan-item {
    width: 220px; height: 220px;
    border-radius: 50%;
    border: 3px solid var(--gold);
    overflow: hidden;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  }
  .fan-item img { width: 100%; height: 100%; }
  .fan-item span {
    position: absolute; bottom: 0; left: 0; width: 100%;
    background: rgba(0,0,0,0.6); color: #fff;
    padding: 10px 0; font-size: 0.9rem; font-weight: bold;
  }

  /* 宫灯框景 - 热门剧集 */
  .hot-section { background: var(--bg-night); color: var(--text-night); }
  .lantern-grid {
    display: flex; overflow-x: auto; gap: 20px; padding-bottom: 20px;
  }
  .lantern-grid::-webkit-scrollbar { height: 6px; }
  .lantern-grid::-webkit-scrollbar-thumb { background: var(--brand); border-radius: 3px; }
  .lantern-card {
    flex: 0 0 auto;
    width: 200px;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    position: relative;
    border: 2px solid #333;
    box-shadow: 0 0 15px rgba(201, 160, 99, 0.2);
    transition: transform 0.3s;
  }
  .lantern-card:hover { transform: translateY(-5px); box-shadow: 0 0 25px rgba(201, 160, 99, 0.5); }
  .lantern-card img { width: 100%; height: 280px; }
  .lantern-title {
    background: rgba(0,0,0,0.8); color: var(--gold); padding: 10px; text-align: center;
    font-weight: bold; border-top: 1px solid var(--brand);
  }

  /* 榜单 - 花魁加冕 */
  .rank-section { background: #2a1215; color: #f9e6e6; }
  .crown-box {
    max-width: 600px; margin: 0 auto; background: rgba(0,0,0,0.4);
    border: 2px solid var(--gold); border-radius: 12px; padding: 30px;
    text-align: center; position: relative;
  }
  .crown-box::before {
    content: '👑'; position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
    font-size: 30px; text-shadow: 0 0 10px var(--gold);
  }
  .crown-box img { border-radius: 8px; margin-bottom: 20px; width: 150px; margin: 0 auto 20px; }
  .crown-box h3 { font-size: 1.8rem; color: var(--gold); }

  /* 用户声音 */
  .voices-section { background-color: var(--bg-day); }
  body.night-mode .voices-section { background-color: var(--bg-night); }
  .voice-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px;
    max-width: 1000px; margin: 0 auto;
  }
  .voice-card {
    background: #fff; padding: 20px; border-radius: 8px; border-left: 4px solid var(--brand);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  }
  body.night-mode .voice-card { background: #2a2c33; }
  .voice-card p { font-style: italic; margin-bottom: 10px; }
  .voice-card span { font-weight: bold; color: var(--gold); font-size: 0.9rem; }

  /* FAQ */
  .faq-section { background: #eee9dc; }
  body.night-mode .faq-section { background: #1e2026; }
  .faq-list { max-width: 800px; margin: 0 auto; }
  .faq-item { margin-bottom: 20px; border-bottom: 1px solid rgba(0,0,0,0.1); padding-bottom: 15px; }
  body.night-mode .faq-item { border-bottom-color: rgba(255,255,255,0.1); }
  .faq-item h3 { font-size: 1.2rem; color: var(--brand); margin-bottom: 10px; }

  /* 下载区 */
  .download-section {
    text-align: center; padding: 80px 20px;
    background: url('images/2736d1ce-afae-4986-b5e3-af1089ad.webp') center/cover no-repeat;
    position: relative;
  }
  .download-section::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(22, 24, 29, 0.85);
  }
  .download-content { position: relative; z-index: 2; color: #fff; }
  .download-content h2 { color: var(--gold); }
  .qr-box {
    background: #fff; padding: 15px; border-radius: 8px;
    display: inline-block; margin-top: 20px;
  }
  .qr-box img { width: 150px; height: 150px; }

  /* Footer */
  footer {
    background: #111; color: #777; padding: 40px 20px; text-align: center; font-size: 0.85rem;
  }
  footer a { color: #777; transition: color 0.3s; }
  footer a:hover { color: #aaa; }
  .footer-links { margin: 15px 0; }
  .footer-links a { margin: 0 10px; }

  /* 移动端底部悬浮下载条 */
  .mobile-download-bar {
    display: none; position: fixed; bottom: 0; left: 0; width: 100%;
    background: rgba(255, 255, 255, 0.95); border-top: 1px solid #eee;
    padding: 10px 20px; z-index: 1000; box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    justify-content: space-between; align-items: center;
  }
  body.night-mode .mobile-download-bar { background: rgba(22, 24, 29, 0.95); border-top-color: #333; }
  .mobile-download-bar .download-btn { margin: 0; width: 100%; justify-content: center; }

  /* 响应式 */
  @media (max-width: 768px) {
    .hero h1 { font-size: 1.8rem; }
    .moon-gate { padding: 20px; }
    h2 { font-size: 1.6rem; }
    .lantern-grid { padding-bottom: 10px; }
    .mobile-download-bar { display: flex; }
    footer { padding-bottom: 80px; }
  }
  @media (min-width: 1024px) {
    .hero {
      justify-content: flex-start;
      padding-left: 10%;
    }
    .moon-gate {
      width: 50vw;
      max-width: 500px;
      margin-left: 10%;
    }
  }