/* ═══════════════════════════════════════════
   HBD — unveil.fr inspired
   ═══════════════════════════════════════════ */

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

:root {
  --bg: #0a0a0a;
  --bg2: #111;
  --fg: #fff;
  --dim: #555;
  --accent: #c8a2ff;
  --border: #1a1a1a;
  --card: #141414;
  --font: 'Helvetica Neue', -apple-system, 'PingFang SC', 'Noto Sans SC', sans-serif;
  --rose: #f43f5e;
  --rose-light: #fda4af;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: var(--bg); }

/* ─── NAV ─── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.5rem 3rem;
  mix-blend-mode: difference;
}
.nav-logo { font-size: 1.1rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; }
.dot { font-size: 0.7rem; vertical-align: super; }
.nav-links { display: flex; gap: 2.5rem; }
.nav-links a {
  color: var(--fg); text-decoration: none; font-size: 0.8rem;
  letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.5;
  transition: opacity 0.3s;
}
.nav-links a:hover { opacity: 1; }

/* ─── HERO ─── */
.hero {
  height: 100vh; display: flex; flex-direction: column;
  justify-content: center; padding: 0 3rem; position: relative;
  overflow: hidden;
}
.particle-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: auto;
}
.hero-text {
  position: relative; z-index: 1;
}
.hero-text h1 {
  font-size: clamp(4rem, 12vw, 10rem);
  font-weight: 800; line-height: 0.9; letter-spacing: -0.04em; text-transform: uppercase;
}
.hero-text .line { display: block; }
.hero-text .accent { color: var(--accent); }
.hero-sub { margin-top: 3rem; position: relative; z-index: 1; }
.hero-sub p { font-size: 1rem; color: var(--dim); font-weight: 300; }
.scroll-indicator { position: absolute; bottom: 3rem; left: 3rem; z-index: 1; }
.scroll-line {
  width: 1px; height: 60px; background: var(--dim); position: relative; overflow: hidden;
}
.scroll-line::after {
  content: ''; position: absolute; top: -100%; left: 0;
  width: 100%; height: 100%; background: var(--fg);
  animation: scrollDown 2s ease-in-out infinite;
}
@keyframes scrollDown { 0%{top:-100%} 50%{top:100%} 100%{top:100%} }

/* ═══════════════════════════════════════════
   MEMORIES 区域（两种状态）
   ═══════════════════════════════════════════ */

.marquee-section {
  position: relative;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: min-height 0.6s ease;
}

/* ── 空状态：MEMORIES 大字居中 ── */
.memories-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding: 4rem 1.5rem;
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.memories-label {
  font-size: clamp(4rem, 12vw, 10rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: var(--fg);
  opacity: 0.9;
  line-height: 1;
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: memoriesFloat 4s ease-in-out infinite;
}

@keyframes memoriesFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ── 有照片状态：MEMORIES 缩小到顶部 ── */
.marquee-section.has-photos {
  min-height: auto;
  padding-top: 2rem;
}

.marquee-section.has-photos .memories-hero {
  gap: 1rem;
  padding: 1.5rem 1.5rem 0.5rem;
}

.marquee-section.has-photos .memories-label {
  font-size: clamp(1.2rem, 3vw, 2rem);
  opacity: 0.4;
  animation: memoriesBounce 2s ease-in-out infinite;
}

@keyframes memoriesBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  25% { transform: translateY(-4px) scale(1.02); }
  50% { transform: translateY(0) scale(1); }
  75% { transform: translateY(-2px) scale(1.01); }
}

