.bb-container {
    width: 100%;
    margin: 30px auto;
    text-align: center;
}

/* =========================================================
   INSTRUCTION
   ========================================================= */

.bb-instruction {
    margin: 0 0 24px;
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.5;
}

/* =========================================================
   BUTTON
   ========================================================= */

.bb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 28px;
    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);
}

.bb-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 22px rgba(45, 212, 191, 0.25);
}


.bb-btn.is-running {
    border-color: rgba(139, 92, 246, 0.55);
    background: rgba(139, 92, 246, 0.12);
}


/* =========================================================
   SQUARE AREA
   ========================================================= */

.bb-square-wrap {
    position: relative;
    width: 500px;   
    margin: 0 auto;
}



/* =========================================================
   BREATHING SQUARE
   ========================================================= */

.bb-square {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 0 auto;
    background: rgba(52, 211, 153, 0.08);
    border: 2px solid rgba(52, 211, 153, 0.35);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;
}



/* =========================================================
   IDLE STATE
   ========================================================= */

.bb-square.idle {
    border-color: rgba(52, 211, 153, 0.35);
}


/* =========================================================
   RUNNING STATE
   ========================================================= */

.bb-square.is-running {
    border-color: rgba(52, 211, 153, 0.55);
}


/* =========================================================
   GLOW
   ========================================================= */

.bb-glow {
    position: absolute;
    display: block;
    background: var(--green-1);
    opacity: 0;
    pointer-events: none;
    z-index: 3;
    box-shadow:
        0 0 8px var(--green-1),
        0 0 16px rgba(52, 211, 153, 0.7);
}


/* =========================================================
   INHALE
   LEFT EDGE — BOTTOM TO TOP
   ========================================================= */

.bb-edge-inhale {
    left: 0;
    bottom: 0;
    width: 4px;
    height: 100%;
    transform-origin: bottom center;
    animation:
        bbGlowInhale 4s linear forwards;
}

@keyframes bbGlowInhale {
    from {
        height: 0;
        opacity: 1;
    }

    to {
        height: 100%;
        opacity: 1;
    }
}


/* =========================================================
   HOLD FULL
   TOP EDGE — LEFT TO RIGHT
   ========================================================= */

.bb-edge-hold-full {
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    animation:
        bbGlowHoldFull 4s linear forwards;
}

@keyframes bbGlowHoldFull {
    from {
        width: 0;
        opacity: 1;
    }
    to {
        width: 100%;
        opacity: 1;
    }
}


/* =========================================================
   EXHALE
   RIGHT EDGE — TOP TO BOTTOM
   ========================================================= */

.bb-edge-exhale {
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;

    animation:
        bbGlowExhale 4s linear forwards;
}

@keyframes bbGlowExhale {
    from {
        height: 0;
        opacity: 1;
    }
    to {
        height: 100%;
        opacity: 1;
    }
}


/* =========================================================
   HOLD EMPTY
   BOTTOM EDGE — RIGHT TO LEFT
   ========================================================= */

.bb-edge-hold-empty {
    bottom: 0;
    right: 0;
    width: 100%;
    height: 4px;

    animation:
        bbGlowHoldEmpty 4s linear forwards;
}

@keyframes bbGlowHoldEmpty {
    from {
        width: 0;
        opacity: 1;
    }
    to {
        width: 100%;
        opacity: 1;
    }
}


/* =========================================================
   PHASE LABEL
   ========================================================= */

.bb-phase-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    width: 100%;
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 400;
    letter-spacing: 1.5px;
    text-align: center;
    pointer-events: none;
}

/* =========================================================
   NOSE
   ========================================================= */

.bb-nose {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 300px;
    height: 370px;
    transform: translate(-50%, -50%);
    z-index: 5;
    overflow: visible;
    pointer-events: none;
}


/* =========================================================
   NOSE SKIN
   ========================================================= */

.bb-nose-skin {
    fill: rgba(255, 255, 255, 0.035);
    stroke: rgba(255, 255, 255, 0.15);
    stroke-width: 1;
}

/* =========================================================
   NOSE OUTLINE
   ========================================================= */

.bb-nose-outline {
    fill: none;
    stroke: rgba(255, 255, 255, 0.5);
    stroke-width: 1.4;
    stroke-linejoin: round;
}

/* =========================================================
   NOSTRILS
   ========================================================= */

.bb-nose-nostril {
    fill: rgba(0, 0, 0, 0.28);
    stroke: rgba(255, 255, 255, 0.18);
    stroke-width: 0.8;
}

/* =========================================================
   NOSE DETAILS
   ========================================================= */

.bb-nose-detail {
    fill: none;
    stroke: rgba(255, 255, 255, 0.3);
    stroke-width: 1;
    stroke-linecap: round;
}

/* =========================================================
   NOSE FILL
   ========================================================= */

.bb-fill {
    transform-box: fill-box;
    transform-origin: bottom;
    opacity: 0;
    transition: none;
}

/* =========================================================
   INHALE — FILL RISES
   ========================================================= */

.bb-fill-inhale {
    opacity: 0.85;
    animation:
        bbFillInhale 4s linear forwards;
}

@keyframes bbFillInhale {
    from {
        transform: scaleY(0);
    }
    to {
        transform: scaleY(1);
    }
}


/* =========================================================
   HOLD FULL
   ========================================================= */

.bb-fill-full {
    opacity: 0.85;
    transform: scaleY(1);
}

/* =========================================================
   EXHALE — FILL FALLS
   ========================================================= */

.bb-fill-exhale {
    opacity: 0.85;
    animation:
        bbFillExhale 4s linear forwards;
}

@keyframes bbFillExhale {
    from {
        transform: scaleY(1);
    }
    to {
        transform: scaleY(0);
    }
}

/* =========================================================
   HOLD EMPTY
   ========================================================= */

.bb-fill-empty {
    opacity: 0;
    transform: scaleY(0);
}

/* =========================================================
   COUNTER
   ========================================================= */

.bb-counter {
    margin-top: 16px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 0.5px;
}


