/* ============================================================
   base.css —— 全局重置 / 基础样式 / 固定层 / 通用区块
   ============================================================ */

/* ---------- 全局重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Serif SC', serif;
  color: var(--text-main);
  overflow-x: hidden;
  min-height: 100vh;
  /* 素龙卡通 · 明亮粉紫渐变背景 */
  background:
    radial-gradient(ellipse at 15% 15%, rgba(255, 179, 209, 0.6), transparent 45%),
    radial-gradient(ellipse at 85% 25%, rgba(232, 213, 255, 0.6), transparent 45%),
    radial-gradient(ellipse at 50% 85%, rgba(255, 249, 220, 0.7), transparent 50%),
    linear-gradient(180deg, #fff0f6 0%, #f5e8ff 50%, #fff8e7 100%);
}

/* ---------- 自定义滚动条 ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #fff0f6; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--pink), var(--purple));
  border-radius: 4px;
}

/* ---------- 卡通派对背景装饰层（云朵/星星/气球/彩带） ----------
   位于最底层 z-index:0，pointer-events:none 不影响交互 */
.bg-decor {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.bg-decor svg {
  position: absolute;
  opacity: 0.6;
}
.bg-cloud { animation: cloud-drift 20s ease-in-out infinite; }
.bg-cloud-1 { width: 120px; top: 8%; left: 5%; animation-delay: 0s; }
.bg-cloud-2 { width: 90px; top: 15%; right: 8%; animation-delay: 3s; }
.bg-cloud-3 { width: 100px; top: 60%; left: 3%; animation-delay: 6s; }
.bg-star { animation: twinkle 3s ease-in-out infinite; }
.bg-star-1 { width: 30px; top: 12%; left: 20%; animation-delay: 0s; }
.bg-star-2 { width: 24px; top: 25%; right: 15%; animation-delay: 1s; }
.bg-star-3 { width: 28px; top: 50%; left: 8%; animation-delay: 2s; }
.bg-star-4 { width: 22px; top: 70%; right: 10%; animation-delay: 0.5s; }
.bg-balloon { animation: balloon-float 8s ease-in-out infinite; }
.bg-balloon-1 { width: 50px; top: 18%; left: 8%; animation-delay: 0s; }
.bg-balloon-2 { width: 45px; top: 30%; right: 5%; animation-delay: 2s; }
.bg-balloon-3 { width: 40px; top: 75%; left: 5%; animation-delay: 4s; }
.bg-gift { animation: gift-bounce 4s ease-in-out infinite; }
.bg-gift-1 { width: 60px; top: 65%; right: 6%; animation-delay: 1s; }
.bg-gift-2 { width: 50px; bottom: 5%; left: 10%; animation-delay: 2.5s; }
@keyframes cloud-drift {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(30px); }
}
@keyframes twinkle {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%      { opacity: 0.9; transform: scale(1.15); }
}
@keyframes balloon-float {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-20px) rotate(3deg); }
}
@keyframes gift-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

/* ---------- 粒子层（飘落星星/花瓣/彩带） ---------- */
#particle-layer {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.particle {
  position: absolute;
  top: -40px;
  user-select: none;
  will-change: transform;
  animation: fall linear infinite;
  opacity: 0.8;
}

/* ---------- 烟花 Canvas 层 ----------
   修复：z-index 从 5 降为 1，位于背景之上、内容(z-index:2)之下，
   烟花透过玻璃卡片可见但不遮挡交互；烟花结束后 JS 清空画布 */
#fireworks-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* ---------- 弹幕层 ---------- */
#danmaku-layer {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 4;
  overflow: hidden;
}
.danmaku-item {
  position: absolute;
  white-space: nowrap;
  font-size: 1.3rem;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(255,255,255,0.9), 0 2px 4px rgba(0,0,0,0.15);
  animation: danmaku-fly linear forwards;
}

/* ---------- 通用区块 ---------- */
section {
  position: relative;
  z-index: 2;
  padding: 80px 5vw;
  max-width: 1200px;
  margin: 0 auto;
}
.section-title {
  font-family: 'ZCOOL XiaoWei', serif;
  font-size: 2.4rem;
  text-align: center;
  margin-bottom: 40px;
  background: linear-gradient(90deg, var(--pink-light), var(--gold), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 4px;
}

/* ---------- 玻璃拟态卡片 ---------- */
.glass-card {
  background: var(--glass-bg);
  border: 2px solid var(--glass-border);
  border-radius: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 40px;
  box-shadow: 0 8px 32px var(--glass-shadow),
              inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* ---------- 页脚 ---------- */
footer {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-soft);
  font-size: 0.9rem;
  letter-spacing: 2px;
  position: relative;
  z-index: 2;
}
footer span { color: var(--pink); }

/* ---------- 响应式适配 ---------- */
@media (max-width: 768px) {
  section { padding: 60px 5vw; }
  .section-title { font-size: 1.8rem; }
  .glass-card { padding: 24px; }
}
@media (max-width: 480px) {
  .danmaku-item { font-size: 1rem; }
}