/* 照片流 */
.marquee-wrap {
  overflow: hidden;
  padding: 1rem 0;
  width: 100%;
  animation: marqueeSlideIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes marqueeSlideIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.marquee-track {
  display: flex;
  gap: 1.2rem;
  width: max-content;
  animation: marquee 30s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-track .marquee-item {
  flex-shrink: 0;
  width: 340px;
  height: 420px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.marquee-track .marquee-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.marquee-track .marquee-item:hover img {
  transform: scale(1.05);
}

.marquee-track .marquee-item .mi-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1.2rem 1.2rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
  font-weight: 300;
  opacity: 0;
  transition: opacity 0.4s;
}

.marquee-track .marquee-item:hover .mi-caption {
  opacity: 1;
}

.marquee-track .marquee-item .mi-del {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  border: none;
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.marquee-track .marquee-item:hover .mi-del { opacity: 1; }
.marquee-track .marquee-item .mi-del:hover { background: rgba(244,63,94,0.8); }

.marquee-empty {
  width: 100%;
  text-align: center;
  padding: 6rem 2rem;
  color: var(--dim);
  font-size: 0.9rem;
  font-weight: 300;
}

/* ═══════════════════════════════════════════
   上传触发按钮（仿 mistyx 风格）
   ═══════════════════════════════════════════ */

.upload-trigger-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 2.5rem 1.5rem 0.5rem;
}

.upload-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1.6rem;
  background: var(--fg);
  color: var(--bg);
  border: none;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(255,255,255,0.06);
}

.upload-pill-btn:hover {
  background: var(--rose);
  color: #fff;
  box-shadow: 0 6px 30px rgba(244, 63, 94, 0.25);
  transform: translateY(-1px);
}

.upload-pill-btn:active {
  transform: translateY(0);
}

.upload-trigger-hint {
  font-size: 0.72rem;
  color: #444;
  letter-spacing: 0.04em;
  font-weight: 300;
}

/* ═══════════════════════════════════════════
   上传模态框（仿 mistyx 风格）
   ═══════════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  overflow-y: auto;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: var(--bg2);
  border: 1px solid #222;
  border-radius: 1rem;
  box-shadow: 0 25px 80px rgba(0,0,0,0.6);
  max-width: 32rem;
  width: 100%;
  padding: 2rem;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s;
}

.modal-overlay.active .modal-card {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #222;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #666;
  transition: all 0.2s;
}

.modal-close:hover {
  background: #333;
  color: #aaa;
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.3rem;
}

.modal-icon {
  font-size: 1.5rem;
}

.modal-header h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.01em;
}

.modal-desc {
  font-size: 0.75rem;
  color: var(--dim);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

/* 拖拽上传区 */
.modal-dropzone {
  border: 2px dashed #333;
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.modal-dropzone:hover {
  border-color: var(--rose);
  background: rgba(244, 63, 94, 0.05);
}

.dropzone-preview {
  margin-bottom: 0.75rem;
}

.dropzone-preview img {
  width: 8rem;
  height: 8rem;
  object-fit: cover;
  border-radius: 0.75rem;
  border: 1px solid #333;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  margin: 0 auto;
  display: block;
}

.dropzone-icon {
  color: #444;
  margin: 0 auto 0.75rem;
  display: block;
  transition: color 0.3s;
}

.modal-dropzone:hover .dropzone-icon {
  color: var(--rose);
}

.dropzone-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: #888;
  transition: color 0.3s;
}

.modal-dropzone:hover .dropzone-text {
  color: var(--rose);
}

.dropzone-hint {
  font-size: 0.75rem;
  color: #555;
  margin-top: 0.25rem;
}

/* 输入字段 */
.modal-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #888;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}

.modal-field input {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1px solid #2a2a2a;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-family: var(--font);
  color: var(--fg);
  outline: none;
  transition: all 0.2s;
  background: #1a1a1a;
}

.modal-field input::placeholder {
  color: #555;
}

.modal-field input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.15);
}

/* 提交按钮 */
.modal-submit-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem;
  background: var(--fg);
  color: var(--bg);
  border: none;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(255,255,255,0.06);
}

