/* ====================================================================
   FOXFIRE AUDIO + EASTER EGG LAYER
   void black #070907, wet wood #121A14, moonlight #E7EDE4,
   phosphor green #C8F542, spring green #3DFA9A
   ==================================================================== */

/* Audio toggle button — bottom-left mirror of motion toggle */
#audio-toggle {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  z-index: 9999;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(200, 245, 66, 0.3);
  border-radius: 50%;
  background: rgba(18, 26, 20, 0.85);
  color: #C8F542;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
  -webkit-tap-highlight-color: transparent;
}

#audio-toggle:hover {
  border-color: #C8F542;
  box-shadow: 0 0 8px rgba(200, 245, 66, 0.4);
  transform: scale(1.05);
}

#audio-toggle[aria-pressed="true"] {
  background: rgba(200, 245, 66, 0.12);
  border-color: #C8F542;
}

#audio-toggle[aria-pressed="false"] {
  color: rgba(200, 245, 66, 0.5);
  border-color: rgba(200, 245, 66, 0.2);
}

/* Unlock hint — appears once until first gesture */
.audio-hint {
  position: fixed;
  bottom: 5rem;
  left: 1rem;
  z-index: 9998;
  background: rgba(18, 26, 20, 0.92);
  border: 1px solid rgba(200, 245, 66, 0.4);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  color: #E7EDE4;
  font-size: 0.875rem;
  pointer-events: all;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  animation: hintFadeIn 0.4s ease, hintFadeOut 0.6s ease 5.4s forwards;
  backdrop-filter: blur(6px);
  white-space: nowrap;
}

.audio-hint:hover {
  border-color: #C8F542;
  box-shadow: 0 0 12px rgba(200, 245, 66, 0.3);
}

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

@keyframes hintFadeOut {
  to {
    opacity: 0;
    transform: translateY(-4px);
  }
}

/* Easter egg spore — glowing phosphor orb */
.foxfire-egg {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle, #C8F542 0%, rgba(200, 245, 66, 0.6) 50%, transparent 100%);
  box-shadow: 0 0 8px #C8F542, 0 0 16px rgba(200, 245, 66, 0.4);
  cursor: pointer;
  z-index: 9000;
  pointer-events: all;
  animation: eggPulse 2s ease-in-out infinite, eggFloat 3s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
}

.foxfire-egg:hover {
  transform: scale(1.3);
  box-shadow: 0 0 12px #C8F542, 0 0 24px rgba(200, 245, 66, 0.6);
}

@keyframes eggPulse {
  0%, 100% {
    opacity: 0.8;
  }
  50% {
    opacity: 1;
  }
}

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

/* Toast notification for egg collection */
.egg-toast {
  position: fixed;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  background: rgba(18, 26, 20, 0.95);
  border: 1px solid #3DFA9A;
  border-radius: 8px;
  padding: 0.875rem 1.5rem;
  color: #3DFA9A;
  font-size: 0.9375rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 12px rgba(61, 250, 154, 0.3);
  animation: toastSlideIn 0.3s ease, toastSlideOut 0.3s ease 2.7s forwards;
  pointer-events: none;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes toastSlideOut {
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(-12px);
  }
}

/* Responsive tweaks */
@media (max-width: 640px) {
  #audio-toggle {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1rem;
    bottom: 0.75rem;
    left: 0.75rem;
  }
  
  .audio-hint {
    bottom: 4.5rem;
    left: 0.75rem;
    font-size: 0.8125rem;
    padding: 0.625rem 0.875rem;
  }
  
  .egg-toast {
    font-size: 0.875rem;
    padding: 0.75rem 1.25rem;
  }
  
  .foxfire-egg {
    width: 14px;
    height: 14px;
  }
}
