/**
 * cake-experience.css
 * 2luv-Inspired Romantic Pastel Editorial Theme
 * Perfectly matching 2-luv.com/en/event/birthday aesthetic & vibes
 * Built with immense love for Avnii's 21st Birthday ❤️
 */

@import url('https://fonts.googleapis.com/css2?family=Abril+Fatface&family=Inter:wght@300;400;500;600;700;800&family=Great+Vibes&display=swap');

:root {
  /* 2luv Official Color Tokens */
  --lv3-linen: #fcefe5;          /* Warm soft linen backdrop */
  --lv3-linen-2: #fff7f0;        /* Glowing warm peach highlight */
  --lv3-paper: #fff8f1;          /* Pure warm paper card */
  --lv3-card-bg: #ffffff;        /* Crisp card base */
  --lv3-ink: #3a2340;            /* Deep rich blackberry ink text */
  --lv3-muted: #6e5869;          /* Muted plum text */
  --lv3-wine: #d1264f;           /* Signature 2luv raspberry wine CTA */
  --lv3-wine-hover: #b81f44;     /* Deeper raspberry on hover */
  --lv3-rose: #f59bb5;           /* Candy rose pink */
  --lv3-candy-pink: #f59bb5;
  --lv3-candy-lilac: #c7a6f2;
  --lv3-candy-mint: #9fe0c9;
  --lv3-candy-butter: #ffd98a;
  --lv3-candy-coral: #ff8a7a;
  --lv3-gold: #d9b47c;
  --lv3-border: rgba(58, 35, 64, 0.09);

  /* 2luv Typography */
  --font-display: 'Abril Fatface', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-script: 'Great Vibes', cursive;
}

/* Atmospheric Container Covering the Viewport */
#cake-experience-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  /* 2luv Signature Birthday Hero Gradient */
  background: radial-gradient(ellipse 65% 60% at 70% 45%, #fff7f0 0%, #fcefe5 65%), #fcefe5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: none;
  font-family: var(--font-sans);
  color: var(--lv3-ink);
  user-select: none;
  -webkit-user-select: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), background 0.8s ease;
}

#cake-experience-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* When candles are blown out: subtle dreamy lilac-peach shift just like 2luv */
#cake-experience-overlay.candles-blown {
  background: radial-gradient(ellipse 65% 60% at 70% 45%, rgba(199, 166, 242, 0.22) 0%, #fcefe5 70%), #fcefe5;
}

/* 3D WebGL Canvas */
#cake-canvas-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  touch-action: none;
}

/* Ambient Dream Glow / Warm Pastel Aura */
.cake-ambient-bokeh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: 
    radial-gradient(circle at 75% 35%, rgba(255, 217, 138, 0.28) 0%, transparent 55%),
    radial-gradient(circle at 25% 65%, rgba(245, 155, 181, 0.22) 0%, transparent 50%),
    radial-gradient(circle at 80% 75%, rgba(199, 166, 242, 0.18) 0%, transparent 45%);
  filter: blur(45px);
}

/* Confetti & Floating Candy Petals Layer */
#cake-hearts-container,
#cake-confetti-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
  overflow: hidden;
}

/* Top Romantic Header Navigation */
.cake-top-bar {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 680px;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 2luv Signature Eyebrow Pill */
.cake-header-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid var(--lv3-border);
  padding: 8px 18px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  color: var(--lv3-wine);
  letter-spacing: 0.02em;
  box-shadow: 0 8px 24px -16px rgba(209, 38, 79, 0.45);
}

/* 2luv Rainbow Conic Dot */
.cake-header-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: conic-gradient(#f59bb5, #ffd98a, #9fe0c9, #c7a6f2, #f59bb5);
}

.cake-controls-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cake-icon-btn {
  background: #ffffff;
  border: 1px solid var(--lv3-border);
  color: var(--lv3-ink);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 18px rgba(58, 35, 64, 0.08);
}

.cake-icon-btn:hover {
  background: #fff8f1;
  color: var(--lv3-wine);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -10px rgba(209, 38, 79, 0.45);
}

.cake-icon-btn:active {
  transform: scale(0.95);
}

/* Center Laser Cutting Line following drag */
#cake-cut-laser-line {
  position: absolute;
  height: 3px;
  background: linear-gradient(90deg, #d1264f, #ffd98a, #c7a6f2);
  box-shadow: 0 0 14px rgba(209, 38, 79, 0.8), 0 0 24px rgba(255, 217, 138, 0.7);
  transform-origin: 0 50%;
  pointer-events: none;
  z-index: 5;
  border-radius: 3px;
  display: none;
}

/* Cutting instruction gesture banner */
.cake-slice-hint-banner {
  position: absolute;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: #ffffff;
  border: 1px solid rgba(209, 38, 79, 0.25);
  padding: 11px 24px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--lv3-ink);
  display: none;
  align-items: center;
  gap: 10px;
  animation: pulse2luvGlow 2s infinite ease-in-out;
  box-shadow: 0 14px 34px -18px rgba(142, 36, 51, 0.35);
}

