/* ============================================================
   RESPIRAÇÃO GUIADA — ULTRA PREMIUM
   Portal Respire Sem Crise
   ============================================================ */

.breathing-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, #0B1115 0%, #000000 100%);
  z-index: 50;
}

.breathing-header {
  position: absolute;
  top: 40px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 60;
  color: var(--color-white);
  padding: 0 20px;
}

.breathing-header .section-title {
  font-size: 2rem;
  margin-bottom: 8px;
  text-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.breathing-header .section-subtitle {
  color: rgba(255,255,255,0.7);
}

/* Fundo Radial Orgânico (Brilho que respira junto) */
.breathing-container::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 100vw;
  height: 100vw;
  max-width: 800px;
  max-height: 800px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, rgba(0, 0, 0, 0) 60%);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  transition: transform 4s cubic-bezier(0.4, 0, 0.2, 1), background 3s ease;
}

.breathing-circle-wrapper {
  position: relative;
  width: 250px;
  height: 250px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ----------------------------------------------------------
   O Orbe Principal (Glassmorphism Orgânico)
   ---------------------------------------------------------- */
.breathing-circle {
  position: relative;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow: 
    inset 0 0 40px rgba(16, 185, 129, 0.2),
    0 0 50px rgba(16, 185, 129, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: 
    transform 4s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 4s cubic-bezier(0.4, 0, 0.2, 1),
    background 4s ease,
    border-color 4s ease;
}

/* Reflexo de luz sutil no topo do orbe */
.breathing-circle::after {
  content: '';
  position: absolute;
  top: 10%;
  left: 20%;
  width: 60%;
  height: 30%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  transform: rotate(-15deg);
  pointer-events: none;
  opacity: 0.6;
  transition: opacity 4s ease;
}

/* Tipografia Interna */
.breathing-instruction {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 4px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  transition: opacity 0.5s ease;
}

.breathing-timer {
  font-family: 'Inter', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: #34D399;
  text-shadow: 0 0 15px rgba(52, 211, 153, 0.5);
}

/* ----------------------------------------------------------
   Anéis Pulsantes (Ripples)
   ---------------------------------------------------------- */
.breathing-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 2px solid rgba(52, 211, 153, 0.5);
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 0 20px rgba(52, 211, 153, 0.3);
}

/* ----------------------------------------------------------
   Fases da Respiração
   ---------------------------------------------------------- */

/* INHALE (Inspirar) -> Expande, brilha azul/verde */
.breathing-circle.inhale {
  transform: scale(1.6);
  background: rgba(14, 165, 233, 0.15); 
  border-color: rgba(14, 165, 233, 0.6);
  box-shadow: 
    inset 0 0 40px rgba(14, 165, 233, 0.3),
    0 0 80px rgba(14, 165, 233, 0.4);
}

.breathing-circle.inhale::after { opacity: 0.9; }
.breathing-circle.inhale .breathing-instruction { color: #E0F2FE; }
.breathing-circle.inhale .breathing-timer { color: #7DD3FC; text-shadow: 0 0 15px rgba(14, 165, 233, 0.8); }

/* Ondas na inspiração */
.breathing-circle.inhale ~ .ripple-1 { animation: rippleAnim 4s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.breathing-circle.inhale ~ .ripple-2 { animation: rippleAnim 4s cubic-bezier(0.4, 0, 0.2, 1) 1s forwards; }
.breathing-circle.inhale ~ .ripple-3 { animation: rippleAnim 4s cubic-bezier(0.4, 0, 0.2, 1) 2s forwards; }

/* HOLD (Segurar) -> Mantém expandido, brilha dourado suave */
.breathing-circle.hold {
  transform: scale(1.6);
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 
    inset 0 0 40px rgba(245, 158, 11, 0.3),
    0 0 80px rgba(245, 158, 11, 0.4);
}
.breathing-circle.hold .breathing-instruction { color: #FEF3C7; }
.breathing-circle.hold .breathing-timer { color: #FCD34D; text-shadow: 0 0 15px rgba(245, 158, 11, 0.8); }

/* EXHALE (Expirar) -> Contrai, volta ao estado original mas com tom verde alívio */
.breathing-circle.exhale {
  transform: scale(1);
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 
    inset 0 0 40px rgba(16, 185, 129, 0.2),
    0 0 60px rgba(16, 185, 129, 0.3);
}
.breathing-circle.exhale .breathing-instruction { color: #D1FAE5; }
.breathing-circle.exhale .breathing-timer { color: #34D399; text-shadow: 0 0 15px rgba(16, 185, 129, 0.5); }

/* Fade out for ripples when exhaling */
.breathing-circle.exhale ~ .breathing-ripple {
  animation: rippleFadeOut 6s ease-out forwards;
}

/* ----------------------------------------------------------
   Keyframes
   ---------------------------------------------------------- */
@keyframes rippleAnim {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0; border-color: rgba(14, 165, 233, 0.6); }
  20% { opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(2.2); opacity: 0; border-width: 2px; }
}

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

/* ----------------------------------------------------------
   Controls & Stats
   ---------------------------------------------------------- */
.breathing-controls {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.breathing-duration-selector {
  display: flex;
  background: var(--color-bg-dark);
  border-radius: var(--radius-full);
  padding: 4px;
  margin-bottom: 24px;
}

.breathing-cycle-btn {
  flex: 1;
  padding: 10px 0;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
}

.breathing-cycle-btn.active {
  background: var(--color-white);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.breathing-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.breathing-stats strong {
  font-size: 1.2rem;
  color: var(--color-primary);
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  background: var(--color-primary-light);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
}
