@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600&display=swap');

:root {
    --bg-color: #0b1120;
    --circle-color: hsl(260, 40%, 65%);
    --text-color: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.6);
    --surface: rgba(255, 255, 255, 0.05);
    --surface-hover: rgba(255, 255, 255, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.8s ease;
}

#app {
    width: 100%;
    max-width: 500px;
    height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Screens */
.screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    padding: 2rem;
}

.screen.active {
    opacity: 1;
    pointer-events: all;
}

.content-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Typography */
h1 {
    font-size: 3rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.15rem;
    font-weight: 300;
    margin-bottom: 3rem;
}

/* Settings Group */
.settings {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    margin-bottom: 3rem;
}

.setting-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.setting-group label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    font-weight: 600;
}

/* Elegant Pills */
.pill-group {
    display: flex;
    background: var(--surface);
    border-radius: 100px;
    padding: 6px;
    width: 100%;
    max-width: 340px;
}

.pill-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 0;
    border-radius: 100px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
}

.pill-btn:hover {
    color: var(--text-color);
}

.pill-btn.active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Action Button */
.action-btn {
    background: #ffffff;
    color: #0b1120;
    border: none;
    padding: 1.2rem 3rem;
    border-radius: 100px;
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    max-width: 340px;
    font-family: inherit;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.4);
}

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

/* Exercise Header */
.exercise-header {
    position: absolute;
    top: 0; left: 0; 
    width: 100%;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.icon-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.icon-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.05);
}

.progress-bar-container {
    flex: 1;
    margin: 0 1.5rem;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    overflow: hidden;
}

#progress-fill {
    height: 100%;
    width: 0%;
    background: var(--text-color);
    transition: width 0.2s linear;
}

/* Breathing Area */
.breathing-container {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

#breathing-circle {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--circle-color), transparent);
    background-color: var(--circle-color);
    box-shadow: 0 0 60px var(--circle-color);
    opacity: 0.85;
    
    transform: scale(1);
    will-change: transform;
}

@keyframes breatheIn {
    0%   { transform: scale(1); }
    100% { transform: scale(2.6); }
}

@keyframes breatheOut {
    0%   { transform: scale(2.6); }
    100% { transform: scale(1); }
}

#breathing-circle.inhale {
    animation: breatheIn 4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

#breathing-circle.exhale {
    animation: breatheOut 6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Instruction Text perfectly centered inside the circle */
#instruction {
    font-size: 2rem;
    font-weight: 500;
    color: #ffffff;
    z-index: 2;
    transition: opacity 0.5s ease;
    opacity: 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    pointer-events: none;
    text-align: center;
}