@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Playfair+Display:wght@600;700&family=Inter:wght@400;600&display=swap');

:root{
  --bg: #07070c;
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.72);
  --border: rgba(255,255,255,0.16);
  --shadow: 0 30px 90px rgba(0,0,0,0.72);
}
.startOverlay.celebrate .startCard{
  opacity: 0.25;                 /* let fireworks be seen */
  transform: scale(0.985);
  filter: blur(0.2px);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background:
    radial-gradient(1200px 700px at 15% 10%, rgba(255, 0, 150, 0.18), transparent 60%),
    radial-gradient(1000px 700px at 85% 20%, rgba(0, 170, 255, 0.16), transparent 60%),
    radial-gradient(900px 700px at 50% 95%, rgba(255, 160, 120, 0.10), transparent 60%),
    var(--bg);
  color: var(--text);
  overflow:hidden;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

/* Film grain + vignette */
.grain{
  position: fixed; inset:0; z-index: 6; pointer-events:none;
  opacity: .14;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.vignette{
  position: fixed; inset:0; z-index: 7; pointer-events:none;
  background: radial-gradient(circle at 50% 45%, transparent 35%, rgba(0,0,0,0.84) 100%);
  opacity: .78;
}

/* Floating emoji layer */
.floatLayer{
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  overflow:hidden;
}
.floatEmoji{
  position:absolute;
  bottom:-40px;
  opacity:0;
  filter: drop-shadow(0 14px 22px rgba(0,0,0,0.35));
  will-change: transform, opacity;
}

/* Fireworks canvas */
.fxCanvas{
  position: fixed;
  inset: 0;
  z-index: 9999;          /* 🔥 always on top */
  pointer-events:none;
}

/* HUD */
.hud{
  position: fixed;
  top: 0; left:0; right:0;
  z-index: 20;
  display:flex;
  justify-content: space-between;
  align-items:center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.28);
  backdrop-filter: blur(14px);
}
.hudLeft{ display:flex; gap:10px; align-items:center; }
.hudDot{
  width:10px; height:10px; border-radius:999px;
  background: rgba(255,255,255,0.72);
  box-shadow: 0 0 28px rgba(255, 110, 180, 0.28);
}
.hudText{ color: rgba(255,255,255,0.84); font-weight:600; font-size: 13px; }
.hudRight{ display:flex; gap:10px; flex-wrap: wrap; }

/* Buttons */
.btn{
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.10);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 14px;
  cursor:pointer;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover{ transform: translateY(-1px); background: rgba(255,255,255,0.14); }
.btn:active{ transform: translateY(0px); }
.btn.ghost{ background: rgba(0,0,0,0.18); }
.btn.primary{
  background: linear-gradient(135deg, rgba(255, 80, 170, 0.38), rgba(0, 170, 255, 0.22));
  box-shadow: 0 18px 60px rgba(0,0,0,0.45);
}

/* Stage */
.stage{
  position: relative;
  height: 100vh;
  width: 100vw;
  padding-top: 56px;
}

/* Slides */
.slide{
  position:absolute;
  inset: 56px 0 0 0;
  opacity: 0;
  transition: opacity 1.15s ease;
  overflow:hidden;
}
.slide.active{ opacity: 1; }

.slide img{
  width: 100%;
  height: 100%;
  object-fit: contain;          /* ✅ show entire image */
  background: rgba(0,0,0,0.35);
  will-change: transform, opacity;
}

/* cinematic motions (varied) */
.motion-fade  img{ animation: mFade  9.5s ease-in-out forwards; }
.motion-float img{ animation: mFloat 9.5s ease-in-out forwards; }
.motion-flyL  img{ animation: mFlyL  9.5s ease-in-out forwards; }
.motion-flyR  img{ animation: mFlyR  9.5s ease-in-out forwards; }
.motion-zoom  img{ animation: mZoom  9.5s ease-in-out forwards; }
.motion-drift img{ animation: mDrift 9.5s ease-in-out forwards; }

@keyframes mFade{ 0%{opacity:0;transform:scale(1.00)} 12%{opacity:1} 100%{opacity:1;transform:scale(1.02)} }
@keyframes mFloat{ 0%{opacity:0;transform:translateY(14px) scale(1.00)} 12%{opacity:1} 100%{opacity:1;transform:translateY(-10px) scale(1.02)} }
@keyframes mFlyL{ 0%{opacity:0;transform:translateX(-22px) scale(1.00)} 12%{opacity:1} 100%{opacity:1;transform:translateX(10px) scale(1.02)} }
@keyframes mFlyR{ 0%{opacity:0;transform:translateX(22px) scale(1.00)} 12%{opacity:1} 100%{opacity:1;transform:translateX(-10px) scale(1.02)} }
@keyframes mZoom{ 0%{opacity:0;transform:scale(0.99)} 12%{opacity:1} 100%{opacity:1;transform:scale(1.05)} }
@keyframes mDrift{ 0%{opacity:0;transform:translate(-10px, 10px) scale(1.00)} 12%{opacity:1} 100%{opacity:1;transform:translate(10px, -10px) scale(1.02)} }

/* ✅ Lower-third text, NO box */
.lowerText{
  position:absolute;
  left: 0; right: 0;
  bottom: 10vh;               /* pushes text down so face stays visible */
  padding: 0 18px;
  display:flex;
  flex-direction: column;
  align-items:center;
  gap: 8px;
  pointer-events:none;
}
.title{
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: clamp(18px, 2.2vw, 26px);
  text-align:center;
  color: rgba(255,255,255,0.90);
  text-shadow: 0 18px 70px rgba(0,0,0,0.85);
  opacity: 0.92;
}
.quoteLine{
  position: relative;
  width: min(980px, 92vw);
  display:flex;
  justify-content:center;
}
.quote{
  font-family: "Great Vibes", cursive;
  font-size: clamp(26px, 4.4vw, 50px);
  line-height: 1.2;
  text-align:center;
  color: rgba(255,255,255,0.88);  /* slight transparency */
  text-shadow: 0 22px 90px rgba(0,0,0,0.95);
  white-space: pre-wrap;
  padding: 6px 0;
}
.cursor{
  position:absolute;
  right: 0;
  bottom: 0;
  color: rgba(255,255,255,0.75);
  animation: blink 0.9s ease-in-out infinite;
  font-size: 18px;
}
@keyframes blink{ 0%,100%{opacity:.2} 50%{opacity:1} }

/* Progress */
.progress{
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 25;
  display:flex;
  align-items:center;
  gap: 12px;
}
.bar{
  flex: 1;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.08);
  overflow:hidden;
}
#barFill{
  height:100%;
  width:0%;
  background: linear-gradient(90deg, rgba(255, 80, 170, 0.80), rgba(0, 170, 255, 0.60));
  transition: width .7s ease;
}
.count{
  color: rgba(255,255,255,0.78);
  font-size: 13px;
  font-weight: 600;
}

