/* ===================== */
/* 🎛️ RESET DE BASE     */
/* ===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: 'Work Sans', sans-serif;
  background: black;
  overflow: hidden;
  --rotation-speed: 180s;
}

/* ===================== */
/* 🌀 SPIRALES / VORTEX  */
/* ===================== */
#vortex-container {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  overflow: hidden;
}


.spirale-container {
  animation: spin var(--rotation-speed) linear infinite;
  transform-origin: 500px 500px;
}

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

.spirale-blur {
  filter: blur(64px);
  stroke-width: 32;
  stroke: rgb(255,215,0);
  opacity: 0.8;
}

.spirale-sharp {
  filter: blur(12px);
  stroke-width: 2;
  stroke: rgb(250,250,210);
  opacity: 0.6;
}

.spirale-spectral {
  filter: blur(24px);
  stroke-width: 16;
  stroke: rgb(213,54,0);
  opacity: 0.4;
}

@keyframes pulse {
  0%, 100% { stroke-opacity: 0.4; }
  50%      { stroke-opacity: 0.8; }
}

.spirale-spectral-1,
.spirale-spectral-2,
.spirale-spectral-3 {
  animation: pulse 12s ease-in-out infinite;
}

/* ===================== */
/* ✨ GRAIN COSMIQUE      */
/* ===================== */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  filter: blur(8px);
  opacity: 0.8;
  background-image:
    radial-gradient(circle, rgba(255,240,200,0.8) 1.2px, transparent 3.2px),
    radial-gradient(circle, rgba(255,220,160,0.4) 1.6px, transparent 6.4px),
    radial-gradient(circle, rgba(255,200,130,0.8) 2px, transparent 0.4px),
    radial-gradient(circle, rgba(255,230,190,0.4) 2.4px, transparent 5.6px),
    radial-gradient(circle, rgba(255,215,140,0.8) 3.2px, transparent 1.6px);
  background-size:
    25vw 23vh,
    21vw 27vh,
    32vw 30vh,
    15vw 24vh,
    26vw 20vh;
  background-position:
    72.6% 43.1%,
    22.3% 69.4%,
    91.7% 34.9%,
    44.5% 16.8%,
    12.9% 57.6%;
  animation: particleBreathe 20s ease-in-out infinite,
             particleDrift 20s ease-in-out infinite;
}

@keyframes particleDrift {
  0% {
    background-position: 71.2% 46.5%, 23.7% 77.8%, 88.3% 39.1%, 42.9% 16.4%, 14.6% 53.2%;
  }
  50% {
    background-position: 64.8% 44.2%, 24.4% 72.9%, 88.7% 40.3%, 44.6% 16.9%, 12.8% 56.1%;
  }
  100% {
    background-position: 71.2% 46.5%, 23.7% 77.8%, 88.3% 39.1%, 42.9% 16.4%, 14.6% 53.2%;
  }
}

@keyframes particleBreathe {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 0.4; filter: blur(4px);}
  
}

/*----Else Core----*/

body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  background: transparent;
  padding: 2rem;
  font-family: monospace;
  text-align: left;
}

#last-breath {
  font-size: 1.2rem;
  margin: 2rem 0;
}

#journal {
  margin-top: 2rem;
  max-width: 90vw;
  font-size: 0.9rem;
  opacity: 0.7;
}

button {
  background: none;
  color: white;
  border: 1px solid white;
  padding: 0.5rem 1rem;
  cursor: pointer;
  margin-top: 1rem;
}

button:hover {
  background: white;
  color: black;
}
.breathe-glow {
  animation: fade-in-glow 5s ease-out;
  color: #e0e0ff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.glow-last {
  animation: glow-last 5s ease-out;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

@keyframes fade-in-glow {
  0% {
    opacity: 0;
    transform: scale(0.95);
    text-shadow: none;
  }
  50% {
    opacity: 1;
    transform: scale(1.02);
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.2);
  }
}

@keyframes glow-last {
  0% {
    opacity: 0.7;
    text-shadow: none;
  }
  50% {
    opacity: 1;
    text-shadow: 0 0 16px rgba(255, 255, 255, 0.5);
  }
  100% {
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.2);
  }
}
/*----core-mirror----*/
#core-mirror {
  background: black;
  color: white;
  font-family: monospace;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  flex-direction: column;
  overflow: auto;
}

#mirror-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  max-width: 700px;
  width: 100%;
}

#mirror-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.4); opacity: 1; }
}

#mirror-output {
  width: 100%;
  text-align: center;
}

details {
  margin-bottom: 1.5rem;
}

summary {
  cursor: pointer;
  font-weight: bold;
  color: #ccc;
}

details pre {
  background: #111;
  padding: 1rem;
  border: 1px solid #333;
  border-radius: 4px;
  overflow-x: auto;
  text-align: left;
  white-space: pre-wrap;
}
.dot-reactive {
  background: #ff4444 !important;
  box-shadow: 0 0 12px rgba(255, 80, 80, 0.5);
}
