/* ===== ROOM CONTAINER ===== */
.room {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #080a10;
}

/* ===== BACKGROUND IMAGE ===== */
.room-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  z-index: 1;
}

/* ===== DARKNESS OVERLAY ===== */
.darkness {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(0,0,0,0.97);
  pointer-events: none;
  transition: opacity 2.5s ease;
}
.darkness.lit { opacity: 0; }

/* ===== HOTSPOT BUTTONS ===== */
.hotspot {
  position: absolute;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 12px;
  z-index: 15;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}

.hotspot-label {
  display: none;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: rgba(245, 156, 42, 0.75);
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

body.debug-hotspots .hotspot {
  border: 2px dashed rgba(245,156,42,0.85);
  background: rgba(245,156,42,0.08);
}
body.debug-hotspots .hotspot-label {
  display: block;
}

.gift-hotspot {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}
.gift-hotspot.revealed {
  opacity: 1;
  pointer-events: auto;
}
.gift-hotspot:active {
  background: rgba(245,156,42,0.12);
}

.gift-ripple {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 0; height: 0;
  border-radius: 50%;
  border: 2px solid rgba(245,156,42,0.55);
  pointer-events: none;
  animation: rippleGrow 3s ease-out infinite;
  animation-play-state: paused;
}
.gift-hotspot.revealed .gift-ripple {
  animation-play-state: running;
}
@keyframes rippleGrow {
  0%   { width: 0;     height: 0;     opacity: 0.8; }
  100% { width: 100px; height: 100px; opacity: 0; }
}

/* ===== PROGRESS BAR ===== */
.progress-bar-wrap {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 20;
  padding: 8px 20px 16px;
  background: linear-gradient(0deg, rgba(0,0,0,0.90) 0%, transparent 100%);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.progress-bar-wrap.show { opacity: 1; transform: translateY(0); }

.prog-track { position: relative; height: 28px; }
.prog-fill {
  position: absolute;
  top: 50%; left: 5%;
  width: 0%; height: 2px;
  background: linear-gradient(90deg, var(--progress-pink), var(--amber));
  transform: translateY(-50%);
  transition: width 0.8s ease;
  z-index: 1;
  box-shadow: 0 0 6px rgba(245,156,42,0.42);
}
.prog-steps {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 2;
}
.prog-step {
  display: flex; flex-direction: column; align-items: center;
  opacity: 0.35;
  transition: opacity 0.4s, transform 0.4s;
}
.prog-step.done { opacity: 1; }
.prog-step.done .step-dot {
  background: var(--progress-pink);
  border-color: var(--progress-pink);
  box-shadow: 0 0 8px rgba(232,114,154,0.55);
}
.step-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.22);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.4s;
}
.step-dot span { display: none !important; }

.final-step.unlocked .lock-dot {
  background: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 0 12px rgba(245,156,42,0.75);
}

/* ===== TOUCH HINT ===== */
.touch-hint {
  position: fixed;
  bottom: 70px; left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center; gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
}
.touch-hint.show { opacity: 1; }
.touch-hint p { display: none; }
.touch-anim {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(245,156,42,0.6);
  animation: touchPulse 1.5s ease-in-out infinite;
}
@keyframes touchPulse {
  0%,100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.3); opacity: 0.4; }
}

/* ===== GIFT FRAME (slide-in pages) ===== */
.gift-frame {
  position: fixed; inset: 0; z-index: 100;
  border: none; width: 100%; height: 100%;
  background: var(--dark);
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.22,1,0.36,1);
}
.gift-frame.active { transform: translateX(0); }


/* =====================================================
   INTRO OVERLAY
   ===================================================== */
#introOverlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: #080910;
  transition: opacity 1.2s ease;
  pointer-events: auto;
  overflow: hidden;
  /* safe area padding for notched phones */
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
#introOverlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* ── SPOTLIGHT ── */
/*  Correct cone: narrow pinpoint at top-center, spreads wide downward.
    We use clip-path polygon to carve the cone shape, then a vertical
    linear-gradient inside it (bright top → dim bottom) so the beam
    looks lit from a source above.                                      */

