/**
 * Breathing Exercise Styles
 * Styles für atem-uebung.html und en_breathing-exercise.html
 */

/* ========================================
   LAYOUT & BASE
   ======================================== */

body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--breath-bg, #2D3E50);
}

/* Hero Section - Vollbild */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--breath-bg-dark, #243342) 0%, var(--breath-bg, #2D3E50) 50%, var(--breath-bg-light, #3A4D62) 100%);
}

/* Animierter Hintergrund - dezenter */
.animated-bg {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 80%, rgba(90, 138, 138, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(169, 132, 103, 0.1) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 50%, rgba(90, 138, 138, 0.15) 0%, transparent 60%);
  animation: bgPulse 15s ease-in-out infinite;
  pointer-events: none;
}

@keyframes bgPulse {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

/* ========================================
   BACK LINK
   ======================================== */

.back-link {
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  z-index: 100;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.back-link:hover {
  color: white;
  background: rgba(255, 255, 255, 0.2);
}

.back-link svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* ========================================
   PARTICLES - dezenter für Breathing Exercise
   ======================================== */

.particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: float 20s infinite ease-in-out;
}

.particle.bright {
  width: 4px;
  height: 4px;
  background: rgba(221, 184, 146, 0.4);
  box-shadow: 0 0 8px rgba(221, 184, 146, 0.3);
}

.particle.extra-bright {
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.3), 0 0 20px rgba(221, 184, 146, 0.2);
}

.particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; animation-duration: 25s; }
.particle:nth-child(2) { left: 20%; top: 80%; animation-delay: -2s; animation-duration: 20s; }
.particle:nth-child(3) { left: 30%; top: 40%; animation-delay: -4s; animation-duration: 22s; }
.particle:nth-child(4) { left: 40%; top: 60%; animation-delay: -6s; animation-duration: 18s; }
.particle:nth-child(5) { left: 50%; top: 30%; animation-delay: -8s; animation-duration: 24s; }
.particle:nth-child(6) { left: 60%; top: 70%; animation-delay: -10s; animation-duration: 21s; }
.particle:nth-child(7) { left: 70%; top: 50%; animation-delay: -12s; animation-duration: 19s; }
.particle:nth-child(8) { left: 80%; top: 25%; animation-delay: -14s; animation-duration: 23s; }
.particle:nth-child(9) { left: 85%; top: 85%; animation-delay: -16s; animation-duration: 26s; }
.particle:nth-child(10) { left: 15%; top: 55%; animation-delay: -18s; animation-duration: 17s; }
.particle:nth-child(11) { left: 25%; top: 15%; animation-delay: -1s; animation-duration: 28s; }
.particle:nth-child(12) { left: 45%; top: 90%; animation-delay: -3s; animation-duration: 20s; }
.particle:nth-child(13) { left: 55%; top: 10%; animation-delay: -5s; animation-duration: 22s; }
.particle:nth-child(14) { left: 75%; top: 65%; animation-delay: -7s; animation-duration: 19s; }
.particle:nth-child(15) { left: 90%; top: 45%; animation-delay: -9s; animation-duration: 24s; }

@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); opacity: 0.5; }
  25% { transform: translateY(-30px) translateX(15px); opacity: 0.8; }
  50% { transform: translateY(-15px) translateX(-10px); opacity: 0.6; }
  75% { transform: translateY(-45px) translateX(5px); opacity: 0.9; }
}

