/* ===== Google Fonts ===== */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400&family=Great+Vibes&family=Inter:wght@300;400&display=swap');

/* ===== CSS Variables ===== */
:root {
  --black: #0a0a0a;
  --black-light: #121212;
  --gold: #d4af37;
  --gold-light: #f3e5ab;
  --gold-dark: #b8942e;
  --champagne: #f7e7ce;
  --white: #fafafa;
  --white-dim: rgba(250, 250, 250, 0.7);

  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-script: 'Great Vibes', cursive;
  --font-body: 'Inter', -apple-system, sans-serif;

  --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-serif);
  background: var(--black);
  color: var(--white);
  min-height: 100dvh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* ===== Background Effects ===== */
#background-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.bokeh-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bokeh-dot {
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
  opacity: 0;
  animation: bokehFloat 8s ease-in-out infinite;
}

@keyframes bokehFloat {
  0%, 100% {
    opacity: 0;
    transform: translateY(0) scale(0.8);
  }
  30% {
    opacity: 0.15;
  }
  50% {
    opacity: 0.25;
    transform: translateY(-30px) scale(1);
  }
  70% {
    opacity: 0.15;
  }
}

/* ===== Main Container ===== */
.main-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* ===== Envelope Scene ===== */
.envelope-scene {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.8s var(--transition-smooth), transform 0.8s var(--transition-smooth);
}

.envelope-scene.hidden {
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
  position: absolute;
}

/* Tap hint */
.tap-hint {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(0,0,0,0.8);
  text-transform: uppercase;
  margin-bottom: 30px;
  opacity: 0;
  animation: fadeInUp 1.2s var(--transition-smooth) 1s forwards;
}

/* ===== Envelope ===== */
.envelope-wrapper {
  position: relative;
  width: 260px;
  height: 180px;
  perspective: 800px;
}

@media (min-width: 400px) {
  .envelope-wrapper {
    width: 300px;
    height: 200px;
  }
}

.envelope {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

/* Envelope Body */
.envelope-body {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
  border: 1.5px solid var(--gold);
  border-radius: 4px;
  box-shadow:
    0 4px 30px rgba(212, 175, 55, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(212, 175, 55, 0.1);
  overflow: hidden;
  z-index: 2;
}

/* Gold corner accents */
.envelope-body::before,
.envelope-body::after {
  content: '';
  position: absolute;
  width: 30px;
  height: 30px;
  border-color: var(--gold);
  border-style: solid;
  opacity: 0.4;
}

.envelope-body::before {
  top: 8px;
  left: 8px;
  border-width: 1px 0 0 1px;
}

.envelope-body::after {
  bottom: 8px;
  right: 8px;
  border-width: 0 1px 1px 0;
}

/* Inner V shape */
.envelope-inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.envelope-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 130px solid transparent;
  border-right: 130px solid transparent;
  border-top: 90px solid rgba(212, 175, 55, 0.06);
}

@media (min-width: 400px) {
  .envelope-inner::before {
    border-left: 150px solid transparent;
    border-right: 150px solid transparent;
    border-top: 100px solid rgba(212, 175, 55, 0.06);
  }
}

/* Envelope Flap */
.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;
  transform-origin: top center;
  transform-style: preserve-3d;
  z-index: 3;
  transition: transform 1.2s var(--transition-smooth);
}

.envelope-flap-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
}

.envelope-flap-front {
  width: 0;
  height: 0;
  border-left: 130px solid transparent;
  border-right: 130px solid transparent;
  border-top: 90px solid #1a1a1a;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  position: relative;
}

@media (min-width: 400px) {
  .envelope-flap-front {
    border-left: 150px solid transparent;
    border-right: 150px solid transparent;
    border-top: 100px solid #1a1a1a;
  }
}

.envelope-flap-front::after {
  content: '';
  position: absolute;
  top: -90px;
  left: -130px;
  width: 0;
  height: 0;
  border-left: 130px solid transparent;
  border-right: 130px solid transparent;
  border-top: 90px solid transparent;
  border-bottom: 0;
  box-shadow: inset 0 0 0 1.5px var(--gold);
  pointer-events: none;
}