.modal-submit-btn:hover {
  background: var(--rose);
  color: #fff;
  box-shadow: 0 8px 25px rgba(244, 63, 94, 0.25);
  transform: translateY(-1px);
}

.modal-submit-btn:active {
  transform: scale(0.98);
}

/* ─── INTRO ─── */
.intro {
  padding: 10rem 3rem;
  display: flex; align-items: center; justify-content: center;
  border-top: 1px solid var(--border);
}
.intro-text {
  max-width: 600px; font-size: 1.6rem; line-height: 1.7;
  color: var(--dim); font-weight: 300; text-align: center;
}

/* ─── SECTIONS ─── */
.section { padding: 8rem 3rem; border-top: 1px solid var(--border); }
.container { max-width: 1100px; margin: 0 auto; }
.section-head { margin-bottom: 4rem; }
.section-num {
  font-size: 0.75rem; color: var(--dim); letter-spacing: 0.15em;
  display: block; margin-bottom: 1rem;
}
.section-head h2 {
  font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1; margin-bottom: 0.8rem;
}
.section-sub { font-size: 1rem; color: var(--dim); font-weight: 300; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-block; margin-top: 1.5rem; padding: 0.9rem 2.5rem;
  background: var(--fg); color: var(--bg); border: none; border-radius: 2px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; cursor: pointer; transition: all 0.3s;
  font-family: var(--font); text-decoration: none;
}
.btn:hover { background: var(--accent); color: var(--bg); }
.btn-ghost {
  display: inline-block; padding: 0.7rem 1.8rem; background: transparent;
  color: var(--dim); border: 1px solid var(--border); border-radius: 2px;
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; cursor: pointer; transition: all 0.3s;
  font-family: var(--font);
}
.btn-ghost:hover { border-color: var(--dim); color: var(--fg); }

/* ─── PROGRESS ─── */
.progress-bar { display: flex; align-items: center; justify-content: center; margin-bottom: 4rem; }
.progress-step {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.6rem 1.2rem; opacity: 0.3; transition: opacity 0.4s;
}
.progress-step.active { opacity: 0.8; }
.progress-step.done { opacity: 1; }
.step-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); transition: background 0.3s; }
.progress-step.active .step-dot { background: var(--accent); }
.progress-step.done .step-dot { background: #4ecdc4; }
.step-label { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500; }
.progress-line { width: 40px; height: 1px; background: var(--border); }

/* ─── GAME GRID ─── */
.game-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--border); border: 1px solid var(--border);
}
.game-item {
  padding: 3rem 2rem; background: var(--bg2); text-align: center;
  cursor: pointer; transition: background 0.3s;
}
.game-item:hover { background: #1a1a1a; }
.game-num { font-size: 0.7rem; color: var(--dim); letter-spacing: 0.2em; display: block; margin-bottom: 1.5rem; }
.game-item h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; }
.game-item p { font-size: 0.8rem; color: var(--dim); font-weight: 300; }

/* ─── GAME PANELS ─── */
.game-panel { animation: fadeUp 0.5s ease; }
@keyframes fadeUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
.gp-head { text-align: center; margin-bottom: 2.5rem; }
.gp-head h3 { font-size: 1.8rem; font-weight: 600; margin-bottom: 0.5rem; }
.gp-hint { color: var(--dim); font-size: 0.85rem; font-weight: 300; margin-bottom: 1rem; }
.gp-stats { display: flex; gap: 2rem; justify-content: center; }
.gp-stats span { font-size: 0.75rem; color: var(--dim); letter-spacing: 0.08em; text-transform: uppercase; }
.gp-stats b { color: var(--accent); font-weight: 600; }
.gp-actions { display: flex; gap: 1rem; justify-content: center; margin-top: 2rem; }

