/* ─── ScrollCandle.css ───────────────────────────────────── */

.scroll-candle-wrap {
  position: fixed;
  right: 28px;
  bottom: 0px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  filter: drop-shadow(0 0 18px rgba(255, 160, 40, 0.35));
}

/* ── FLAME SYSTEM ─────────────────────────────────── */
.candle-flame-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: -2px;
}

/* Outer glow halo */
.flame-glow {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 200, 50, 0.45) 0%, transparent 70%);
  animation: glow-pulse 1.8s ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes glow-pulse {
  0% {
    transform: translateX(-50%) scale(1);
    opacity: 0.7;
  }

  100% {
    transform: translateX(-50%) scale(1.35);
    opacity: 1;
  }
}

/* Flame outer — large orange teardrop */
.flame-outer {
  position: relative;
  z-index: 2;
  width: 18px;
  height: 34px;
  background: linear-gradient(to top, #ff6a00, #ffaa00, #ffe066);
  border-radius: 50% 50% 30% 30% / 60% 60% 40% 40%;
  transform-origin: bottom center;
  animation: flicker-outer 0.9s ease-in-out infinite alternate;
  box-shadow:
    0 0 8px 3px rgba(255, 140, 0, 0.6),
    0 0 18px 6px rgba(255, 100, 0, 0.4);
}

@keyframes flicker-outer {
  0% {
    transform: scaleX(1) scaleY(1) rotate(-2deg);
  }

  25% {
    transform: scaleX(0.88) scaleY(1.05) rotate(2deg);
  }

  50% {
    transform: scaleX(1.05) scaleY(0.95) rotate(-1deg);
  }

  75% {
    transform: scaleX(0.92) scaleY(1.08) rotate(3deg);
  }

  100% {
    transform: scaleX(1.02) scaleY(1.02) rotate(-2deg);
  }
}

/* Flame inner — bright white-yellow core */
.flame-inner {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: 8px;
  height: 18px;
  background: linear-gradient(to top, #fff8c5, #fff, rgba(255, 255, 255, 0));
  border-radius: 50% 50% 30% 30% / 60% 60% 40% 40%;
  animation: flicker-inner 0.7s ease-in-out infinite alternate;
  opacity: 0.9;
}

@keyframes flicker-inner {
  0% {
    transform: translateX(-50%) scaleX(1) scaleY(1);
  }

  50% {
    transform: translateX(-50%) scaleX(0.85) scaleY(1.1);
  }

  100% {
    transform: translateX(-50%) scaleX(1.1) scaleY(0.9);
  }
}

/* ── SMOKE PARTICLES ─────────────────────────────── */
.smoke-wrap {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  pointer-events: none;
  z-index: 4;
}

.smoke-particle {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(200, 180, 220, 0.45);
  transform: translateX(-50%);
  animation: smoke-rise 2.4s ease-out infinite;
  opacity: 0;
}

.smoke-particle:nth-child(2) {
  animation-delay: 0.8s;
  left: 40%;
}

.smoke-particle:nth-child(3) {
  animation-delay: 1.6s;
  left: 60%;
}

@keyframes smoke-rise {
  0% {
    transform: translateX(-50%) translateY(0) scale(0.6);
    opacity: 0;
  }

  20% {
    opacity: 0.5;
  }

  100% {
    transform: translateX(-50%) translateY(-22px) scale(2);
    opacity: 0;
  }
}

/* ── WICK ──────────────────────────────────────────── */
.candle-wick {
  width: 2px;
  height: 8px;
  background: linear-gradient(to bottom, #3a2000, #1a0f00);
  border-radius: 1px;
  position: relative;
  z-index: 2;
  margin-bottom: -1px;
}

/* ── CANDLE BODY ──────────────────────────────────── */
.candle-body {
  position: relative;
  width: 22px;
  background: linear-gradient(to right,
      #e8dcc8 0%,
      #fdf6e3 25%,
      #fff9f0 50%,
      #fdf6e3 75%,
      #d9cbb5 100%);
  border-radius: 3px 3px 4px 4px;
  transition: height 0.18s linear;
  box-shadow:
    inset -3px 0 6px rgba(0, 0, 0, 0.1),
    inset 3px 0 4px rgba(255, 255, 255, 0.4);
  overflow: visible;
}

/* Candle top melted rim */
.candle-body::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -2px;
  right: -2px;
  height: 6px;
  background: radial-gradient(ellipse at center, #ffe8b0 0%, #e8d5a0 100%);
  border-radius: 50%;
  z-index: 1;
}

/* ── WAX DRIPS ──────────────────────────────────────── */
.wax-drip {
  position: absolute;
  top: 2px;
  width: 5px;
  background: linear-gradient(to bottom, rgba(253, 246, 227, 0.95), rgba(232, 220, 200, 0.6));
  border-radius: 0 0 4px 4px;
  animation: drip-grow 4s ease-in-out infinite;
}

.wax-drip-1 {
  left: -3px;
  height: 14px;
  animation-delay: 0s;
  animation-duration: 4.5s;
}

.wax-drip-2 {
  right: -3px;
  height: 10px;
  animation-delay: 1.2s;
  animation-duration: 3.8s;
}

.wax-drip-3 {
  left: 2px;
  height: 18px;
  animation-delay: 2.5s;
  animation-duration: 5.2s;
}

@keyframes drip-grow {
  0% {
    height: 6px;
    opacity: 0.7;
  }

  60% {
    height: 20px;
    opacity: 1;
  }

  100% {
    height: 6px;
    opacity: 0.7;
  }
}

/* ── CANDLE BASE / HOLDER ────────────────────────── */
.candle-base {
  width: 32px;
  height: 10px;
  background: linear-gradient(to bottom, #c8a96e, #a07840);
  border-radius: 3px 3px 6px 6px;
  box-shadow:
    0 3px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 2px rgba(255, 200, 100, 0.4);
  position: relative;
}

/* Holder shine */
.candle-base::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 8px;
  height: 3px;
  background: rgba(255, 220, 140, 0.4);
  border-radius: 50%;
}

/* ── SCROLL LABEL ───────────────────────────────── */
.candle-scroll-label {
  margin-top: 6px;
  font-family: var(--font-script);
  font-size: 0.68rem;
  color: rgba(212, 162, 76, 0.7);
  letter-spacing: 0.05em;
  white-space: nowrap;
  text-align: center;
  transition: opacity 0.3s ease;
}