.breathing-exercise {
  max-width: 520px;
  margin: 1rem auto;
  text-align: center;
  padding: 1rem;
  background: #f8fafc;
  border-radius: var(--radius-card);
  box-shadow: 0 8px 24px rgba(20, 33, 61, 0.08);
  border: 1px solid var(--glass-border);
}

.breathing-container {
  position: relative;
  width: 190px;
  height: 190px;
  margin: 1.25rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.breathing-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.15rem;
  font-weight: 750;
  box-shadow: 0 16px 35px rgba(15, 118, 110, 0.22);
  transition: transform 0.5s ease-in-out;
  position: relative;
  overflow: hidden;
}

.breathing-circle::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.22);
  animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.45; }
  50% { transform: scale(1.04); opacity: 0.75; }
  100% { transform: scale(1); opacity: 0.45; }
}

.breathing-text {
  font-size: 1.45rem;
  margin: 1rem 0;
  min-height: 3rem;
  color: white;
  position: relative;
  z-index: 1;
}

.breathing-instruction {
  font-size: 0.98rem;
  color: var(--text-muted);
  margin: 0.75rem 0;
  min-height: 2rem;
}

.breathing-progress {
  width: 100%;
  height: 8px;
  background: #dce7e4;
  border-radius: 999px;
  margin: 1rem 0;
  overflow: hidden;
}

.breathing-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.1s linear;
}

.breathing-timer {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-bright);
  margin: 0.75rem 0;
  font-variant-numeric: tabular-nums;
}

.breathing-controls {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.breathing-btn {
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-btn);
  font-weight: 750;
  cursor: pointer;
  transition: transform var(--anim-fast), background var(--anim-fast);
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.breathing-btn-primary {
  background: var(--secondary);
  color: white;
}

.breathing-btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
}

.breathing-btn-secondary {
  background: white;
  color: var(--text-main);
}

.breathing-btn-secondary:hover {
  background: #eef4f3;
}

@keyframes breatheIn {
  0% { transform: scale(0.9); opacity: 0.9; }
  100% { transform: scale(1.08); opacity: 1; }
}

@keyframes breatheOut {
  0% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.9; }
}

@keyframes holdAnimation {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025); }
}

.breathing-in .breathing-circle {
  animation: breatheIn 4s ease-in-out forwards;
}

.breathing-out .breathing-circle {
  animation: breatheOut 4s ease-in-out forwards;
}

.holding .breathing-circle {
  animation: holdAnimation 2s ease-in-out infinite;
}

.breathing-stats {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--glass-border);
  display: none;
}

.breathing-stats.show {
  display: block;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
  font-size: 0.95rem;
}

.stat-label {
  color: var(--text-muted);
}

.stat-value {
  font-weight: 750;
  color: var(--text-bright);
}

@media (max-width: 600px) {
  .breathing-container {
    width: 165px;
    height: 165px;
  }

  .breathing-timer {
    font-size: 1.7rem;
  }
}

.breathing-exercise {
  background:
    linear-gradient(135deg, rgba(255, 43, 214, 0.16), rgba(0, 229, 255, 0.1), rgba(216, 255, 0, 0.12)),
    rgba(17, 2, 30, 0.92);
  border: 2px solid rgba(216, 255, 0, 0.42);
  color: var(--text-main);
}

.breathing-circle {
  background: conic-gradient(from 90deg, var(--primary), var(--secondary), var(--accent), #7c3aed, var(--primary));
  box-shadow: 0 0 28px var(--secondary-glow), 0 0 40px var(--accent-glow);
}

.breathing-instruction,
.stat-label {
  color: var(--text-muted);
}

.breathing-timer,
.stat-value {
  color: var(--text-bright);
}

.breathing-btn {
  border: 2px solid rgba(216, 255, 0, 0.42);
  background: linear-gradient(135deg, rgba(216, 255, 0, 0.16), rgba(255, 43, 214, 0.18));
  color: var(--text-bright);
}

.breathing-btn-primary {
  background: linear-gradient(135deg, var(--accent), #7c3aed, var(--secondary));
}