/* Zusätzliche Partikel-Positionen (21-30) */
.particle:nth-child(16) { left: 5%; top: 35%; animation-delay: -11s; animation-duration: 21s; }
.particle:nth-child(17) { left: 35%; top: 75%; animation-delay: -13s; animation-duration: 23s; }
.particle:nth-child(18) { left: 65%; top: 15%; animation-delay: -15s; animation-duration: 20s; }
.particle:nth-child(19) { left: 95%; top: 55%; animation-delay: -17s; animation-duration: 22s; }
.particle:nth-child(20) { left: 50%; top: 50%; animation-delay: -19s; animation-duration: 25s; }
.particle:nth-child(21) { left: 12%; top: 68%; animation-delay: -2.5s; animation-duration: 19s; }
.particle:nth-child(22) { left: 38%; top: 22%; animation-delay: -4.5s; animation-duration: 21s; }
.particle:nth-child(23) { left: 62%; top: 88%; animation-delay: -6.5s; animation-duration: 24s; }
.particle:nth-child(24) { left: 88%; top: 38%; animation-delay: -8.5s; animation-duration: 20s; }
.particle:nth-child(25) { left: 22%; top: 42%; animation-delay: -10.5s; animation-duration: 22s; }
.particle:nth-child(26) { left: 48%; top: 72%; animation-delay: -12.5s; animation-duration: 18s; }
.particle:nth-child(27) { left: 72%; top: 32%; animation-delay: -14.5s; animation-duration: 26s; }
.particle:nth-child(28) { left: 8%; top: 92%; animation-delay: -16.5s; animation-duration: 23s; }
.particle:nth-child(29) { left: 82%; top: 78%; animation-delay: -18.5s; animation-duration: 21s; }
.particle:nth-child(30) { left: 42%; top: 8%; animation-delay: -20s; animation-duration: 19s; }

/* Partikel während Countdown verstärken - genauso sichtbar wie bei der Übung */
.particles.countdown-active {
  z-index: 999;
}

.particles.countdown-active .particle {
  opacity: 0.7 !important;
  background: rgba(255, 255, 255, 0.6) !important;
}

.particles.countdown-active .particle.bright {
  opacity: 0.85 !important;
  width: 6px !important;
  height: 6px !important;
  background: rgba(221, 184, 146, 0.8) !important;
  box-shadow: 0 0 15px rgba(221, 184, 146, 0.6) !important;
}

.particles.countdown-active .particle.extra-bright {
  opacity: 1 !important;
  width: 10px !important;
  height: 10px !important;
  background: rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.7), 0 0 40px rgba(221, 184, 146, 0.6) !important;
}

/* ========================================
   BREATHING ORB (Kreis für Atemübungen)
   Design identisch zum alten atem-uebung
   ======================================== */

.breathing-orb {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(180px, 30vmin, 350px);
  height: clamp(180px, 30vmin, 350px);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(221, 184, 146, 0.6) 0%,
    rgba(169, 132, 103, 0.3) 40%,
    rgba(22, 78, 99, 0.1) 70%,
    transparent 100%
  );
  box-shadow: 
    0 0 60px rgba(221, 184, 146, 0.3),
    0 0 120px rgba(169, 132, 103, 0.2),
    inset 0 0 60px rgba(255, 255, 255, 0.1);
  z-index: 5;
  opacity: 0.6;
  pointer-events: none !important;
  transition: top 0.5s ease;
}

.breathing-orb-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(90px, 15vmin, 175px);
  height: clamp(90px, 15vmin, 175px);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(221, 184, 146, 0.6) 50%,
    transparent 100%
  );
}

/* Standard Atem-Animation (Idle) */
.breathing-orb.breathing-idle {
  animation: breatheOrbIdle 6s ease-in-out infinite;
}

@keyframes breatheOrbIdle {
  0%, 100% { 
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
    box-shadow: 
      0 0 60px rgba(221, 184, 146, 0.3),
      0 0 120px rgba(169, 132, 103, 0.2),
      inset 0 0 60px rgba(255, 255, 255, 0.1);
  }
  50% { 
    transform: translate(-50%, -50%) scale(1.15);
    opacity: 0.9;
    box-shadow: 
      0 0 80px rgba(221, 184, 146, 0.5),
      0 0 160px rgba(169, 132, 103, 0.3),
      inset 0 0 80px rgba(255, 255, 255, 0.2);
  }
}

/* Breath Mode Active - Orb nach oben verschieben für Platz */
.breath-mode-active .breathing-orb {
  top: clamp(38%, 42vh, 48%);
  z-index: 15;
}

/* Box Breathing - Orb ausblenden, Box anzeigen */
.breath-mode-box .breathing-orb {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none;
}

/* Orb während Countdown ausblenden */
.breathing-orb.hidden,
.breathing-orb.hidden .breathing-orb-inner {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translate(-50%, -50%) scale(0) !important;
}