.cake-slice-hint-banner.show {
  display: flex;
}

@keyframes pulse2luvGlow {
  0%, 100% { transform: translateX(-50%) scale(1); box-shadow: 0 10px 28px -14px rgba(209, 38, 79, 0.4); }
  50% { transform: translateX(-50%) scale(1.03); box-shadow: 0 16px 36px -12px rgba(209, 38, 79, 0.65); }
}

/* Bottom Floating 2luv Keepsake Glass / Paper Card */
.cake-bottom-card-container {
  position: relative;
  z-index: 10;
  width: 90%;
  max-width: 500px;
  margin-bottom: 24px;
  pointer-events: none;
}

.cake-glass-card {
  pointer-events: auto;
  background: #ffffff;
  border: 1px solid var(--lv3-border);
  border-radius: 30px;
  padding: 26px 30px;
  text-align: center;
  box-shadow: 
    0 24px 60px -20px rgba(58, 35, 64, 0.18),
    0 8px 24px -12px rgba(209, 38, 79, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 2luv Eyebrow Tag Inside Card */
.cake-step-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff8f1;
  border: 1px solid rgba(209, 38, 79, 0.15);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lv3-wine);
  margin-bottom: 12px;
}

.cake-step-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: conic-gradient(#f59bb5, #ffd98a, #9fe0c9, #c7a6f2, #f59bb5);
}

/* 2luv Headline Typography (Abril Fatface) */
.cake-step-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--lv3-ink);
  margin-bottom: 12px;
}

/* 2luv Signature Gradient Accent Text */
.cake-step-title em {
  font-style: normal;
  background: linear-gradient(100deg, #d1264f, #f0607f 45%, #b57be8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cake-step-desc {
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--lv3-muted);
  margin-bottom: 22px;
  font-weight: 400;
}

/* Microphone Breath Meter Indicator */
.cake-mic-meter-wrapper {
  margin: 12px 0 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.cake-mic-pulse-ring {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #fff3ea;
  border: 2px solid var(--lv3-wine);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  position: relative;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  box-shadow: 0 6px 20px -8px rgba(209, 38, 79, 0.35);
}

.cake-mic-pulse-ring::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px dashed rgba(209, 38, 79, 0.45);
  animation: rotateSlow 10s linear infinite;
}

.cake-breath-bar-track {
  width: 210px;
  height: 8px;
  background: #f2e2d6;
  border-radius: 12px;
  overflow: hidden;
}

.cake-breath-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #d1264f, #f0607f, #ffd98a);
  border-radius: 12px;
  transition: width 0.08s ease;
}

.cake-mic-status-text {
  font-size: 13px;
  color: var(--lv3-muted);
  letter-spacing: 0.02em;
  font-weight: 500;
}

/* Cutting Progress Bar */
.cake-cut-progress-wrapper {
  margin: 12px 0 16px;
  display: none;
}

.cake-cut-progress-wrapper.show {
  display: block;
}

.cake-cut-progress-track {
  width: 100%;
  height: 8px;
  background: #f2e2d6;
  border-radius: 12px;
  overflow: hidden;
}

.cake-cut-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #d1264f, #ffd98a);
  border-radius: 12px;
  transition: width 0.05s ease;
}

/* 2luv Signature Pill Button */
.cake-primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 30px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #d1264f 0%, #e0365e 60%, #f59bb5 100%);
  color: #ffffff;
  box-shadow: 0 14px 34px -14px rgba(209, 38, 79, 0.65);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.cake-primary-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: skewX(-20deg);
  transition: 0.75s;
}

.cake-primary-btn:hover::before {
  left: 140%;
}

.cake-primary-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #b81f44 0%, #d1264f 60%, #e0365e 100%);
  box-shadow: 0 18px 40px -12px rgba(209, 38, 79, 0.8);
}

.cake-primary-btn:active {
  transform: translateY(1px);
}

/* 2luv Floating Candy Confetti Pieces */
.cake-candy-confetti {
  position: absolute;
  pointer-events: none;
  animation: floatCandyUp linear forwards;
}

@keyframes floatCandyUp {
  0% { transform: translateY(0) rotate(0deg) scale(0.6); opacity: 0; }
  15% { opacity: 0.95; transform: translateY(-40px) rotate(45deg) scale(1); }
  85% { opacity: 0.9; }
  100% { transform: translateY(-680px) rotate(360deg) scale(1.15); opacity: 0; }
}

@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Mobile responsive fine-tuning */
@media (max-width: 480px) {
  .cake-top-bar {
    padding: 12px 16px;
  }
  .cake-header-pill {
    font-size: 12px;
    padding: 6px 14px;
  }
  .cake-bottom-card-container {
    width: 92%;
    margin-bottom: 16px;
  }
  .cake-glass-card {
    padding: 22px 24px;
    border-radius: 26px;
  }
  .cake-step-title {
    font-size: 22px;
  }
  .cake-step-desc {
    font-size: 13.5px;
    margin-bottom: 18px;
  }
  .cake-primary-btn {
    padding: 14px 24px;
    font-size: 14.5px;
  }
}