/* Start overlay */
.startOverlay{
  position: fixed; inset:0;
  z-index: 60;
  display:grid;
  place-items:center;
  background: rgba(0,0,0,0.74);
  backdrop-filter: blur(16px);
}
.startCard{
  width: min(760px, 92vw);
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.16);
  background: linear-gradient(135deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
  box-shadow: var(--shadow);
  padding: 22px;
  text-align:center;
}
.badge{
  display:inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(0,0,0,0.22);
  font-size: 12px;
  color: rgba(255,255,255,0.80);
  letter-spacing: .6px;
}
.startCard h1{ margin: 12px 0 6px; font-size: 34px; line-height: 1.05; }

/* Candle UI */
.candleStage{ margin-top: 10px; display:flex; flex-direction:column; align-items:center; gap: 12px; }
.candleWrap{ position: relative; width: 90px; height: 150px; display:grid; place-items:center; }
.candle{
  width: 56px; height: 100px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,255,255,0.35));
  box-shadow: 0 18px 55px rgba(0,0,0,0.55);
}
.wick{
  position:absolute;
  width: 6px; height: 16px;
  top: 34px;
  border-radius: 6px;
  background: rgba(40,40,40,0.95);
}
.flame{
  position:absolute;
  top: 2px;
  width: 34px; height: 54px;     /* 🔥 bigger flame */
  border-radius: 999px;
  background: radial-gradient(circle at 50% 30%,
    rgba(255,255,255,0.98),
    rgba(255,235,140,0.92) 35%,
    rgba(255,130,40,0.82) 70%,
    rgba(255,60,0,0.0) 100%);
  filter: drop-shadow(0 0 30px rgba(255,170,70,0.75));
  transform-origin: 50% 85%;
  animation: flicker 0.14s infinite alternate;
}

@keyframes flicker{
  from{ transform: rotate(-2deg) scale(1.00); }
  to{ transform: rotate(2deg) scale(1.06); }
}
.flame.dim{
  animation: none;
  filter: drop-shadow(0 0 10px rgba(255,160,60,0.35));
}
.flame.out{
  opacity: 0;
  transform: scale(0.2);
  transition: opacity .45s ease, transform .45s ease;
}

.blowText{ color: rgba(255,255,255,0.82); font-weight: 600; }

.holdBar{
  width: min(520px, 86vw);
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.08);
  overflow:hidden;
}
.holdFill{
  height:100%;
  width:0%;
  background: linear-gradient(90deg, rgba(255, 160, 80, 0.85), rgba(255, 80, 170, 0.75));
  transition: width .05s linear;
}
.blowBtn{
  width: min(520px, 86vw);
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.18);
  background: linear-gradient(135deg, rgba(255, 120, 60, 0.26), rgba(255, 80, 170, 0.22));
  color: rgba(255,255,255,0.92);
  cursor:pointer;
  font-weight: 700;
  letter-spacing: .2px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.45);
  transition: transform .15s ease;
}
.blowBtn:hover{ transform: translateY(-1px); }

/* Ending */
.ending{
  position:absolute;
  inset: 56px 0 0 0;
  z-index: 40;
  display:grid;
  place-items:center;
  background: rgba(0,0,0,0.58);
  backdrop-filter: blur(10px);
}
.hidden{ display:none !important; }
.endingCard{
  width: min(760px, 92vw);
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.16);
  background: linear-gradient(135deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
  box-shadow: var(--shadow);
  padding: 22px;
  text-align:center;
}
.endingCard h2{ margin: 10px 0 8px; font-size: 28px; font-family: "Playfair Display", serif; }
.endingCard p{ margin: 0; color: rgba(255,255,255,0.76); line-height: 1.6; }
.sig{ margin-top: 12px; color: rgba(255,255,255,0.72); }
.endActions{ margin-top: 14px; }