/* Box Orb verstecken */
.box-orb.hidden {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* ========================================
   BOX ORB (Quadrat für Box Breathing)
   ======================================== */

.box-orb {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  z-index: 15;
  opacity: 0;
  visibility: visible;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.box-orb.active {
  opacity: 1;
  display: block;
  visibility: visible;
}

/* Äußerer pulsierender Glow-Container */
.box-orb::before {
  content: '';
  position: absolute;
  top: -30px;
  left: -30px;
  right: -30px;
  bottom: -30px;
  border-radius: 20px;
  background: radial-gradient(
    ellipse at center,
    rgba(221, 184, 146, 0.15) 0%,
    rgba(169, 132, 103, 0.08) 40%,
    rgba(22, 78, 99, 0.05) 70%,
    transparent 100%
  );
  filter: blur(20px);
  z-index: -1;
}

/* Innerer Glow direkt um das Quadrat */
.box-orb::after {
  content: '';
  position: absolute;
  top: -15px;
  left: -15px;
  right: -15px;
  bottom: -15px;
  border-radius: 12px;
  border: 1px solid rgba(221, 184, 146, 0.1);
  box-shadow: 
    inset 0 0 30px rgba(221, 184, 146, 0.1),
    0 0 40px rgba(221, 184, 146, 0.15),
    0 0 80px rgba(169, 132, 103, 0.1);
  z-index: -1;
}

/* Pulsierender Glow-Effekt im Atem-Takt */
.guided-breathe-box::before {
  animation: boxGlowOuter 16s ease-in-out infinite;
}

.guided-breathe-box::after {
  animation: boxGlowInner 16s ease-in-out infinite;
}

@keyframes boxGlowOuter {
  /* Einatmen: Glow wächst */
  0% {
    opacity: 0.4;
    transform: scale(0.95);
    filter: blur(20px);
  }
  25% {
    opacity: 1;
    transform: scale(1.1);
    filter: blur(25px);
  }
  /* Halten 1: Glow bleibt groß */
  50% {
    opacity: 0.9;
    transform: scale(1.08);
    filter: blur(22px);
  }
  /* Ausatmen: Glow schrumpft */
  75% {
    opacity: 0.5;
    transform: scale(0.98);
    filter: blur(18px);
  }
  /* Halten 2: Glow bleibt klein */
  100% {
    opacity: 0.4;
    transform: scale(0.95);
    filter: blur(20px);
  }
}

@keyframes boxGlowInner {
  0% {
    opacity: 0.5;
    box-shadow: 
      inset 0 0 20px rgba(221, 184, 146, 0.05),
      0 0 30px rgba(221, 184, 146, 0.1),
      0 0 60px rgba(169, 132, 103, 0.05);
  }
  25% {
    opacity: 1;
    box-shadow: 
      inset 0 0 50px rgba(221, 184, 146, 0.2),
      0 0 60px rgba(221, 184, 146, 0.3),
      0 0 120px rgba(169, 132, 103, 0.2);
  }
  50% {
    opacity: 0.9;
    box-shadow: 
      inset 0 0 45px rgba(221, 184, 146, 0.15),
      0 0 55px rgba(221, 184, 146, 0.25),
      0 0 100px rgba(169, 132, 103, 0.15);
  }
  75% {
    opacity: 0.6;
    box-shadow: 
      inset 0 0 25px rgba(221, 184, 146, 0.08),
      0 0 35px rgba(221, 184, 146, 0.12),
      0 0 70px rgba(169, 132, 103, 0.08);
  }
  100% {
    opacity: 0.5;
    box-shadow: 
      inset 0 0 20px rgba(221, 184, 146, 0.05),
      0 0 30px rgba(221, 184, 146, 0.1),
      0 0 60px rgba(169, 132, 103, 0.05);
  }
}

/* Quadrat-Linien - Basis (subtil, statisch) */
.box-side {
  position: absolute;
  background: rgba(221, 184, 146, 0.15);
  border-radius: 2px;
}

/* Horizontale Seiten (oben und unten) */
.box-side-top, .box-side-bottom {
  height: 4px;
  width: 100%;
  left: 0;
}

.box-side-top { top: 0; }
.box-side-bottom { bottom: 0; }

/* Vertikale Seiten (links und rechts) */
.box-side-left, .box-side-right {
  width: 4px;
  height: 100%;
}

.box-side-left { left: 0; top: 0; }
.box-side-right { right: 0; top: 0; }

/* Aktive Linien - werden vom Lichtpunkt gezeichnet */
/* Die Linien werden relativ zum .box-side Element positioniert */
/* TOP: horizontal, height=4px, width animiert 0→200px */
/* RIGHT: vertikal, width=4px, height animiert 0→200px */
/* BOTTOM: horizontal, height=4px, width animiert 0→200px */
/* LEFT: vertikal, width=4px, height animiert 0→200px */

.guided-breathe-box .box-side-top::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: 0;
  background: linear-gradient(90deg, rgba(221, 184, 146, 1), rgba(255, 255, 255, 0.9));
  box-shadow: 0 0 15px rgba(221, 184, 146, 0.8), 0 0 30px rgba(221, 184, 146, 0.5);
  border-radius: 2px;
  animation: drawTop 16s linear infinite;
  animation-play-state: inherit;
}

.guided-breathe-box .box-side-right::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: linear-gradient(180deg, rgba(221, 184, 146, 1), rgba(255, 255, 255, 0.9));
  box-shadow: 0 0 15px rgba(221, 184, 146, 0.8), 0 0 30px rgba(221, 184, 146, 0.5);
  border-radius: 2px;
  animation: drawRight 16s linear infinite;
  animation-play-state: inherit;
}

