/* ============================================
   Natural Breathing for Kids - Styles
   Based on the Science of Breath
   ============================================ */

/* CSS Variables for easy theming */
:root {
    --primary-color: #6B8DD6;
    --primary-dark: #4A6BB5;
    --secondary-color: #9ED6B5;
    --accent-color: #F5C26B;
    --calm-blue: #E8F4FD;
    --soft-purple: #E8E0F0;
    --warm-peach: #FDE8DC;
    --text-color: #3D4852;
    --text-light: #6B7C93;
    --white: #FFFFFF;
    --shadow: 0 4px 15px rgba(107, 141, 214, 0.2);
    --shadow-lg: 0 8px 30px rgba(107, 141, 214, 0.3);

    /* Breathing animation timing */
    --inhale-time: 4s;
    --hold-time: 2s;
    --exhale-time: 4s;
    --rest-time: 2s;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================================
   Breadcrumb Navigation
   ============================================ */
.breadcrumb-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 10px 0;
}

.breadcrumb-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 15px;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background: transparent;
}

.breadcrumb-item:hover {
    background: var(--calm-blue);
    color: var(--primary-color);
}

.breadcrumb-item.active {
    background: var(--primary-color);
    color: white;
}

.breadcrumb-item.visited {
    color: var(--primary-color);
}

.breadcrumb-item.visited::after {
    content: '✓';
    font-size: 0.7rem;
    margin-left: 3px;
}

.breadcrumb-number {
    width: 20px;
    height: 20px;
    background: var(--calm-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

.breadcrumb-item.active .breadcrumb-number {
    background: rgba(255, 255, 255, 0.3);
}

.breadcrumb-item.visited .breadcrumb-number {
    background: var(--secondary-color);
    color: white;
}

.breadcrumb-icon {
    font-size: 1rem;
}

.breadcrumb-label {
    display: none;
}

.breadcrumb-separator {
    color: var(--text-light);
    opacity: 0.5;
    font-size: 0.8rem;
}

/* Show labels on larger screens */
@media (min-width: 768px) {
    .breadcrumb-label {
        display: inline;
    }

    .breadcrumb-item {
        padding: 8px 14px;
    }
}

/* Compact on very small screens */
@media (max-width: 480px) {
    .breadcrumb-nav {
        padding: 8px 0;
    }

    .breadcrumb-item {
        padding: 5px 8px;
        font-size: 0.8rem;
    }

    .breadcrumb-number {
        width: 18px;
        height: 18px;
        font-size: 0.7rem;
    }

    .breadcrumb-separator {
        display: none;
    }
}

body {
    font-family: 'Segoe UI', 'Comic Sans MS', Tahoma, sans-serif;
    background: linear-gradient(135deg, var(--calm-blue) 0%, var(--soft-purple) 50%, var(--warm-peach) 100%);
    padding-top: 60px; /* Space for fixed breadcrumb */
    min-height: 100vh;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Screen Management */
.screen {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Welcome Screen
   ============================================ */
#welcome-screen {
    text-align: center;
    padding: 40px 20px;
    position: relative;
}

#welcome-screen h1 {
    font-size: 3rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(255,255,255,0.8);
}

.subtitle {
    font-size: 1.3rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

.intro-text {
    font-size: 1.2rem;
    max-width: 500px;
    margin: 0 auto 30px;
    color: var(--text-color);
}

/* Floating Clouds */
.clouds {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    overflow: hidden;
    z-index: -1;
}

.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 100px;
    animation: floatCloud 20s infinite linear;
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: inherit;
    border-radius: 50%;
}

.cloud-1 {
    width: 100px;
    height: 40px;
    top: 30px;
    left: -100px;
    animation-duration: 25s;
}

.cloud-2 {
    width: 150px;
    height: 50px;
    top: 80px;
    left: -150px;
    animation-duration: 30s;
    animation-delay: 5s;
}

.cloud-3 {
    width: 80px;
    height: 30px;
    top: 50px;
    left: -80px;
    animation-duration: 22s;
    animation-delay: 10s;
}

@keyframes floatCloud {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(calc(100vw + 200px));
    }
}

/* Hero Image */
.character {
    margin: 30px auto;
}

.hero-image {
    width: 180px;
    height: 180px;
    margin: 0 auto;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-lg);
    border: 4px solid white;
    animation: gentleBounce 3s ease-in-out infinite;
}

@keyframes gentleBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ============================================
   Progress Bar
   ============================================ */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    transition: width 0.5s ease;
}

