:root {
    --primary: #5d93a6;
    --secondary: #a6dcef;
    --dark: #2a4e68;
    --light: #f0f8ff;
    --accent: #ff9e7d;
    --text: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light);
    color: var(--text);
    line-height: 1.6;
}

header {
    background: linear-gradient(135deg, var(--primary), var(--dark));
    color: white;
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    height: 50px;
}

.logoname {
    font-size: 1.8rem;
    font-weight: bold;
}

.slogan {
    font-style: italic;
    opacity: 0.8;
    font-size: 0.9rem;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 1rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    padding: 0 1rem;
}

.nav-menu li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav-menu li a:hover {
    opacity: 0.9;
}

.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), 
                url('https://source.unsplash.com/random/1600x900/?calm');
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-bottom: 2rem;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

button, .btn, .cta, .moods button, #send-message, #start-breathing, [type="submit"] {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    font-family: inherit;
    font-size: 1rem;
    border: 2px solid transparent;
}

button:hover, .btn:hover, .cta:hover, .moods button:hover, 
#send-message:hover, #start-breathing:hover, [type="submit"]:hover {
    background: white;
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

button:active, .btn:active, .cta:active, .moods button:active, 
#send-message:active, #start-breathing:active, [type="submit"]:active {
    transform: translateY(0);
    box-shadow: none;
}

.cta {
    background: var(--accent);
    padding: 0.8rem 2rem;
    border-radius: 50px;
}

.moods button {
    background: var(--secondary);
    color: var(--dark);
    padding: 1rem;
    font-size: 1rem;
}

.start-exercise {
    background: var(--accent);
}

.start-exercise:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.read-btn {
    margin-top: 0.5rem;
    }

.cta {
    cursor: pointer;
    font-weight: bold;
    margin-top: 1rem;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s, box-shadow 0.3s;
}

#breathing-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: var(--primary);
    margin: 2rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 1s ease;
    position: relative;
    overflow: hidden;
}

#breathing-circle::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

#breathing-circle.breathing-in::before {
    opacity: 1;
}

#breathing-text {
    font-size: 1.2rem;
    font-weight: 500;
    z-index: 1;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.breathing-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
    flex-wrap: wrap;
}

#breathing-pattern {
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--primary);
    background: white;
    font-family: inherit;
    min-width: 200px;
}

.breathing-instructions {
    margin-top: 2rem;
    text-align: left;
    padding: 1rem;
    background: rgba(166, 220, 239, 0.2);
    border-radius: 10px;
}

.breathing-instructions ul {
    padding-left: 1.5rem;
    margin-top: 0.5rem;
}

.breathing-instructions li {
    margin-bottom: 0.5rem;
}

/* Animation for different states */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.breathing-active {
    animation: pulse 4s infinite ease-in-out;
}

.exercise-list {
    margin: 1rem 0;
    padding-left: 1.2rem;
    font-size: 0.9rem;
}

.exercise-list li {
    margin-bottom: 0.5rem;
    position: relative;
}

.exercise-list li::before {
    content: '•';
    color: var(--primary);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

.exercise-thumbnail {
    width: 100%;
    border-radius: 8px;
    margin-top: 1rem;
    height: 120px;
    object-fit: cover;
}

.exercise-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--accent);
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
}

footer {
    background: var(--dark);
    color: white;
    padding: 2rem;
    text-align: center;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.grounding-container {
    max-width: 600px;
    margin: 1rem auto;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.grounding-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.grounding-step.active {
    display: block;
}

.grounding-step h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.grounding-inputs {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.grounding-inputs input {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.grounding-inputs input:focus {
    border-color: var(--primary);
    outline: none;
}

.grounding-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
}

.step-counter {
    font-weight: bold;
    color: var(--dark);
}

.completion-message {
    text-align: center;
    font-size: 1.1rem;
    margin-top: 1rem;
    color: var(--primary);
    font-weight: bold;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--dark);
        padding: 1rem;
        z-index: 100;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
}