.guided-breathe-box .box-side-bottom::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  height: 4px;
  width: 0;
  background: linear-gradient(270deg, rgba(221, 184, 146, 1), rgba(255, 255, 255, 0.9));
  box-shadow: 0 0 15px rgba(221, 184, 146, 0.8), 0 0 30px rgba(221, 184, 146, 0.5);
  border-radius: 2px;
  animation: drawBottom 16s linear infinite;
  animation-play-state: inherit;
}

.guided-breathe-box .box-side-left::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: linear-gradient(0deg, rgba(221, 184, 146, 1), rgba(255, 255, 255, 0.9));
  box-shadow: 0 0 15px rgba(221, 184, 146, 0.8), 0 0 30px rgba(221, 184, 146, 0.5);
  border-radius: 2px;
  animation: drawLeft 16s linear infinite;
  animation-play-state: inherit;
}

/* Animationen für das Zeichnen der Linien */
/* 
   Timeline (16s = 4 Phasen à 4s = 0-25-50-75-100%):
   0-25%: Einatmen - TOP wird gezeichnet
   25-50%: Halten 1 - RIGHT wird gezeichnet
   50-75%: Ausatmen - BOTTOM wird gezeichnet
   75-100%: Halten 2 - LEFT wird gezeichnet
   
   Jede Linie bleibt 2 Phasen sichtbar, dann blendet sie im nächsten Zyklus sanft aus.
   
   Erstes Durchlauf: .first-cycle Klasse versteckt Bottom/Left am Anfang
   Folgezyklen: Bottom/Left blenden sanft aus (0-12.5% bzw. 0-25%)
*/

/* Erster Zyklus: Bottom und Left sind am Anfang versteckt */
.guided-breathe-box.first-cycle .box-side-bottom::after,
.guided-breathe-box.first-cycle .box-side-left::after {
  animation-name: drawBottomFirst, drawLeftFirst;
}

.guided-breathe-box.first-cycle .box-side-bottom::after {
  animation-name: drawBottomFirst;
}

.guided-breathe-box.first-cycle .box-side-left::after {
  animation-name: drawLeftFirst;
}

@keyframes drawTop {
  0% { width: 0; opacity: 0; }
  0.1% { width: 0; opacity: 1; }
  25% { width: 100%; opacity: 1; }
  50% { width: 100%; opacity: 1; }
  62.5% { width: 100%; opacity: 0; }
  100% { width: 100%; opacity: 0; }
}

