@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
:root {
    --bg:        #060b0f;
    --bg-2:      #0a1116;
    --green-1:   #34d399;
    --green-2:   #2dd4bf;
    --purple-1:  #a78bfa;
    --purple-2:  #8b5cf6;
    --text:      #eafff7;
    --muted:     #8aa39c;
    --font: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }

/* ---------- Layout ---------- */
#breathContainer,
.breath-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}
.breath-wrap {
    margin: 10px 0 24px 0;
}
/* ---------- Instruction above the circle ---------- */
.breath-instruction {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.7;
    letter-spacing: 0.01em;
    color: var(--muted);
    text-align: center;
    margin: 0 0 38px 0;
    max-width: 420px;
}
/* ---------- The circle ---------- */
.breath-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 1px solid rgba(167, 139, 250, 0.35);
    background:
        radial-gradient(circle at 50% 45%,
            rgba(52, 211, 153, 0.38),
            rgba(139, 92, 246, 0.22) 62%,
            rgba(10, 17, 22, 0.85));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0 auto 24px auto;
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
    box-shadow:
        0 0 26px rgba(52, 211, 153, 0.28),
        0 0 70px rgba(139, 92, 246, 0.18);
}
#breathCircle {
    margin-left: auto;
    margin-right: auto;
}
.breath-circle.inhale {
    transform: scale(1.35);
    box-shadow:
        0 0 48px rgba(52, 211, 153, 0.55),
        0 0 110px rgba(167, 139, 250, 0.32);
    transition-duration: 4s;
    transition-timing-function: ease-out;
}
.breath-circle.exhale {
    transform: scale(0.85);
    box-shadow:
        0 0 20px rgba(52, 211, 153, 0.25),
        0 0 55px rgba(139, 92, 246, 0.15);
    transition-duration: 6s;
    transition-timing-function: ease-in;
}
.breath-circle.hold {
    transform: scale(1.35);
    box-shadow:
        0 0 48px rgba(52, 211, 153, 0.45),
        0 0 110px rgba(167, 139, 250, 0.28);
}
/* Idle shimmer so it feels alive and inviting */
.breath-circle.idle {
    animation: breathIdle 4.5s ease-in-out infinite;
}
/* CRITICAL: a running animation on `transform` overrides transitions.
   Make sure no animation is active during the breathing phases,
   so inhale/exhale transitions start instantly on the first cycle. */
.breath-circle.inhale,
.breath-circle.exhale,
.breath-circle.hold {
    animation: none;
}
@keyframes breathIdle {
    0%, 100% { transform: scale(1);    box-shadow: 0 0 26px rgba(52,211,153,.26), 0 0 70px rgba(139,92,246,.16); }
    50%      { transform: scale(1.03); box-shadow: 0 0 38px rgba(52,211,153,.40), 0 0 90px rgba(167,139,250,.24); }
}
/* ---------- Label inside the circle ---------- */
.breath-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--text);
    text-transform: uppercase;
    text-shadow: 0 0 24px rgba(52, 211, 153, 0.45);
    margin: 0;
    pointer-events: none;
    white-space: nowrap;
    transition: opacity 0.4s ease;
}
/* ---------- Cycle counter ---------- */
.breath-counter {
    color: var(--muted);
    margin-top: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    letter-spacing: 1px;
    min-height: 1.2em;
}
/* ---------- Single CTA: Start Now <-> Stop ---------- */

.breath-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 35px;
    padding: 16px 36px; 
    min-width: 190px;   
    font-family: var(--font);
    font-size: 1rem;    
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--green-1);          
    background: #0b1f17;            
    border: 1.5px solid var(--green-1);
    border-radius: var(--radius-sm);
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(45, 212, 191, 0.18);
    transition:
        transform .15s var(--ease),
        box-shadow .2s var(--ease),
        background .2s var(--ease),
        color .2s var(--ease),
        border-color .2s var(--ease);
}

.breath-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(45, 212, 191, 0.25);
}

.breath-btn.is-running {
     background: var(--bg-2);
    border-color: var(--green-1);
    color: var(--green-1);
    box-shadow: none;
}

.breath-btn:active { transform: translateY(0); }
.breath-btn:focus-visible {
    outline: 2px solid var(--purple-1);
    outline-offset: 3px;
}

.breath-btn.is-running:hover {
    background: rgba(52, 211, 153, 0.10);
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.22);
}