/* --- Breathe (Relaxation) Mode --- */

/* ─── Breathe Panel (Standalone Container) ─── */
.breathe-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    padding: 24px 20px;
    width: 100%;
    animation: fadeInUp 1s ease-out 0.4s both;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/* Entry contents */
.breathe-entry-title {
    font-size: 0.85rem;
    color: var(--text-primary);
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
}

.breathe-entry-title svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

.breathe-info-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.breathe-info-btn svg {
    width: 16px;
    height: 16px;
    color: inherit;
}

@media (hover: hover) {
    .breathe-info-btn:hover {
        color: var(--accent);
    }
}

.breathe-mode-row {
    display: flex;
    gap: 8px;
    margin-bottom: 2px;
}

.breathe-mode-btn {
    padding: 5px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.2s;
}

.breathe-mode-btn.selected {
    background: rgba(108, 180, 238, 0.2);
    border-color: var(--accent);
    color: var(--accent);
}

.breathe-entry-desc {
    font-size: 0.7rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 4px;
    text-align: center;
}

.breathe-preset-row {
    display: flex;
    gap: 10px;
    margin-bottom: 4px;
    justify-content: center;
}

.breathe-preset-btn {
    padding: 4px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.2s;
}

.breathe-preset-btn.selected {
    background: rgba(108, 180, 238, 0.2);
    border-color: var(--accent);
    color: var(--accent);
}

.breathe-start-btn {
    padding: 10px;
    background: rgba(108, 180, 238, 0.08);
    border: 1px solid rgba(108, 180, 238, 0.3);
    border-radius: 12px;
    color: var(--accent);
    font-family: var(--font);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
}

.breathe-start-btn svg {
    width: 18px;
    height: 18px;
}

@media (hover: hover) {
    .breathe-start-btn:hover {
        background: rgba(108, 180, 238, 0.18);
    }
}

/* ─── Fullscreen Overlay ─── */
.breathe-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(10, 15, 30, 0.85); /* Dark background but allow slight transparency */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.5s ease-in-out;
}

.breathe-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ─── the Glow Circle ─── */
.breathe-circle-container {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
}

.breathe-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(170, 210, 255, 0.85) 0%, rgba(108, 180, 238, 0.5) 50%, rgba(108, 180, 238, 0) 100%);
    box-shadow: 0 0 60px rgba(108, 180, 238, 0.3);
    transition: transform 4s ease-in-out, opacity 2s ease-in-out, box-shadow 2s ease-in-out;
    transform: scale(1);
    opacity: 0.6;
}

.breathe-circle.inhale {
    transform: scale(2.5);
    opacity: 1;
    box-shadow: 0 0 80px rgba(108, 180, 238, 0.6), 0 0 30px rgba(200, 230, 255, 0.3) inset;
}

.breathe-circle.hold {
    opacity: 0.85;
    box-shadow: 0 0 60px rgba(108, 180, 238, 0.5), 0 0 20px rgba(200, 230, 255, 0.2) inset;
}

.breathe-circle.exhale {
    transform: scale(0.8);
    opacity: 0.45;
    box-shadow: 0 0 30px rgba(108, 180, 238, 0.2);
}

/* ─── Guide Text ─── */
.breathe-text {
    position: absolute;
    font-size: 1.4rem;
    letter-spacing: 0.2em;
    color: var(--text-primary);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    text-align: center;
    width: 100%;
}

.breathe-text.visible {
    opacity: 1;
}

/* ─── Hold Progress Bar ─── */
.breathe-hold-bar {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.breathe-hold-bar.visible {
    opacity: 1;
}

.breathe-hold-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--accent);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(108, 180, 238, 0.6);
    transition: none;
}

/* ─── Cancel / End Button ─── */
.breathe-close-btn {
    position: absolute;
    bottom: 40px;
    padding: 10px 24px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.3;
}

@media (hover: hover) {
    .breathe-close-btn:hover {
        opacity: 1;
        border-color: var(--text-primary);
        color: var(--text-primary);
    }
}

/* ─── Info Modal Specific ─── */
.breathe-info-section h4 {
    font-size: 0.95rem;
    color: var(--accent);
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.breathe-info-section p {
    font-size: 0.82rem;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 8px;
}

.breathe-info-section strong {
    color: var(--text-secondary);
    font-weight: normal;
}