/* Wax seal */
.wax-seal {
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  background: radial-gradient(circle at 35% 35%, var(--gold-light), var(--gold), var(--gold-dark));
  border-radius: 50%;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.4),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2),
    inset 0 2px 4px rgba(255, 255, 255, 0.2);
  transition: transform 0.8s var(--transition-smooth), opacity 0.6s ease;
}

.wax-seal::after {
  content: '✦';
  font-size: 16px;
  color: var(--black);
  opacity: 0.7;
}

/* Envelope opened state */
.envelope-scene.opened .envelope-flap {
  transform: rotateX(-180deg);
}

.envelope-scene.opened .wax-seal {
  opacity: 0;
  transform: translateX(-50%) scale(0.5);
}

/* Letter card */
.letter-card {
  position: absolute;
  width: 85%;
  height: 70%;
  left: 7.5%;
  bottom: 10%;
  background: linear-gradient(180deg, #fefefe 0%, #f5f0e8 100%);
  border-radius: 3px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transform: translateY(0);
  transition: transform 1.2s var(--transition-smooth) 0.4s;
}

.envelope-scene.opened .letter-card {
  transform: translateY(-120%);
}

.letter-text {
  font-family: var(--font-script);
  color: var(--black);
  font-size: 1.1rem;
  text-align: center;
  line-height: 1.6;
  opacity: 0.8;
}

.letter-text-small {
  font-family: var(--font-body);
  font-size: 0.6rem;
  color: var(--gold-dark);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 8px;
  opacity: 0.6;
}

/* Envelope glow pulse */
.envelope-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  height: 240px;
  background: radial-gradient(ellipse, rgba(212, 175, 55, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
  animation: envelopeGlow 3s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes envelopeGlow {
  0% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
}

/* ===== Text Scene ===== */
.text-scene {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 40px 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s var(--transition-smooth);
  cursor: pointer;
}

.text-scene.active {
  opacity: 1;
  pointer-events: auto;
}

/* Text content container */
.text-content {
  text-align: center;
  max-width: 360px;
  width: 100%;
}

.narrative-text {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--white);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s var(--transition-smooth), transform 1s var(--transition-smooth);
  letter-spacing: 0.02em;
}

.narrative-text.visible {
  opacity: 1;
  transform: translateY(0);
}

.narrative-text.fade-out {
  opacity: 0;
  transform: translateY(-30px);
}

/* Special name styling */
.narrative-text.name-style {
  font-family: var(--font-script);
  font-size: 2.4rem;
  color: var(--gold);
  line-height: 1.4;
  text-shadow: 0 0 40px rgba(212, 175, 55, 0.3);
}

@media (min-width: 400px) {
  .narrative-text.name-style {
    font-size: 2.8rem;
  }
}

/* Final birthday text */
.narrative-text.birthday-style {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--champagne));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
}

@media (min-width: 400px) {
  .narrative-text.birthday-style {
    font-size: 2.4rem;
  }
}

/* Decorative line */
.decorative-line {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 24px auto;
  opacity: 0;
  transform: scaleX(0);
  transition: opacity 1s var(--transition-smooth) 0.3s, transform 1s var(--transition-smooth) 0.3s;
}

.decorative-line.visible {
  opacity: 0.6;
  transform: scaleX(1);
}

/* Tap to continue hint */
.continue-hint {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(0,0,0,0.9);
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.8s var(--transition-smooth);
  pointer-events: none;
  z-index: 9999; /* Highest priority */
  white-space: nowrap;
}

.continue-hint.visible {
  opacity: 1;
}

/* ===== Sparkle / Particle Layer ===== */
.sparkle-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
  overflow: hidden;
}

.sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--gold-light);
  border-radius: 50%;
  opacity: 0;
  animation: sparkleAnim var(--duration, 2s) var(--delay, 0s) ease-in-out forwards;
}

@keyframes sparkleAnim {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0);
  }
  20% {
    opacity: 1;
    transform: translateY(-20px) scale(1);
  }
  80% {
    opacity: 0.6;
  }
  100% {
    opacity: 0;
    transform: translateY(-100px) scale(0.3);
  }
}

/* Intense sparkle for finale */
.sparkle.intense {
  width: 6px;
  height: 6px;
  box-shadow: 0 0 6px var(--gold), 0 0 12px rgba(212, 175, 55, 0.3);
}

/* ===== Gold Confetti ===== */
.confetti {
  position: absolute;
  width: 8px;
  height: 8px;
  opacity: 0;
  animation: confettiFall var(--duration, 3s) var(--delay, 0s) ease-in forwards;
}