/* Outer wide cone — broadest spread */
.spotlight {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 85vh;
  background: linear-gradient(
    180deg,
    rgba(220, 175, 60, 0.55) 0%,
    rgba(200, 155, 45, 0.30) 25%,
    rgba(170, 130, 35, 0.12) 60%,
    transparent 100%
  );
  /* Narrow at top (5% either side of center), wide at bottom (full width) */
  clip-path: polygon(44% 0%, 56% 0%, 100% 100%, 0% 100%);
  pointer-events: none;
  z-index: 1;
  filter: blur(18px);
}

/* Mid cone — slightly narrower, brighter */
.spotlight-inner {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 75vh;
  background: linear-gradient(
    180deg,
    rgba(240, 195, 75, 0.65) 0%,
    rgba(215, 168, 55, 0.32) 30%,
    rgba(180, 138, 38, 0.10) 65%,
    transparent 100%
  );
  clip-path: polygon(46% 0%, 54% 0%, 82% 100%, 18% 100%);
  pointer-events: none;
  z-index: 2;
  filter: blur(8px);
}

/* Tight inner core — very narrow, most intense */
.spotlight-streak {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 62vh;
  background: linear-gradient(
    180deg,
    rgba(255, 225, 120, 0.80) 0%,
    rgba(245, 200, 85, 0.40) 25%,
    rgba(220, 170, 60, 0.12) 60%,
    transparent 100%
  );
  clip-path: polygon(48% 0%, 52% 0%, 65% 100%, 35% 100%);
  pointer-events: none;
  z-index: 3;
  filter: blur(3px);
}

/* ── BOKEH DOTS ── */
.bokeh-container {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 4;
}
.bokeh-dot {
  position: absolute;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.55);
  filter: blur(2px);
  animation: bokehFloat linear infinite;
}
@keyframes bokehFloat {
  0%   { transform: translateY(0) scale(1);    opacity: 0.7; }
  50%  { opacity: 1; }
  100% { transform: translateY(-28px) scale(0.82); opacity: 0; }
}

/* ── FALLING PETALS ── */
.petal-container {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 5;
  overflow: hidden;
}
.petal {
  position: absolute;
  top: -20px;
  border-radius: 50% 0 50% 0;
  background: #c084fc;
  opacity: 0.85;
  animation: petalFall linear infinite;
}
@keyframes petalFall {
  0%   { transform: translateY(0) rotate(0deg) translateX(0);      opacity: 0.9; }
  80%  { opacity: 0.6; }
  100% { transform: translateY(105vh) rotate(540deg) translateX(36px); opacity: 0; }
}

/* ── MAIN CONTENT WRAPPER ── */
/*  Uses flex column; content fills available height so
    the string naturally sits at the bottom.             */
.intro-content {
  position: relative; z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  /* Push content down from the very top a little */
  padding-top: max(5vh, 28px);
  /* leave room for the string section below */
  padding-bottom: 0;
  gap: 0;
  flex: 0 0 auto;
}

/* ── TITLE ── */
.intro-message {
  color: rgba(255, 248, 220, 0.95);
  font-family: var(--font-script);
  font-size: clamp(28px, 8.5vw, 42px);
  text-align: center;
  letter-spacing: 0.3px;
  line-height: 1.3;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 1s ease, transform 1s ease;
  padding: 0 20px;
  text-shadow:
    0 0 40px rgba(245,156,42,0.30),
    0 0 80px rgba(245,156,42,0.12);
  white-space: nowrap; /* keep on one line like reference */
}
@media (max-width: 360px) {
  .intro-message { white-space: normal; font-size: 26px; }
}
.intro-message.visible { opacity: 1; transform: translateY(0); }

/* ── GOLD HEART DIVIDER ── */
/* Thin lines + heart icon, exactly like the reference */
.heart-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  opacity: 0;
  transition: opacity 0.9s ease 0.4s;
}
.heart-divider.visible { opacity: 1; }
.heart-divider-line {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,149,42,0.75));
}
.heart-divider-line.right {
  background: linear-gradient(90deg, rgba(201,149,42,0.75), transparent);
}
.heart-divider-icon {
  color: rgba(201,149,42,0.9);
  font-size: 11px;
  line-height: 1;
}

/* ── CAP / BLOSSOM ── */
.blossom-wrap {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  margin-top: clamp(8px, 2.5vh, 18px);
  opacity: 0;
  transition: opacity 1s ease 0.5s;
}
.blossom-wrap.visible { opacity: 1; }

