.flame-cursor {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  width: 50px;
  height: 70px;
  transform: translate(-50%, -85%);
  transition: opacity 0.3s ease;
}

.flame-cursor .flame {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 50px;
  background: radial-gradient(ellipse at bottom, 
    var(--flame-core, #aaffff) 0%, 
    var(--flame-inner, #33ccff) 25%, 
    var(--flame-outer, #0066ff) 55%, 
    transparent 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  animation: flameFlicker 0.12s infinite alternate;
  filter: blur(1px);
}

.flame-cursor .flame::before {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 30px;
  background: radial-gradient(ellipse at bottom, 
    var(--flame-core, #aaffff) 0%, 
    var(--flame-inner, #33ccff) 40%, 
    transparent 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  animation: flameFlicker 0.08s infinite alternate-reverse;
}

.flame-cursor .flame::after {
  content: '';
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 18px;
  background: radial-gradient(ellipse at bottom, 
    #ffffff 0%, 
    var(--flame-core, #aaffff) 60%, 
    transparent 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  animation: flameFlicker 0.1s infinite alternate;
}

.flame-cursor .glow {
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 90px;
  background: radial-gradient(circle, 
    var(--flame-glow, rgba(51, 153, 255, 0.5)) 0%, 
    transparent 70%);
  border-radius: 50%;
  animation: glowPulse 0.5s infinite alternate;
}

@keyframes flameFlicker {
  0% { 
    transform: translateX(-50%) scale(1) rotate(-3deg); 
    filter: blur(1px);
  }
  100% { 
    transform: translateX(-50%) scale(1.08) rotate(3deg); 
    filter: blur(1.5px);
  }
}

@keyframes glowPulse {
  0% { opacity: 0.8; transform: translateX(-50%) scale(1); }
  100% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

body.flame-orange .flame-cursor {
  --flame-core: #ffff99;
  --flame-inner: #ff9933;
  --flame-outer: #ff4400;
  --flame-glow: rgba(255, 107, 53, 0.4);
}

body.flame-blue .flame-cursor {
  --flame-core: #aaffff;
  --flame-inner: #33ccff;
  --flame-outer: #0066ff;
  --flame-glow: rgba(51, 153, 255, 0.4);
}

body.flame-purple .flame-cursor {
  --flame-core: #ffaaff;
  --flame-inner: #cc66ff;
  --flame-outer: #9933ff;
  --flame-glow: rgba(170, 85, 255, 0.4);
}

body.flame-green .flame-cursor {
  --flame-core: #aaffaa;
  --flame-inner: #66ff66;
  --flame-outer: #00cc00;
  --flame-glow: rgba(68, 221, 68, 0.4);
}

body.flame-pink .flame-cursor {
  --flame-core: #ffddee;
  --flame-inner: #ff66aa;
  --flame-outer: #ff3388;
  --flame-glow: rgba(255, 85, 153, 0.4);
}