@keyframes drawRight {
  0% { height: 0; opacity: 0; }
  25% { height: 0; opacity: 1; }
  50% { height: 100%; opacity: 1; }
  75% { height: 100%; opacity: 1; }
  87.5% { height: 100%; opacity: 0; }
  100% { height: 100%; opacity: 0; }
}

/* Bottom: Normal (mit Ausblenden vom vorherigen Zyklus) */
@keyframes drawBottom {
  /* 0-12.5%: Sanftes Ausblenden vom vorherigen Zyklus */
  0% { width: 100%; opacity: 1; }
  12.5% { width: 100%; opacity: 0; }
  /* Unsichtbar bis 50% */
  49.9% { width: 0; opacity: 0; }
  50% { width: 0; opacity: 1; }
  /* 50-75%: Wird gezeichnet */
  75% { width: 100%; opacity: 1; }
  /* Bleibt bis Ende sichtbar */
  100% { width: 100%; opacity: 1; }
}

/* Bottom: Erster Zyklus (startet unsichtbar) */
@keyframes drawBottomFirst {
  0% { width: 0; opacity: 0; }
  50% { width: 0; opacity: 1; }
  75% { width: 100%; opacity: 1; }
  100% { width: 100%; opacity: 1; }
}

/* Left: Normal (mit Ausblenden vom vorherigen Zyklus) */
@keyframes drawLeft {
  /* 0-25%: Bleibt voll, dann sanftes Ausblenden */
  0% { height: 100%; opacity: 1; }
  12.5% { height: 100%; opacity: 1; }
  25% { height: 100%; opacity: 0; }
  /* Unsichtbar bis 75% */
  74.9% { height: 0; opacity: 0; }
  75% { height: 0; opacity: 1; }
  /* 75-100%: Wird gezeichnet */
  100% { height: 100%; opacity: 1; }
}

/* Left: Erster Zyklus (startet unsichtbar) */
@keyframes drawLeftFirst {
  0% { height: 0; opacity: 0; }
  75% { height: 0; opacity: 1; }
  100% { height: 100%; opacity: 1; }
}

/* Leuchtender Punkt - NICHT pulsierend */
.box-light {
  position: absolute;
  width: 20px;
  height: 20px;
  background: radial-gradient(
    circle, 
    rgba(255, 255, 255, 1) 0%, 
    rgba(255, 255, 255, 0.9) 30%,
    rgba(221, 184, 146, 0.8) 50%, 
    rgba(221, 184, 146, 0.3) 70%,
    transparent 100%
  );
  border-radius: 50%;
  box-shadow: 
    0 0 10px rgba(255, 255, 255, 1),
    0 0 20px rgba(255, 255, 255, 0.8),
    0 0 35px rgba(221, 184, 146, 0.9),
    0 0 50px rgba(221, 184, 146, 0.5);
  top: -8px;
  left: -8px;
  z-index: 10;
}

/* Lichtpunkt bewegt sich - OHNE Pulsieren */
.guided-breathe-box .box-light { 
  animation: boxLight 16s linear infinite;
}

/* Box Breathing Animation (4-4-4-4 = 16s total):
   Der Lichtpunkt bewegt sich im Uhrzeigersinn:
   - 0-25%: Einatmen - oben von links nach rechts
   - 25-50%: Halten - rechts von oben nach unten
   - 50-75%: Ausatmen - unten von rechts nach links
   - 75-100%: Halten - links von unten nach oben
*/

@keyframes boxLight {
  /* Start: oben links */
  0% { 
    top: -8px; 
    left: -8px; 
  }
  /* Einatmen fertig: oben rechts */
  25% { 
    top: -8px; 
    left: calc(100% - 12px); 
  }
  /* Halten 1 fertig: unten rechts */
  50% { 
    top: calc(100% - 12px); 
    left: calc(100% - 12px); 
  }
  /* Ausatmen fertig: unten links */
  75% { 
    top: calc(100% - 12px); 
    left: -8px; 
  }
  /* Halten 2 fertig: zurück oben links */
  100% { 
    top: -8px; 
    left: -8px; 
  }
}