/* Memory */
.memory-board { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; max-width: 440px; margin: 0 auto; }
.mem-card {
  aspect-ratio: 1; background: var(--card); border: 1px solid var(--border);
  border-radius: 3px; cursor: pointer; display: flex; align-items: center;
  justify-content: center; font-size: 1.8rem; transition: all 0.3s;
}
.mem-card:hover { border-color: #333; }
.mem-card.flipped { background: rgba(200,162,255,0.08); border-color: var(--accent); }
.mem-card.matched { background: rgba(78,205,196,0.08); border-color: #4ecdc4; }

/* Balloons */
.balloon-area { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; padding: 2rem 0; min-height: 250px; }
.balloon {
  width: 56px; height: 72px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; position: relative; animation: float 3s ease-in-out infinite;
  transition: transform 0.2s;
}
.balloon::after {
  content:''; position: absolute; bottom: -10px; left: 50%;
  width: 1px; height: 10px; background: rgba(255,255,255,0.15); transform: translateX(-50%);
}
.balloon:hover { transform: scale(1.12); }
.balloon.popped { animation: pop 0.3s ease forwards; pointer-events: none; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }
@keyframes pop { 0%{transform:scale(1);opacity:1} 100%{transform:scale(0);opacity:0} }
.bl-gift { background: linear-gradient(135deg,#ffd93d,#ff6b9d); }
.bl-1 { background: linear-gradient(135deg,#c8a2ff,#7b2ff7); }
.bl-2 { background: linear-gradient(135deg,#4ecdc4,#2a9d8f); }
.bl-3 { background: linear-gradient(135deg,#ff6b6b,#ee5a24); }
.bl-4 { background: linear-gradient(135deg,#a8dadc,#457b9d); }

/* Words */
.word-area { text-align: center; }
.scrambled { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 2rem; }
.scr-char {
  width: 48px; height: 48px; border: 1px solid var(--border); border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 600; color: var(--accent);
}
.slots { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 2rem; }
.w-slot {
  width: 48px; height: 48px; border: 1px dashed #333; border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.w-slot:hover { border-color: var(--dim); }
.w-slot.filled { border-style: solid; border-color: var(--accent); background: rgba(200,162,255,0.05); }
.choices { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.w-choice {
  padding: 0.5rem 1rem; border: 1px solid var(--border); border-radius: 3px;
  cursor: pointer; font-size: 1rem; transition: all 0.2s;
}
.w-choice:hover { border-color: var(--dim); }
.w-choice.used { opacity: 0.15; pointer-events: none; }

/* Unlock */
.unlock { text-align: center; margin-top: 4rem; padding-top: 4rem; }
.unlock-line { width: 1px; height: 60px; background: var(--border); margin: 0 auto 2rem; }

/* ═══════════════════════════════════════════
   游戏1：刮刮乐
   ═══════════════════════════════════════════ */
.scratch-area { text-align: center; }
.scratch-card {
  position: relative;
  width: 320px;
  height: 200px;
  margin: 0 auto 1.5rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.scratch-reveal {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.scratch-emoji { font-size: 2.5rem; }
.scratch-msg { font-size: 1.3rem; font-weight: 700; color: var(--accent); }
.scratch-sub { font-size: 0.85rem; color: var(--dim); font-weight: 300; }
#scratchCanvas {
  position: absolute;
  inset: 0;
  cursor: crosshair;
  border-radius: 12px;
}
.scratch-progress {
  width: 320px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 0.5rem;
  overflow: hidden;
}
.scratch-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--rose));
  border-radius: 2px;
  transition: width 0.3s;
}
.scratch-hint { font-size: 0.75rem; color: var(--dim); }

/* ═══════════════════════════════════════════
   游戏2：命运转盘
   ═══════════════════════════════════════════ */
.wheel-area { text-align: center; }
.wheel-wrapper {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto 2rem;
}
.wheel-pointer {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5rem;
  color: var(--rose);
  z-index: 5;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
.wheel {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 30px rgba(200,162,255,0.2), inset 0 0 20px rgba(0,0,0,0.3);
}
.wheel-inner {
  width: 100%;
  height: 100%;
  transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}
.wheel-segment {
  position: absolute;
  width: 0;
  height: 0;
  top: 50%;
  left: 50%;
  transform-origin: 0 0;
}
.wheel-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg2);
  border: 3px solid var(--accent);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}
.wheel-spin-btn {
  padding: 0.8rem 2.5rem;
  background: linear-gradient(135deg, var(--accent), var(--rose));
  color: #fff;
  border: none;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  letter-spacing: 0.05em;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(200,162,255,0.3);
}
.wheel-spin-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(200,162,255,0.4); }
.wheel-spin-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.wheel-result {
  margin-bottom: 1.5rem;
  animation: fadeUp 0.5s ease;
}
.wheel-result-emoji { font-size: 2.5rem; margin-bottom: 0.5rem; }
.wheel-result-text { font-size: 1.1rem; color: var(--accent); font-weight: 600; }

/* ═══════════════════════════════════════════
   游戏3：烟花许愿
   ═══════════════════════════════════════════ */
.firework-area { text-align: center; }
.firework-wish-input {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  margin-bottom: 1.5rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}
#fireworkCanvas {
  width: 100%;
  max-width: 600px;
  height: 400px;
  border-radius: 12px;
  background: #0a0a1a;
  cursor: crosshair;
  margin-bottom: 1rem;
}
.firework-wishes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  max-width: 500px;
  margin: 0 auto;
}
.firework-wish-tag {
  padding: 0.4rem 0.8rem;
  background: rgba(200,162,255,0.1);
  border: 1px solid rgba(200,162,255,0.2);
  border-radius: 9999px;
  font-size: 0.75rem;
  color: var(--accent);
  animation: fadeUp 0.3s ease;
}

/* ═══════════════════════════════════════════
   游戏1：打地鼠
   ═══════════════════════════════════════════ */
.whack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 360px;
  margin: 0 auto 1.5rem;
  position: relative;
}
.whack-hole {
  aspect-ratio: 1;
  background: #1a1a1a;
  border: 2px solid #222;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  overflow: hidden;
  position: relative;
}
.whack-hole::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 30%;
  background: #111;
  border-radius: 50% 50% 0 0;
}
.whack-mole {
  font-size: 2rem;
  transform: translateY(100%);
  transition: transform 0.15s ease-out;
  position: relative;
  z-index: 2;
  user-select: none;
  -webkit-user-select: none;
}
.whack-mole.show {
  transform: translateY(0);
}
.whack-mole.hit {
  animation: whackHit 0.3s ease forwards;
}
@keyframes whackHit {
  0% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.3) translateY(-10px); }
  100% { transform: scale(0) translateY(0); opacity: 0; }
}
.whack-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  z-index: 10;
}
.whack-end-emoji { font-size: 3rem; margin-bottom: 0.5rem; }
.whack-end-score { font-size: 2rem; font-weight: 700; color: var(--accent); }
.whack-end-msg { font-size: 0.9rem; color: var(--dim); margin-top: 0.5rem; }

/* ═══════════════════════════════════════════
   游戏2：贪吃蛇
   ═══════════════════════════════════════════ */
.snake-wrap { text-align: center; }
#snakeCanvas {
  background: #0a0a1a;
  border: 2px solid #222;
  border-radius: 8px;
  display: block;
  margin: 0 auto 1rem;
  max-width: 100%;
}
.snake-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 0.5rem;
}
.snake-row { display: flex; gap: 4px; }
.snake-btn {
  width: 48px;
  height: 48px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  -webkit-user-select: none;
  user-select: none;
}
.snake-btn:active { background: var(--accent); border-color: var(--accent); }
.snake-hint { font-size: 0.75rem; color: var(--dim); }

/* ═══════════════════════════════════════════
   游戏3：Flappy
   ═══════════════════════════════════════════ */
.flappy-wrap { text-align: center; position: relative; }
#flappyCanvas {
  background: linear-gradient(180deg, #0a0a2e 0%, #1a1a3e 60%, #2a1a3e 100%);
  border: 2px solid #222;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
  max-width: 100%;
  cursor: pointer;
}
.flappy-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.flappy-start-emoji { font-size: 3rem; margin-bottom: 0.5rem; animation: float 2s ease-in-out infinite; }
.flappy-start-text { font-size: 0.9rem; color: var(--dim); }

/* ─── WISHES ─── */
.section-wish {
  position: relative; overflow: hidden; min-height: 100vh;
  display: flex; align-items: center; border-top: 1px solid var(--border);
}
#fireworksCanvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.confetti-box { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.confetti { position: absolute; top: -10px; animation: confettiFall linear infinite; }
@keyframes confettiFall { to{transform:translateY(100vh) rotate(720deg);opacity:0} }
.wish-content { position: relative; z-index: 2; text-align: center; }

/* ═══════════════════════════════════════════
   🎂 Premium Birthday Cake
   ═══════════════════════════════════════════ */

.cake-art {
  display: flex; flex-direction: column; align-items: center;
  margin: 4rem auto 3rem; position: relative;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.3));
  animation: cakeReveal 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes cakeReveal { from{opacity:0;transform:translateY(30px) scale(0.95)} to{opacity:1;transform:translateY(0) scale(1)} }

