:root {
    --bg-color: #f0f4f8;
    --text-color: #2d3748;
    --accent-color: #4a90e2;
    --circle-bg: #ffffff;
    --circle-shadow: rgba(0, 0, 0, 0.05);
    --inhale-color: #a3d8f4;
    --hold-color: #ffe082;
    --exhale-color: #b2f2bb;
    --font-main: 'Zen Kaku Gothic New', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    text-align: center;
    padding: 4rem 1rem 2rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

header .subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    opacity: 0.8;
}

main {
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    padding: 2rem 1rem;
}

#app-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 5rem;
}

.breathing-circle-outer {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3rem;
}

#breathing-circle {
    width: 150px;
    height: 150px;
    background-color: var(--circle-bg);
    border-radius: 50%;
    box-shadow: 0 10px 30px var(--circle-shadow);
    transition: transform 1s ease-in-out, background-color 0.5s ease;
}

#status-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 500;
    pointer-events: none;
    text-align: center;
}

#timer-text {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.6;
}

.controls button {
    padding: 0.8rem 3rem;
    font-size: 1.1rem;
    font-family: inherit;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    background-color: var(--accent-color);
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.controls button:active {
    transform: translateY(0);
}

#stop-btn {
    background-color: #e53e3e;
    box-shadow: 0 4px 15px rgba(229, 62, 62, 0.3);
}

#stop-btn:hover {
    box-shadow: 0 6px 20px rgba(229, 62, 62, 0.4);
}

.hidden {
    display: none;
}

/* Explanation Section */
#explanation {
    background: white;
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 20px var(--circle-shadow);
}

#explanation h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--accent-color);
}

#explanation > p {
    margin-bottom: 2rem;
    text-align: justify;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.step {
    text-align: center;
}

.step-num {
    display: inline-block;
    width: 50px;
    height: 50px;
    line-height: 50px;
    background: var(--bg-color);
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.step h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.step p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.benefits h3 {
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--bg-color);
    padding-bottom: 0.5rem;
}

.benefits ul {
    list-style: none;
}

.benefits li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.benefits li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

footer {
    text-align: center;
    padding: 3rem 1rem;
    font-size: 0.9rem;
    opacity: 0.7;
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

footer a:hover {
    text-decoration: underline;
}

/* Animations for breathing */
.breathing-inhale {
    transform: scale(2);
    background-color: var(--inhale-color) !important;
}

.breathing-hold {
    transform: scale(2);
    background-color: var(--hold-color) !important;
}

.breathing-exhale {
    transform: scale(1);
    background-color: var(--exhale-color) !important;
}

@media (max-width: 600px) {
    .steps {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}