@keyframes confettiFall {
  0% {
    opacity: 0;
    transform: translateY(-20px) rotate(0deg) scale(0);
  }
  10% {
    opacity: 1;
    transform: translateY(0) rotate(30deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(calc(100vh + 40px)) rotate(720deg) scale(0.5);
  }
}

/* ===== Utility Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== Final Scene Extras ===== */
.golden-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  height: 200px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  pointer-events: none;
}

.golden-ring.animate {
  animation: ringExpand 2s var(--transition-smooth) forwards;
}

@keyframes ringExpand {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.6;
  }
  100% {
    transform: translate(-50%, -50%) scale(3);
    opacity: 0;
  }
}

/* ===== Responsive Fine-tuning ===== */
@media (max-width: 360px) {
  .narrative-text {
    font-size: 1.1rem;
  }
  .narrative-text.name-style {
    font-size: 2rem;
  }
  .narrative-text.birthday-style {
    font-size: 1.7rem;
  }
  .envelope-wrapper {
    width: 240px;
    height: 165px;
  }
}

@media (min-height: 800px) {
  .narrative-text {
    font-size: 1.65rem;
  }
}

/* ===== Sound Toggle ===== */
.sound-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 200;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease;
  opacity: 0;
  pointer-events: none;
  font-size: 14px;
  color: var(--gold);
}

.sound-toggle.visible {
  opacity: 0.7;
  pointer-events: auto;
}

.sound-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(212, 175, 55, 0.5);
  opacity: 1;
}

/* ===== Birthday Subtitle (name under HBD) ===== */
.birthday-subtitle {
  font-family: var(--font-script);
  font-size: 1.8rem;
  color: var(--gold);
  margin-top: 16px;
  opacity: 0;
  animation: subtitleIn 1.2s var(--transition-smooth) 0.6s forwards;
  text-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
}

@media (min-width: 400px) {
  .birthday-subtitle {
    font-size: 2.2rem;
  }
}

@keyframes subtitleIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===== Cake Scene ===== */
.cake-scene {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(1); /* No scale to avoid Safari rendering artifacts */
  transition: opacity 1.2s var(--transition-smooth);
  padding: 20px;
  background: #0a0a0a; /* Solid black for Safari */
  z-index: 2000; /* Extremely high */
  pointer-events: auto; /* Handle clicks directly to bubble to body */
}

.cake-scene.visible {
  opacity: 1;
  transform: scale(1);
}

.cake-scene.fade-out-cake {
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
}

/* Cake ambient glow */
.cake-glow {
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(255, 180, 50, 0.12) 0%, rgba(212, 175, 55, 0.04) 40%, transparent 70%);
  border-radius: 50%;
  animation: cakeGlowPulse 2.5s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes cakeGlowPulse {
  0% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
}

/* Cake container */
.cake-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
  z-index: 20; /* High z-index */
  opacity: 1 !important;
  visibility: visible !important;
}

@keyframes cakeFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-4px); }
}

/* Candles row */
.candles-row {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: -2px;
  position: relative;
  z-index: 5;
}

/* Individual candle */
.candle {
  width: 6px;
  height: 32px;
  background: linear-gradient(180deg, var(--champagne) 0%, var(--gold) 100%);
  border-radius: 2px 2px 0 0;
  position: relative;
}

.candle-short {
  height: 26px;
}