/* 蜡烛 */
.candle-row { display: flex; gap: 28px; margin-bottom: 2px; position: relative; z-index: 10; }
.candle {
  width: 8px; height: 40px;
  background: repeating-linear-gradient(180deg, #fda4af 0px, #fda4af 4px, #fff 4px, #fff 8px);
  border-radius: 2px 2px 0 0; position: relative;
  box-shadow: 0 0 6px rgba(253,164,175,0.3);
}
.candle::before { content:''; position:absolute; top:-4px; left:50%; transform:translateX(-50%); width:2px; height:6px; background:#333; border-radius:1px; }
.candle::after {
  content:''; position:absolute; top:-20px; left:50%; transform:translateX(-50%);
  width:30px; height:30px;
  background: radial-gradient(circle, rgba(255,217,61,0.25) 0%, transparent 70%);
  border-radius:50%; animation: glowPulse 2s ease-in-out infinite;
}
@keyframes glowPulse { 0%,100%{opacity:.6;transform:translateX(-50%) scale(1)} 50%{opacity:1;transform:translateX(-50%) scale(1.2)} }

.flame {
  width: 12px; height: 20px;
  background: radial-gradient(ellipse at 50% 80%, #fff 0%, #ffd93d 20%, #ff9500 50%, #ff6b00 70%, transparent 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  animation: flicker 0.15s ease-in-out infinite alternate; z-index: 2; filter: blur(0.5px);
}
@keyframes flicker {
  0%  {transform:translateX(-50%) scaleY(1) rotate(-3deg);opacity:1}
  25% {transform:translateX(-50%) scaleY(1.05) rotate(1deg);opacity:.95}
  50% {transform:translateX(-50%) scaleY(1.1) rotate(-1deg);opacity:.9}
  75% {transform:translateX(-50%) scaleY(.95) rotate(2deg);opacity:.95}
  100%{transform:translateX(-50%) scaleY(1.15) rotate(3deg);opacity:.85}
}
.candle.blown .flame { display: none; }
.candle.blown::after { display: none; }

/* 顶层 */
.cake-t1 {
  width: 120px; height: 45px;
  background: linear-gradient(180deg, #e8b4f8 0%, #c882e8 100%);
  border-radius: 12px 12px 4px 4px; position: relative; z-index: 3;
  box-shadow: inset 0 -4px 8px rgba(0,0,0,0.1), 0 4px 12px rgba(0,0,0,0.2);
}
.cake-t1::before {
  content:''; position:absolute; bottom:-8px; left:10px; right:10px; height:10px;
  background: radial-gradient(ellipse 12px 10px at 15% 0%, #f0d0ff 50%, transparent 50%),
    radial-gradient(ellipse 10px 9px at 40% 0%, #f0d0ff 50%, transparent 50%),
    radial-gradient(ellipse 14px 11px at 65% 0%, #f0d0ff 50%, transparent 50%),
    radial-gradient(ellipse 11px 8px at 88% 0%, #f0d0ff 50%, transparent 50%);
  z-index: 2;
}
.cake-t1::after {
  content:''; position:absolute; top:6px; left:12px; right:12px; height:8px;
  background: radial-gradient(circle 3px at 10% 50%, #ffd93d 60%, transparent 60%),
    radial-gradient(circle 2px at 25% 50%, #ff6b9d 60%, transparent 60%),
    radial-gradient(circle 3px at 40% 50%, #4ecdc4 60%, transparent 60%),
    radial-gradient(circle 2px at 55% 50%, #ffd93d 60%, transparent 60%),
    radial-gradient(circle 3px at 70% 50%, #ff6b9d 60%, transparent 60%),
    radial-gradient(circle 2px at 85% 50%, #4ecdc4 60%, transparent 60%);
  z-index: 5;
}

/* 中层 */
.cake-t2 {
  width: 180px; height: 55px;
  background: linear-gradient(180deg, #7b68ee 0%, #5b4cc4 100%);
  border-radius: 6px; position: relative; z-index: 2; margin-top: -2px;
  box-shadow: inset 0 -6px 12px rgba(0,0,0,0.15), 0 6px 20px rgba(0,0,0,0.25);
}
.cake-t2::before {
  content:''; position:absolute; bottom:-10px; left:8px; right:8px; height:12px;
  background: radial-gradient(ellipse 16px 12px at 8% 0%, #9b8bff 50%, transparent 50%),
    radial-gradient(ellipse 12px 11px at 25% 0%, #9b8bff 50%, transparent 50%),
    radial-gradient(ellipse 18px 13px at 45% 0%, #9b8bff 50%, transparent 50%),
    radial-gradient(ellipse 14px 10px at 62% 0%, #9b8bff 50%, transparent 50%),
    radial-gradient(ellipse 16px 12px at 80% 0%, #9b8bff 50%, transparent 50%),
    radial-gradient(ellipse 12px 9px at 95% 0%, #9b8bff 50%, transparent 50%);
  z-index: 2;
}
.cake-t2::after {
  content:'🍓'; position:absolute; top:-14px; left:50%; transform:translateX(-50%);
  font-size:18px; z-index:10; filter:drop-shadow(0 2px 4px rgba(0,0,0,0.3)); letter-spacing:30px;
}

/* 底层 */
.cake-t3 {
  width: 240px; height: 60px;
  background: linear-gradient(180deg, #2dd4bf 0%, #14b8a6 50%, #0d9488 100%);
  border-radius: 0 0 12px 12px; position: relative; z-index: 1; margin-top: -2px;
  box-shadow: inset 0 -8px 16px rgba(0,0,0,0.15), 0 10px 30px rgba(0,0,0,0.3);
}
.cake-t3::before {
  content:''; position:absolute; bottom:-12px; left:10px; right:10px; height:14px;
  background: radial-gradient(ellipse 18px 14px at 5% 0%, #5eead4 50%, transparent 50%),
    radial-gradient(ellipse 14px 12px at 18% 0%, #5eead4 50%, transparent 50%),
    radial-gradient(ellipse 20px 15px at 35% 0%, #5eead4 50%, transparent 50%),
    radial-gradient(ellipse 16px 13px at 52% 0%, #5eead4 50%, transparent 50%),
    radial-gradient(ellipse 18px 14px at 68% 0%, #5eead4 50%, transparent 50%),
    radial-gradient(ellipse 14px 11px at 82% 0%, #5eead4 50%, transparent 50%),
    radial-gradient(ellipse 20px 15px at 96% 0%, #5eead4 50%, transparent 50%);
  z-index: 2;
}
.cake-t3::after {
  content:''; position:absolute; bottom:-18px; left:-20px; right:-20px; height:10px;
  background:linear-gradient(180deg,#333 0%,#222 100%);
  border-radius:0 0 50% 50%; box-shadow:0 4px 15px rgba(0,0,0,0.4);
}

.wish-msg { max-width: 480px; margin: 0 auto 3rem; }
.wish-msg p { font-size: 1.1rem; line-height: 2; color: var(--dim); font-weight: 300; }
.wish-gallery { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 3rem; }
.wish-gallery img { width: 90px; height: 90px; object-fit: cover; border-radius: 3px; opacity: 0.9; transition: opacity 0.3s; cursor: pointer; }
.wish-gallery img:hover { opacity: 1; }
.wish-done { margin-top: 2rem; }
.wish-star { font-size: 1.2rem; color: var(--accent); font-weight: 400; letter-spacing: 0.1em; }

/* ─── FOOTER ─── */
.footer { padding: 2rem 3rem; border-top: 1px solid var(--border); }
.footer-inner {
  display: flex; justify-content: space-between;
  font-size: 0.7rem; color: var(--dim); letter-spacing: 0.1em; text-transform: uppercase;
}

/* ─── SETTINGS ─── */
.settings-btn {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 100;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--border);
  color: var(--dim); font-size: 0.9rem; cursor: pointer; transition: all 0.3s;
}
.settings-btn:hover { border-color: var(--dim); }
.settings-panel {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
  z-index: 200; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 4px; padding: 2rem; width: 90%; max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.settings-panel h3 { font-size: 1rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 1.2rem; }
.settings-panel label { display: block; font-size: 0.7rem; color: var(--dim); letter-spacing: 0.1em; text-transform: uppercase; margin: 1rem 0 0.4rem; }
.settings-panel input, .settings-panel textarea {
  width: 100%; padding: 0.7rem 0; background: transparent;
  border: none; border-bottom: 1px solid var(--border);
  color: var(--fg); font-size: 0.9rem; font-family: var(--font); outline: none;
}
.settings-panel textarea { min-height: 60px; resize: vertical; border: 1px solid var(--border); padding: 0.7rem; border-radius: 3px; margin-top: 0.3rem; }
.hidden { display: none !important; }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .nav { padding: 1.2rem 1.5rem; }
  .nav-links { gap: 1.5rem; }
  .hero { padding: 0 1.5rem; }
  .hero-text h1 { font-size: 3.5rem; }
  .intro { padding: 6rem 1.5rem; }
  .intro-text { font-size: 1.2rem; }
  .section { padding: 5rem 1.5rem; }
  .section-head h2 { font-size: 2.2rem; }
  .game-grid { grid-template-columns: 1fr; }
  .game-item { padding: 2rem 1.5rem; }
  .memory-board { grid-template-columns: repeat(3,1fr); }
  .mem-card { font-size: 1.4rem; }
  .balloon { width: 46px; height: 60px; }
  .scr-char, .w-slot { width: 40px; height: 40px; font-size: 1.1rem; }
  .progress-bar { flex-wrap: wrap; gap: 0.5rem; }
  .progress-line { display: none; }
  .scroll-indicator { left: 1.5rem; bottom: 2rem; }
  .footer-inner { flex-direction: column; gap: 0.5rem; }
  .marquee-track .marquee-item { width: 260px; height: 320px; }
  .memories-label { font-size: 3rem; }
  .marquee-section.has-photos .memories-label { font-size: 1rem; }
  .upload-trigger-bar { flex-direction: column; gap: 0.5rem; }
  .modal-card { padding: 1.5rem; }
}
