:root {
  --primary-color: #6b73ff;
  --secondary-color: #9face6;
  --accent-color: #ffb4a2;
  --background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --text-light: #ffffff;
  --text-dark: #2c3e50;
  --circle-size: 200px;
  --breathing-duration: 4s;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--background);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  overflow: hidden;
}

.app-container {
  text-align: center;
  position: relative;
  width: 100%;
  max-width: 600px;
  padding: 2rem;
}
.app-header {
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeInDown 1s ease-out 0.5s forwards;
}

.brand-info {
  margin-bottom: 1.5rem;
}

.app-title {
  font-size: 3rem;
  font-weight: 300;
  margin-bottom: 0.5rem;
  letter-spacing: 2px;
}

.app-subtitle {
  font-size: 1.2rem;
  opacity: 0.8;
  font-weight: 300;
  margin-bottom: 0.5rem;
}

.project-subtitle {
  font-size: 0.9rem;
  opacity: 0.6;
  font-style: italic;
  font-weight: 300;
}

/* Contenedor del ejercicio de respiración */
.breathing-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 2rem 0;
}

/* Círculo principal de respiración */
.breathing-circle {
  width: var(--circle-size);
  height: var(--circle-size);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0.1) 70%,
    transparent 70%
  );
  border: 3px solid rgba(255, 255, 255, 0.4);
  position: relative;
  margin: 2rem 0;

  /* Animación de respiración continua */
  animation: breathe 8s ease-in-out infinite;

  /* Efectos visuales */
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.3),
    inset 0 0 30px rgba(255, 255, 255, 0.1);
}

/* Círculo interior para efecto de profundidad */
.breathing-circle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 70%
  );
  animation: breatheInner 8s ease-in-out infinite;
}

/* Ondas concéntricas de fondo */
.wave {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.1);
  animation: waveExpand 4s ease-out infinite;
}

.wave:nth-child(1) {
  width: 300px;
  height: 300px;
  animation-delay: 0s;
}

.wave:nth-child(2) {
  width: 400px;
  height: 400px;
  animation-delay: 1s;
}

.wave:nth-child(3) {
  width: 500px;
  height: 500px;
  animation-delay: 2s;
}

/* Texto de instrucciones */
.breathing-text {
  font-size: 1.5rem;
  font-weight: 300;
  margin-top: 2rem;
  opacity: 0.9;
  animation: breatheText 8s ease-in-out infinite;
}

.exercise-indicator {
  font-size: 1rem;
  opacity: 0.7;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* Controles */
.controls {
  margin-top: 3rem;
  opacity: 0;
  animation: fadeInUp 1s ease-out 1s forwards;
}

.btn {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: var(--text-light);
  padding: 1rem 2rem;
  margin: 0 1rem;
  border-radius: 50px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn:active {
  transform: translateY(0);
}

/* Footer del proyecto */
.project-footer {
  margin-top: 4rem;
  opacity: 0;
  animation: fadeInUp 1s ease-out 1.5s forwards;
  text-align: center;
}

.project-footer p {
  font-size: 0.9rem;
  opacity: 0.7;
  margin: 0.5rem 0;
}

/* Partículas flotantes de fondo */
.particle {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  pointer-events: none;
  animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) {
  width: 8px;
  height: 8px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.particle:nth-child(2) {
  width: 12px;
  height: 12px;
  top: 60%;
  right: 15%;
  animation-delay: 2s;
}

.particle:nth-child(3) {
  width: 6px;
  height: 6px;
  bottom: 30%;
  left: 20%;
  animation-delay: 4s;
}

a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

/* Animaciones - Respiración Básica */
@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
  }
  50% {
    transform: scale(1.3);
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.5);
  }
}

/* Respiración 4-7-8 */
@keyframes breathe478 {
  0% {
    transform: scale(1);
    box-shadow: 0 0 30px rgba(107, 115, 255, 0.3);
  }
  21% {
    /* 4s inhalar */
    transform: scale(1.4);
    box-shadow: 0 0 50px rgba(107, 115, 255, 0.6);
  }
  58% {
    /* 7s mantener */
    transform: scale(1.4);
    box-shadow: 0 0 60px rgba(159, 172, 230, 0.7);
  }
  100% {
    /* 8s exhalar */
    transform: scale(1);
    box-shadow: 0 0 30px rgba(255, 180, 162, 0.4);
  }
}

/* Box Breathing 4-4-4-4 */
@keyframes breatheBox {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(159, 172, 230, 0.3);
  }
  25% {
    /* inhalar */
    transform: scale(1.3) rotate(90deg);
    border-radius: 20%;
    box-shadow: 0 0 40px rgba(159, 172, 230, 0.5);
  }
  50% {
    /* mantener */
    transform: scale(1.3) rotate(180deg);
    border-radius: 10%;
    box-shadow: 0 0 50px rgba(107, 115, 255, 0.6);
  }
  75% {
    /* exhalar */
    transform: scale(1) rotate(270deg);
    border-radius: 20%;
    box-shadow: 0 0 40px rgba(255, 180, 162, 0.5);
  }
}

@keyframes breatheInner {
  0%,
  100% {
    opacity: 0.3;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1.2);
  }
}

@keyframes breatheText {
  0%,
  25% {
    opacity: 1;
  }
  25%,
  50% {
    opacity: 0.6;
  }
  50%,
  75% {
    opacity: 1;
  }
  75%,
  100% {
    opacity: 0.6;
  }
}

@keyframes waveExpand {
  0% {
    transform: scale(0.8);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.2;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.3;
  }
  33% {
    transform: translateY(-20px) rotate(120deg);
    opacity: 0.6;
  }
  66% {
    transform: translateY(10px) rotate(240deg);
    opacity: 0.4;
  }
}

/* Responsive */
@media (max-width: 768px) {
  :root {
    --circle-size: 150px;
  }

  .app-title {
    font-size: 2rem;
  }

  .breathing-text {
    font-size: 1.2rem;
  }

  .btn {
    padding: 0.8rem 1.5rem;
    margin: 0.5rem;
  }

  .wave:nth-child(1) {
    width: 200px;
    height: 200px;
  }
  .wave:nth-child(2) {
    width: 280px;
    height: 280px;
  }
  .wave:nth-child(3) {
    width: 360px;
    height: 360px;
  }
}

/* Accesibilidad: Respeta la preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  .breathing-circle,
  .breathing-circle::before,
  .wave,
  .particle {
    animation: none;
  }

  .breathing-text {
    opacity: 1;
    animation: none;
  }
}