/* Flame */
.flame {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 16px;
  background: radial-gradient(ellipse at center bottom, #fff 0%, #ffe066 30%, #ff9900 60%, transparent 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  animation: flameFlicker 0.8s ease-in-out infinite alternate;
  filter: blur(0.5px);
}

.flame-inner {
  position: absolute;
  bottom: 1px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: radial-gradient(ellipse at center bottom, #fff 0%, #ffe88a 60%, transparent 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  animation: flameInnerFlicker 0.6s ease-in-out infinite alternate-reverse;
}

@keyframes flameFlicker {
  0% {
    transform: translateX(-50%) scaleY(1) scaleX(1);
    opacity: 1;
  }
  25% {
    transform: translateX(-50%) scaleY(1.1) scaleX(0.9) rotate(-2deg);
  }
  50% {
    transform: translateX(-50%) scaleY(0.95) scaleX(1.05);
    opacity: 0.9;
  }
  75% {
    transform: translateX(-50%) scaleY(1.05) scaleX(0.95) rotate(2deg);
  }
  100% {
    transform: translateX(-50%) scaleY(1.08) scaleX(0.92);
    opacity: 1;
  }
}

@keyframes flameInnerFlicker {
  0% { transform: translateX(-50%) scaleY(1); opacity: 0.9; }
  100% { transform: translateX(-50%) scaleY(1.15); opacity: 1; }
}

/* Cake tiers */
.cake-top-tier {
  width: 100px;
  height: 30px;
  background: #2a2222; /* Fallback */
  background: linear-gradient(to bottom, #2a2222, #1a1515);
  border: 1.5px solid var(--gold);
  border-radius: 6px 6px 0 0;
  position: relative;
  z-index: 20;
}

/* Gold drip decoration on top tier */
.cake-top-tier::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 10%;
  width: 80%;
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    var(--gold) 0px,
    var(--gold) 8px,
    transparent 8px,
    transparent 14px
  );
  border-radius: 0 0 3px 3px;
  opacity: 0.7;
}

.cake-mid-tier {
  width: 135px;
  height: 35px;
  background-color: #1a1515; /* Solid fallback */
  background: linear-gradient(to bottom, #242020, #1a1515);
  border: 1.5px solid var(--gold-dark);
  border-top: none;
  position: relative;
  z-index: 15;
}

/* Elegant pattern on mid tier */
.cake-mid-tier::before {
  content: '✦  ✦  ✦';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 8px;
  color: var(--gold);
  opacity: 0.5;
  letter-spacing: 2px;
}

.cake-bottom-tier {
  width: 165px;
  height: 40px;
  background-color: #151010; /* Solid fallback */
  background: linear-gradient(to bottom, #201c1c, #151010);
  border: 1.5px solid var(--gold-dark);
  border-top: none;
  border-radius: 0 0 6px 6px;
  position: relative;
  z-index: 10;
}

/* Bottom tier ribbon */
.cake-bottom-tier::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.4;
}

/* Cake plate */
.cake-plate {
  width: 190px;
  height: 12px;
  background-color: #b8942e; /* Solid fallback */
  background: linear-gradient(to bottom, var(--gold-dark), var(--gold));
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.2);
  position: relative;
  z-index: 5;
}

/* Cake text area */
.cake-text-area {
  text-align: center;
  opacity: 0;
  animation: cakeTextIn 1.2s var(--transition-smooth) 0.8s forwards;
}

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

.cake-wish {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--white-dim);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 16px;
  transition: opacity 0.4s ease;
}

.cake-name {
  font-family: var(--font-script);
  font-size: 2.2rem;
  color: var(--gold);
  text-shadow: 0 0 30px rgba(212, 175, 55, 0.25);
  line-height: 1.3;
}

@media (min-width: 400px) {
  .cake-name {
    font-size: 2.6rem;
  }
}

.cake-line {
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 16px auto;
  opacity: 0.5;
}

.cake-date {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 300;
  color: var(--white-dim);
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.6;
}

.cake-from {
  font-family: var(--font-body);
  font-size: 0.55rem;
  font-weight: 300;
  color: var(--gold-dark);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 24px;
  opacity: 0.7;
}

.gold-heart-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  width: 14px;
  height: 14px;
  margin-left: 2px;
}

.gold-heart-svg {
  width: 100%;
  height: 100%;
  fill: var(--gold);
  filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.6));
  animation: heartBeat 1.5s infinite;
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 3px rgba(212, 175, 55, 0.4)); }
  50% { transform: scale(1.3); filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.8)); }
}

.flame.blown-out {
  animation: blowOutAnim 0.8s ease-in forwards !important;
}

@keyframes blowOutAnim {
  0% { transform: translateX(-50%) scale(1.2) rotate(0deg); opacity: 1; filter: brightness(2) blur(0px); }
  25% { transform: translateX(-100%) scale(1.5) rotate(-20deg); opacity: 0.9; filter: blur(1px); }
  50% { transform: translateX(-180%) scale(1.2) rotate(-45deg); opacity: 0.6; filter: blur(3px); }
  100% { transform: translateX(-250%) scale(0) rotate(-90deg); opacity: 0; filter: blur(10px); }
}