.step-indicator {
    display: inline-block;
    background: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

/* ============================================
   Headings
   ============================================ */
h2 {
    font-size: 2rem;
    color: var(--primary-dark);
    text-align: center;
    margin-bottom: 25px;
}

h3 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin: 20px 0 10px;
}

h4 {
    font-size: 1.1rem;
    color: var(--text-color);
    margin: 15px 0 10px;
}

/* ============================================
   Content Cards
   ============================================ */
.content-card {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

.teaching-content {
    padding: 10px 0;
}

.teaching-content p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.highlight-text {
    background: linear-gradient(120deg, var(--calm-blue) 0%, var(--soft-purple) 100%);
    padding: 15px 20px;
    border-radius: 10px;
    font-weight: 500;
}

/* ============================================
   Fun Fact & Tip Boxes
   ============================================ */
.fun-fact,
.tip-box {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
}

.fun-fact {
    background: linear-gradient(135deg, #FFF9E6 0%, #FFF3CD 100%);
    border-left: 4px solid var(--accent-color);
}

.tip-box {
    background: linear-gradient(135deg, #E6F7FF 0%, #D4EDFF 100%);
    border-left: 4px solid var(--primary-color);
}

.fact-icon,
.tip-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

/* ============================================
   Breathing Parts List
   ============================================ */
.breathing-parts {
    list-style: none;
    padding: 15px 0;
}

.breathing-parts li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: var(--calm-blue);
    border-radius: 10px;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.part-icon {
    font-size: 1.2rem;
}

/* ============================================
   Posture Demo
   ============================================ */
.posture-demo {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin: 20px 0 30px;
}

.standing-figure {
    text-align: center;
    position: relative;
}

.figure-head {
    width: 40px;
    height: 40px;
    background: #FFD4B8;
    border-radius: 50%;
    margin: 0 auto 5px;
}

.figure-body {
    width: 50px;
    height: 70px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 25px 25px 10px 10px;
    margin: 0 auto;
    position: relative;
}

.figure-legs {
    width: 50px;
    height: 80px;
    margin: 0 auto;
    position: relative;
}

.figure-legs::before,
.figure-legs::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 75px;
    background: linear-gradient(180deg, var(--primary-dark) 0%, #3A5A9A 100%);
    border-radius: 10px;
    top: 0;
}

.figure-legs::before {
    left: 5px;
}

.figure-legs::after {
    right: 5px;
}

.figure-body.slouched {
    transform: rotate(12deg) translateX(5px);
    background: linear-gradient(180deg, #B0B0B0 0%, #808080 100%);
}

.incorrect .figure-head {
    transform: translateX(8px);
}

.incorrect .figure-legs::before,
.incorrect .figure-legs::after {
    background: linear-gradient(180deg, #808080 0%, #606060 100%);
}

.standing-figure .label {
    font-weight: bold;
    font-size: 1.1rem;
    margin-top: 10px;
    display: block;
}

.correct .label {
    color: #4CAF50;
}

.incorrect .label {
    color: #E53935;
}

/* ============================================
   Checklist
   ============================================ */
.checklist {
    background: var(--calm-blue);
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    cursor: pointer;
    font-size: 1.05rem;
}

.check-item input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 28px;
    height: 28px;
    border: 3px solid var(--primary-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.check-item input:checked + .checkmark {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

.check-item input:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

/* ============================================
   Instruction Steps
   ============================================ */
.instruction-steps {
    margin: 20px 0;
}

.instruction-step {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content strong {
    display: block;
    color: var(--primary-dark);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.step-content p {
    color: var(--text-color);
    margin: 0;
    font-size: 1rem;
}

/* Highlight the first step (emptying lungs) */
.instruction-step.first-step {
    background: linear-gradient(135deg, #FFF9E6 0%, #FFF3CD 100%);
    padding: 15px;
    border-radius: 12px;
    border-left: 4px solid var(--accent-color);
}

.instruction-step.first-step .step-number {
    background: linear-gradient(135deg, var(--accent-color), #E5A830);
}

.instruction-step.first-step .step-content strong {
    color: #B8860B;
}

/* ============================================
   Muscle Contraction Demo (Step 3)
   ============================================ */
.muscle-demo-container {
    background: linear-gradient(135deg, #FFF5E6, #FFE8CC);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.muscle-demo-container h4 {
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.muscle-intro {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.view-label {
    font-size: 0.8rem;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 15px;
}

.abdomen-demo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.abdomen-body {
    width: 180px;
    height: 120px;
    background: linear-gradient(180deg, #FFE4C9, #FFDAB9);
    border-radius: 60px 60px 40px 40px;
    position: relative;
    border: 3px solid #DEB887;
    overflow: hidden;
}

.spine-indicator {
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 20%;
    background: linear-gradient(180deg, #C9B896, #A89070);
    border-radius: 4px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spine-label {
    font-size: 0.5rem;
    color: #666;
    writing-mode: vertical-rl;
    white-space: nowrap;
}

.lung-air {
    position: absolute;
    top: 25%;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 50px;
    background: radial-gradient(ellipse, rgba(135, 206, 250, 0.7), rgba(135, 206, 250, 0.2));
    border-radius: 50%;
    transition: all 0.8s ease;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.air-label {
    font-size: 0.7rem;
    color: #2196F3;
    font-weight: 600;
}

.lung-air.empty {
    width: 30px;
    height: 20px;
    opacity: 0.3;
}

.lung-air.empty .air-label {
    display: none;
}

.muscle {
    position: absolute;
    top: 20%;
    width: 35px;
    height: 60%;
    background: linear-gradient(90deg, #E57373, #EF5350);
    border-radius: 10px;
    transition: all 0.8s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.left-muscle {
    left: 8%;
    transform: skewY(-5deg);
}

.right-muscle {
    right: 8%;
    transform: skewY(5deg);
}

.muscle-label {
    font-size: 0.6rem;
    color: white;
    font-weight: bold;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    opacity: 0.8;
}

.muscle.squeezing {
    width: 45px;
    background: linear-gradient(90deg, #C62828, #B71C1C);
}

.left-muscle.squeezing {
    left: 15%;
}

.right-muscle.squeezing {
    right: 15%;
}

.belly-wall {
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 25%;
    background: linear-gradient(180deg, rgba(255,218,185,0), #FFDAB9);
    border-radius: 0 0 30px 30px;
    transition: all 0.8s ease;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 5px;
}

.belly-label {
    font-size: 0.6rem;
    color: #A0522D;
}

.belly-wall.contracted {
    left: 20%;
    right: 20%;
}

.air-arrows {
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: all 0.5s ease;
    z-index: 10;
}

.air-arrows.visible {
    opacity: 1;
    top: -20px;
}

.air-arrows .arrow {
    color: #64B5F6;
    font-size: 1.2rem;
    font-weight: bold;
    animation: floatUp 0.8s ease-in-out infinite;
}

.air-arrows .arrow:nth-child(2) {
    animation-delay: 0.2s;
}

.air-arrows .arrow:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes floatUp {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(-5px); opacity: 0.6; }
}

.muscle-instructions {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    padding: 10px 20px;
    background: white;
    border-radius: 8px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-divider {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    margin: 25px 0;
}

/* ============================================
   Breath Animation Container (Step 3)
   ============================================ */
.breath-animation-container {
    text-align: center;
    padding: 20px;
    margin-bottom: 20px;
}

.breath-animation-container h4 {
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.breath-cycle-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.demo-phase-label {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    background: var(--calm-blue);
    color: var(--text-color);
    transition: all 0.3s ease;
}

.demo-phase-label.phase-empty {
    background: linear-gradient(135deg, #FFE5E5, #FFCCCC);
    color: #994444;
}

.demo-phase-label.phase-fill {
    background: linear-gradient(135deg, #E5FFE5, #CCFFCC);
    color: #447744;
}

.demo-phase-label.phase-exhale {
    background: linear-gradient(135deg, #E5E5FF, #CCCCFF);
    color: #444477;
}

/* Sine Wave Visualization */
.sine-wave-container {
    margin: 20px auto;
    max-width: 400px;
    position: relative;
}

.breath-wave {
    width: 100%;
    height: 80px;
    background: linear-gradient(180deg, rgba(232, 244, 253, 0.5), rgba(232, 224, 240, 0.5));
    border-radius: 10px;
}

.sine-wave-path {
    filter: drop-shadow(0 2px 4px rgba(107, 141, 214, 0.3));
}

.breath-dot {
    filter: drop-shadow(0 2px 6px rgba(107, 141, 214, 0.5));
    transition: fill 0.3s ease;
}

.breath-dot.exhaling {
    fill: #E57373;
}

.breath-dot.inhaling {
    fill: #81C784;
}

.wave-labels {
    display: flex;
    justify-content: space-between;
    padding: 5px 10px;
    font-size: 0.8rem;
    color: var(--text-light);
}

.wave-label.full-label {
    color: var(--secondary-color);
    font-weight: 600;
}

.wave-label.empty-label {
    color: #E57373;
}

/* Cycle Controls */
.cycle-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.control-btn {
    padding: 10px 25px;
    font-size: 1rem;
}

.cycle-counter {
    font-size: 1rem;
    color: var(--text-light);
    background: var(--calm-blue);
    padding: 8px 15px;
    border-radius: 8px;
}

.body-outline {
    width: 150px;
    height: 200px;
    margin: 0 auto 20px;
    position: relative;
    background: linear-gradient(180deg, var(--calm-blue) 0%, var(--soft-purple) 100%);
    border-radius: 50px 50px 30px 30px;
    border: 3px solid var(--primary-color);
}

.breath-zone {
    position: absolute;
    left: 10%;
    width: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    opacity: 0.8;
    transition: all 0.5s ease;
}

.belly-zone {
    bottom: 15%;
    height: 25%;
    background: rgba(107, 141, 214, 0.4);
}

.ribs-zone {
    bottom: 42%;
    height: 22%;
    background: rgba(158, 214, 181, 0.4);
}

.chest-zone {
    bottom: 66%;
    height: 20%;
    background: rgba(245, 194, 107, 0.4);
}

.breath-zone span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
}

.breath-zone.active {
    opacity: 1;
    transform: scaleX(1.15);
    background: rgba(107, 214, 158, 0.7);
}

.breath-zone.collapsed {
    opacity: 1;
    transform: scaleX(0.7);
    height: 12% !important;
}

.belly-zone.collapsed {
    background: rgba(214, 107, 107, 0.5);
}

.ribs-zone.collapsed {
    background: rgba(214, 158, 107, 0.5);
}

.chest-zone.collapsed {
    background: rgba(214, 181, 107, 0.5);
}

/* ============================================
   Rhythm Visual (Step 4)
   ============================================ */
.rhythm-visual {
    text-align: center;
    padding: 30px 20px;
}

.wave-container {
    margin-bottom: 20px;
}

.wave-svg {
    width: 100%;
    max-width: 400px;
    height: 100px;
}

.wave-path {
    stroke-dasharray: 400;
    animation: waveFlow 3s ease-in-out infinite;
}

@keyframes waveFlow {
    0%, 100% {
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dashoffset: 100;
    }
}

.heartbeat-icon {
    font-size: 2.5rem;
    animation: heartbeat 1s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

/* Rhythm Pattern Display */
.rhythm-pattern {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 25px 0;
}

.rhythm-phase {
    padding: 15px 20px;
    border-radius: 12px;
    text-align: center;
    min-width: 100px;
}

.rhythm-phase.inhale {
    background: linear-gradient(135deg, #B8E6FF, #89D4FF);
}

.rhythm-phase.hold {
    background: linear-gradient(135deg, #FFE5B4, #FFD485);
}

.rhythm-phase.exhale {
    background: linear-gradient(135deg, #D4B8FF, #B389FF);
}

.rhythm-phase.rest {
    background: linear-gradient(135deg, #B8FFD4, #89FFAB);
}

.phase-name {
    display: block;
    font-weight: bold;
    font-size: 1rem;
    color: var(--text-color);
}

.phase-count {
    display: block;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 5px;
}

.rhythm-arrow {
    font-size: 1.5rem;
    color: var(--text-light);
}

/* ============================================
   Video Demonstration (Step 5)
   ============================================ */
.video-demo {
    background: var(--white);
    padding: 25px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
    text-align: center;
}

.video-demo h3 {
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.video-demo video {
    width: 100%;
    max-width: 500px;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

/* ============================================
   Practice Container (Step 5)
   ============================================ */
.practice-container {
    text-align: center;
}

.breathing-circle-container {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto 30px;
}

.breathing-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.breathing-circle.inhale {
    animation: expandCircle var(--inhale-time) ease-in-out forwards;
}

.breathing-circle.hold {
    transform: translate(-50%, -50%) scale(1.3);
}

.breathing-circle.exhale {
    animation: contractCircle var(--exhale-time) ease-in-out forwards;
}

.breathing-circle.rest {
    transform: translate(-50%, -50%) scale(1);
}

@keyframes expandCircle {
    from {
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        transform: translate(-50%, -50%) scale(1.3);
    }
}

@keyframes contractCircle {
    from {
        transform: translate(-50%, -50%) scale(1.3);
    }
    to {
        transform: translate(-50%, -50%) scale(1);
    }
}

.inner-circle {
    width: 80%;
    height: 80%;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.breath-instruction {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--primary-dark);
}

.breath-count {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 5px;
}

.glow-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    border-radius: 50%;
    border: 3px solid rgba(107, 141, 214, 0.3);
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

/* Practice Controls */
.practice-controls {
    background: var(--white);
    padding: 25px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.settings-panel {
    margin-bottom: 20px;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.setting-row label {
    font-weight: 500;
}

.setting-row select {
    padding: 10px 15px;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    color: var(--text-color);
    cursor: pointer;
}

.start-btn {
    width: 100%;
    padding: 18px 30px;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.breath-counter {
    font-size: 1.2rem;
    color: var(--text-light);
    padding: 10px;
    background: var(--calm-blue);
    border-radius: 10px;
}

/* Practice Tips */
.practice-tips {
    background: var(--white);
    padding: 20px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    text-align: left;
}

.practice-tips ul {
    list-style: none;
    padding-left: 0;
}

.practice-tips li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.practice-tips li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

/* ============================================
   Benefits Grid (Step 6)
   ============================================ */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.benefit-item {
    text-align: center;
    padding: 20px 15px;
    background: linear-gradient(135deg, var(--calm-blue) 0%, #fff 100%);
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.benefit-item:hover {
    transform: translateY(-5px);
}

.benefit-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.benefit-item h4 {
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.benefit-item p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Quote Box */
.quote-box {
    background: linear-gradient(135deg, var(--soft-purple) 0%, var(--warm-peach) 100%);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    margin: 25px 0;
    border-left: 5px solid var(--primary-color);
}

.quote {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-color);
    margin-bottom: 10px;
}

.quote-author {
    font-size: 0.95rem;
    color: var(--text-light);
}

/* When to Practice */
.when-to-practice {
    margin-top: 25px;
}

.practice-times {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.practice-time {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.time-icon {
    font-size: 1.5rem;
}

/* ============================================
   Completion Card (Step 7)
   ============================================ */
.completion-card {
    text-align: center;
}

.celebration {
    padding: 20px;
}

.trophy {
    font-size: 4rem;
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

.celebration h3 {
    font-size: 1.8rem;
    color: var(--primary-dark);
}

.daily-practice {
    text-align: left;
    margin: 30px 0;
    padding: 25px;
    background: var(--calm-blue);
    border-radius: 15px;
}

.practice-routine {
    margin-top: 20px;
}

.routine-step {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: flex-start;
}

.routine-number {
    width: 35px;
    height: 35px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.routine-content strong {
    display: block;
    color: var(--primary-dark);
}

.routine-content p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0;
}

.final-tips {
    text-align: left;
    margin: 25px 0;
}

.final-tips ul {
    list-style: none;
}

.final-tips li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    font-size: 1.05rem;
}

.final-tips li::before {
    content: '🌟';
    position: absolute;
    left: 0;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 25px;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(107, 141, 214, 0.4);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 141, 214, 0.5);
}

.secondary-btn {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.secondary-btn:hover {
    background: var(--calm-blue);
}

.demo-btn {
    background: linear-gradient(135deg, var(--secondary-color), #7BC998);
    color: white;
    padding: 12px 24px;
}

.btn.large {
    padding: 18px 40px;
    font-size: 1.2rem;
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 20px;
}

/* ============================================
   Contact Form Section
   ============================================ */
.contact-section {
    background: linear-gradient(135deg, var(--calm-blue) 0%, var(--soft-purple) 100%);
    padding: 60px 20px;
}

.contact-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-section h2 {
    color: var(--primary-dark);
    font-size: 2rem;
    margin-bottom: 10px;
}

.contact-intro {
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.contact-form {
    background: var(--white);
    padding: 35px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--primary-dark);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e6ed;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #fafbfc;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(107, 141, 214, 0.15);
    background: var(--white);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #a0aec0;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    margin-top: 10px;
    cursor: pointer;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   Footer
   ============================================ */
footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-light);
    font-size: 0.9rem;
}

footer em {
    color: var(--primary-color);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    #welcome-screen h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    .content-card {
        padding: 20px;
    }

    .rhythm-pattern {
        flex-direction: column;
    }

    .rhythm-arrow {
        transform: rotate(90deg);
    }

    .breathing-circle-container {
        width: 240px;
        height: 240px;
    }

    .breathing-circle {
        width: 160px;
        height: 160px;
    }

    .breath-instruction {
        font-size: 1.1rem;
    }

    .breath-count {
        font-size: 2rem;
    }

    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .posture-demo {
        gap: 20px;
    }

    .figure-body {
        width: 60px;
        height: 90px;
    }

    .nav-buttons {
        flex-direction: column;
    }

    .nav-buttons .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    #welcome-screen h1 {
        font-size: 1.8rem;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .practice-times {
        grid-template-columns: 1fr;
    }

    .setting-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .setting-row select {
        width: 100%;
    }
}

/* ============================================
   Accessibility
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus states for keyboard navigation */
.btn:focus,
select:focus,
input:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