/* Purple radial glow behind the cap */
.blossom-glow {
  position: absolute;
  width: min(46vw, 200px);
  height: min(46vw, 200px);
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(130,60,220,0.55) 0%,
    rgba(100,40,180,0.25) 45%,
    transparent 70%);
  animation: blossomPulse 2.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes blossomPulse {
  0%,100% { transform: scale(1);    opacity: 0.65; }
  50%      { transform: scale(1.18); opacity: 1; }
}

/* Small sparkle dots around the cap (reference shows these) */
.cap-sparkle {
  position: absolute;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(200,160,255,0.8);
  animation: sparkleFloat ease-in-out infinite alternate;
}
@keyframes sparkleFloat {
  from { transform: scale(0.7); opacity: 0.4; }
  to   { transform: scale(1.3); opacity: 1; }
}

.blossom-emoji {
  font-size: clamp(72px, 20vw, 110px);
  position: relative; z-index: 1;
  filter: drop-shadow(0 4px 18px rgba(100,40,180,0.7))
          drop-shadow(0 0 40px rgba(140,80,220,0.45));
  animation: blossomFloat 3.5s ease-in-out infinite;
  line-height: 1;
}
@keyframes blossomFloat {
  0%,100% { transform: translateY(0px) rotate(-1deg); }
  50%      { transform: translateY(-8px) rotate(1deg); }
}

/* ── PULL HINT TEXT ── */
/* Sits BELOW the cap, ABOVE the chevron, near the string */
.pull-hint {
  color: rgba(255,255,255,0.82);
  font-family: var(--font-body);
  font-size: clamp(14px, 4vw, 16px);
  font-weight: 400;
  text-align: center;
  line-height: 1.65;
  letter-spacing: 0.2px;
  margin-top: clamp(10px, 2.5vh, 18px);
  opacity: 0;
  transition: opacity 0.9s ease 1.3s;
}
.pull-hint.visible { opacity: 1; }

/* ── CHEVRON ── */
.chevron-wrap {
  margin-top: 10px;
  opacity: 0;
  transition: opacity 0.9s ease 1.6s;
}
.chevron-wrap.visible {
  opacity: 1;
  animation: chevronBounce 1.6s ease-in-out infinite;
}
.chevron {
  color: rgba(201,149,42,0.85);
  font-size: 22px;
  display: block;
}
@keyframes chevronBounce {
  0%,100% { transform: translateY(0px); }
  50%      { transform: translateY(6px); }
}

/* ── STRING SECTION ── */
/*  Sits below the text content, centered, with generous
    space — takes up remaining screen height naturally.  */
.string-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  user-select: none;
  z-index: 10;
  flex: 1 1 auto;
  justify-content: flex-start;
  padding-bottom: 0;
  padding-top: 16px;
  opacity: 0;
  transition: opacity 0.9s ease 1.8s;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
}
.string-wrap.visible { opacity: 1; }

.string-line {
  width: 1.5px;
  /* Dynamic height fills remaining space — capped */
  height: clamp(60px, 14vh, 130px);
  background: linear-gradient(180deg,
    rgba(245,156,42,0.08) 0%,
    rgba(245,156,42,0.85) 100%);
  border-radius: 1px;
  transform-origin: top center;
  transition: height 0.18s ease;
}
.string-line.pulled { height: calc(clamp(60px, 14vh, 130px) + 36px); }

.string-knob {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(20, 14, 36, 0.85);
  border: 1.5px solid rgba(245,156,42,0.70);
  display: flex; align-items: center; justify-content: center;
  margin-top: 4px;
  transition: transform 0.18s ease, background 0.18s ease;
  animation: knobFloat 2.5s ease-in-out infinite 2.2s;
  /* subtle inner glow matching reference */
  box-shadow:
    0 0 18px rgba(140, 80, 220, 0.35),
    inset 0 0 12px rgba(140, 80, 220, 0.20);
}
.string-knob.active {
  transform: translateY(30px) scale(0.88);
  background: rgba(245,156,42,0.22);
  animation: none;
}
.knob-inner {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: rgba(245,156,42,0.92);
  box-shadow: 0 0 8px rgba(245,156,42,0.8);
  pointer-events: none;
}
@keyframes knobFloat {
  0%,100% { transform: translateY(0px); }
  50%      { transform: translateY(9px); }
}