/* ========================================
   INTRO CONTENT & EXERCISE NAVIGATION
   ======================================== */

.intro-content {
  position: relative;
  z-index: 10;
  text-align: center;
  width: 100%;
  max-width: 900px;
  padding: 2rem;
  transition: opacity 0.5s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
}

.exercise-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  width: 100%;
  position: relative;
}

.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 20;
}

.nav-arrow#navPrev {
  left: 0;
}

.nav-arrow#navNext {
  right: 0;
}

.nav-arrow:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.nav-arrow.hidden {
  opacity: 0;
  pointer-events: none;
}

.nav-arrow svg {
  width: 24px;
  height: 24px;
}

.exercise-content {
  position: relative;
  min-height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 700px;
}

.exercise-slide {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  width: 100%;
  text-align: center;
  padding: 0 1rem;
}

.exercise-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.exercise-slide h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: white;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.exercise-slide p {
  color: rgba(255, 255, 255, 0.85);
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  line-height: 1.8;
  margin-bottom: 0.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.exercise-slide p strong {
  color: var(--secondary-light);
}

/* Start Button */
.start-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2.5rem;
  padding: 1.25rem 3rem;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(169, 132, 103, 0.4);
}

.start-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(169, 132, 103, 0.5);
}

.start-btn span:first-child {
  font-size: 1.25rem;
}

/* ========================================
   COUNTDOWN OVERLAY
   ======================================== */

