/* breathing.css */

/* Overlay Container - Centered, Full Screen */
.breathing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    /* Above regular GUI */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    /* Let clicks pass when hidden/transparent */
    font-family: "brandon-grotesque", sans-serif;
    font-weight: 100;
    color: white;
    transition: background-color 0.5s ease;
}

.breathing-overlay.active {
    pointer-events: auto;
}

/* Common Card Styles */
.breathing-card {
    background: rgba(0, 20, 100, 0.2);
    /* Darker background */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: none;
    /* Hidden by default */
}

.breathing-card.visible {
    opacity: 1;
    transform: translateY(0);
    display: block;
    animation: fadeUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typography */
.breathing-title {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 0%, #ddd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.breathing-subtitle {
    font-size: 1.1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2.5rem;
    line-height: 1.5;
}

/* Pattern Selection Buttons */
.pattern-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.pattern-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-size: 1.1rem;
}

.pattern-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.02);
    border-color: rgba(255, 255, 255, 0.3);
}

.pattern-btn.selected {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.pattern-name {
    font-weight: 500;
}

.pattern-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Start Button */
.action-btn {
    margin-top: 32px;
    background: white;
    color: #1a1a1a;
    border: none;
    border-radius: 50px;
    padding: 16px 48px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.action-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

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

.action-btn.secondary {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 32px;
    font-size: 1rem;
}

.action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Active Session UI */
.session-ui {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    height: 100%;
}

.session-ui.visible {
    display: flex;
}

.instruction-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    font-weight: 200;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin: 0;
    width: 100%;
    text-align: center;
    transition: opacity 1s ease, transform 0.1s ease;
}

/* Stopwatch / Countdown specific */
.countdown-display {
    font-size: 4rem;
    font-weight: 100;
    transition: none !important;
    /* Disable transitions for countdown to allow immediate opacity changes */
}

/* Stop Button Overlay */
.stop-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.stop-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Progress Bar - CENTERED, TALLER, OVERLAY STYLE */
.progress-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, 40px) scale(0.85);
    /* Scaled to 75% and closer to text */
    width: 80%;
    max-width: 250px;
    height: 18px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 9px;
    overflow: hidden;
    opacity: 0.75;
    /* 75% opacity as requested */
}

.progress-bar {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
    width: 0%;
    background: #ffffff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    border-radius: 9px;
    /* transition: width 0.1s linear; Removed for JS Easing control */
}

/* Secondary bar for "Hold" phases */
.progress-bar-overlay {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
    width: 0%;
    background: rgba(180, 220, 255, 0.8);
    /* Light blue-ish for distinction */
    border-radius: 9px;
    z-index: 2;
}

/* Hide other controls during session */
.hide-ui {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

/* Text Fading */
.fade-text {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.1s ease, transform 0.1s ease;
}

.instruction-text {
    /* ... existing props ... */
    transition: opacity 0.1s ease, transform 0.1s ease;
}

/* Step Timer (Small countdown below bar) */
.step-timer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, 60px);
    /* Adjusted for scaled bar */
    /* Position below the bar */
    font-size: 1rem;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.6);
    pointer-events: none;
    opacity: 0.75;
    /* 75% opacity matching bar */
}