:root {
    --bg-light: #e0f7fa;
    --bg-dark: #263238;
    --primary: #00bcd4;
    --secondary: #b2ebf2;
    --text-light: #37474f;
    --text-dark: #eceff1;
    --circle-color: rgba(0, 188, 212, 0.2);
    --circle-border: rgba(0, 188, 212, 0.5);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-light: #263238; /* Invert for dark mode logic */
        --text-light: #eceff1;
    }
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--text-light);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: background 1s ease;
}

@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1a1c20 0%, #0f1012 100%);
        color: #fff;
    }
}

.app-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.5s ease;
}

/* Focus Mode: Dim everything except the circle */
body.exercise-active .controls,
body.exercise-active .info-section,
body.exercise-active .action-buttons {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

body.exercise-active .app-container {
    justify-content: center;
}

.controls {
    position: absolute;
    top: 40px;
    z-index: 10;
    transition: all 0.5s ease;
    width: 80%;
    max-width: 300px;
}

select {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    font-size: 1rem;
    color: #333;
    appearance: none;
    text-align: center;
    cursor: pointer;
}

@media (prefers-color-scheme: dark) {
    select {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
    }
}

.breathing-container {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.circle-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Multiple circles for organic feel */
.circle-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid var(--circle-border);
    opacity: 0.3;
    transform: scale(1);
}

.circle {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--circle-color);
    border-radius: 50%;
    transform: scale(0.4); /* Start small */
    box-shadow: 0 0 40px var(--circle-color);
    will-change: transform;
    z-index: 1;
}

/* Text inside the circle */
.text-content {
    position: absolute;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.instruction-text {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    opacity: 0.9;
}

.timer-text {
    font-size: 3rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    opacity: 0.8;
}

.action-buttons {
    position: absolute;
    bottom: 100px;
    transition: all 0.5s ease;
    z-index: 10;
}

button {
    padding: 18px 48px;
    border-radius: 50px;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: transform 0.2s, box-shadow 0.2s;
    background: var(--text-light);
    color: #fff;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

@media (prefers-color-scheme: dark) {
    button {
        background: #fff;
        color: #000;
    }
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

button:active {
    transform: scale(0.98);
}

/* Stop button (hidden by default, shown when active) */
#stop-btn {
    background: rgba(255, 82, 82, 0.9);
    color: white;
    position: fixed;
    bottom: 40px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

body.exercise-active #stop-btn {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.info-section {
    position: absolute;
    bottom: 30px;
    text-align: center;
    opacity: 0.6;
    font-size: 0.9rem;
    max-width: 80%;
    transition: all 0.5s ease;
}

.info-section h3 {
    display: none; /* Minimalist */
}