.countdown-overlay {
  position: fixed;
  inset: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.countdown-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.countdown-number {
  font-family: "Playfair Display", serif;
  font-size: 8rem;
  font-weight: 700;
  color: var(--secondary-light);
  text-shadow: 0 0 60px rgba(221, 184, 146, 0.6), 0 0 100px rgba(169, 132, 103, 0.4);
}

@keyframes countdownPulse {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* ========================================
   BREATH MODE UI
   ======================================== */

.breath-title {
  position: fixed;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Playfair Display", serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: white;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 100;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.breath-title.active {
  opacity: 1;
}

.stopwatch {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 100;
  background: rgba(45, 62, 80, 0.6);
  backdrop-filter: blur(10px);
  padding: 0.75rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stopwatch.active {
  opacity: 1;
}

.stopwatch-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Exercise Control Buttons */
.exercise-controls {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.control-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.control-btn:active {
  transform: scale(0.95);
}

.control-btn svg {
  width: 18px;
  height: 18px;
}

.control-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.control-btn:disabled:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: none;
}

.breath-mode-container {
  position: fixed;
  bottom: clamp(2rem, 8vh, 5rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  z-index: 100;
}

.breath-guide {
  font-family: "Playfair Display", serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: white;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.5s ease;
  text-align: center;
  pointer-events: none;
}

.breath-guide.active {
  opacity: 1;
}

.breath-guide span {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  color: var(--white);
}

.breath-counter {
  font-family: "Playfair Display", serif;
  font-size: clamp(3rem, 8vw, 4rem);
  font-weight: 600;
  color: var(--secondary-light);
  line-height: 1;
  margin-top: 0.5rem;
}

.breath-mode-btn {
  display: none;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.75rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  color: white;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.breath-mode-btn.active {
  display: inline-flex;
}

.breath-mode-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
  .box-orb {
    width: clamp(120px, 25vmin, 150px);
    height: clamp(120px, 25vmin, 150px);
  }
  
  .intro-content {
    padding: 1.5rem;
  }
  
  .exercise-nav {
    gap: 0.75rem;
  }
  
  .nav-arrow {
    width: 44px;
    height: 44px;
  }
  
  .nav-arrow svg {
    width: 20px;
    height: 20px;
  }
  
  .exercise-content {
    min-height: 400px;
    max-width: 100%;
  }
  
  .exercise-slide {
    padding: 0 0.5rem;
  }
  
  .exercise-slide h1 {
    font-size: 1.75rem;
  }
  
  .exercise-slide p {
    font-size: 0.9rem;
  }
  
  .start-btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    margin-top: 2rem;
  }
  
  .countdown-number {
    font-size: 5rem;
  }
  
  .back-link {
    top: 1rem;
    left: 1rem;
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}

@media (max-width: 480px) {
  .intro-content {
    padding: 1rem;
  }
  
  .exercise-slide h1 {
    font-size: 1.5rem;
  }
  
  .exercise-slide p {
    font-size: 0.85rem;
    line-height: 1.6;
  }
  
  .start-btn {
    padding: 0.875rem 1.75rem;
    font-size: 0.95rem;
  }
}

/* ========================================
   MOBILE SCROLL FIX - Intro-Seite scrollbar
   ======================================== */

@media (max-width: 768px) {
  /* Ermögliche Scrollen auf Mobilgeräten für die Intro-Ansicht */
  body.intro-view {
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }
  
  body.intro-view .hero {
    min-height: auto;
    height: auto;
    overflow: visible;
    padding-bottom: env(safe-area-inset-bottom, 2rem);
  }
  
  body.intro-view .intro-content {
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    padding-top: 4rem;
    padding-bottom: 3rem;
  }
  
  /* Im Breathing-Modus wieder fixiert */
  body.breath-mode {
    overflow: hidden !important;
  }
  
  body.breath-mode .hero {
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
  }
  
  /* ========================================
     BREATH MODE - Mobile Anpassungen
     ======================================== */
  
  /* Titel kleiner und höher */
  .breath-title {
    top: 1rem;
    font-size: 1.25rem;
    max-width: 55%;
    text-align: center;
  }
  
  /* Stopwatch kompakter */
  .stopwatch {
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.5rem 0.75rem;
    font-size: 1.1rem;
    border-radius: 0.75rem;
  }
  
  .stopwatch-label {
    font-size: 0.6rem;
  }
  
  .exercise-controls {
    gap: 0.35rem;
    margin-top: 0.35rem;
  }
  
  .control-btn {
    width: 28px;
    height: 28px;
  }
  
  .control-btn svg {
    width: 14px;
    height: 14px;
  }
  
  /* Breathing Orb kleiner auf Mobile */
  .breathing-orb {
    width: clamp(140px, 35vmin, 200px);
    height: clamp(140px, 35vmin, 200px);
  }
  
  .breathing-orb-inner {
    width: clamp(70px, 17vmin, 100px);
    height: clamp(70px, 17vmin, 100px);
  }
  
  /* Orb weiter nach oben im Breath-Mode */
  .breath-mode-active .breathing-orb {
    top: clamp(28%, 30vh, 38%);
  }
  
  /* Breath Guide kompakter */
  .breath-mode-container {
    bottom: clamp(1.5rem, 6vh, 3rem);
    padding-bottom: env(safe-area-inset-bottom, 0.5rem);
    gap: 0.5rem;
  }
  
  .breath-guide span {
    font-size: 1.25rem;
  }
  
  .breath-counter {
    font-size: 2.25rem;
    margin-top: 0.25rem;
  }
  
  .breath-mode-btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.85rem;
    gap: 0.5rem;
  }
  
  /* Box Orb kleiner */
  .box-orb {
    width: clamp(100px, 22vmin, 130px);
    height: clamp(100px, 22vmin, 130px);
  }
  
  .breath-mode-box .box-orb {
    top: clamp(28%, 30vh, 38%);
  }
}

/* Noch kleinere Bildschirme (iPhone SE, etc.) */
@media (max-width: 380px) {
  .breath-title {
    font-size: 1.1rem;
    top: 0.75rem;
  }
  
  .stopwatch {
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.4rem 0.6rem;
    font-size: 1rem;
  }
  
  .breathing-orb {
    width: clamp(120px, 32vmin, 160px);
    height: clamp(120px, 32vmin, 160px);
  }
  
  .breathing-orb-inner {
    width: clamp(60px, 16vmin, 80px);
    height: clamp(60px, 16vmin, 80px);
  }
  
  .breath-guide span {
    font-size: 1.1rem;
  }
  
  .breath-counter {
    font-size: 2rem;
  }
  
  .breath-mode-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
  
  .box-orb {
    width: clamp(90px, 20vmin, 110px);
    height: clamp(90px, 20vmin, 110px);
  }
}
