/* --- General Styles --- */
body {
    font-family: 'Lato', sans-serif;
    line-height: 1.6;
    margin: 0;
    color: #333;
    background-color: #f4f7f6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-weight: 400;
    color: #0a4d68;
}

a {
    color: #088395;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* --- Header --- */
.main-header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 700;
    color: #0a4d68;
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.logo:hover {
    text-decoration: none;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.main-nav li {
    margin-left: 25px;
}

.main-nav a {
    font-size: 16px;
    color: #333;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    transition: color 0.3s, border-bottom-color 0.3s;
}

.main-nav a:hover, .main-nav a.active {
    color: #088395;
    border-bottom-color: #088395;
    text-decoration: none;
}

.nav-donate {
    background-color: #088395;
    color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    border-bottom: none !important;
}

.nav-donate:hover {
    background-color: #0a4d68;
    color: #fff;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(to right, #e0f7fa, #b2ebf2);
    color: #0a4d68;
    text-align: center;
    padding: 80px 20px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
}

.btn {
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-primary {
    background-color: #088395;
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    text-decoration: none;
}

/* --- Intro & Features --- */
.intro, .features {
    padding: 60px 0;
    text-align: center;
}

.intro h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.intro p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 18px;
}

.features .container {
    display: flex;
    justify-content: space-around;
    gap: 30px;
    flex-wrap: wrap;
}

.feature-item {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    flex-basis: 30%;
    min-width: 280px;
}

.feature-item h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

/* --- Interactive Tools --- */
.interactive-tool {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: center;
    margin-top: 20px;
}

#breathing-exercise {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 350px;
}

#breathing-circle {
    width: 150px;
    height: 150px;
    background-color: #088395;
    border-radius: 50%;
    transition: transform 4s ease-in-out, background-color 2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

#breathing-text {
    font-size: 22px;
    margin-top: 20px;
    color: #0a4d68;
    font-weight: 700;
}

#grounding-tool {
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#grounding-step-display h3 {
    font-size: 28px;
    color: #0a4d68;
}

#grounding-step-display p {
    font-size: 18px;
    min-height: 50px;
}

.grounding-nav {
    margin-top: 20px;
}


/* --- Games Section --- */
.games-section .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.game-item {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: center;
}

#zen-garden-canvas {
    background-color: #f0e5d1;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><circle cx="16" cy="16" r="14" fill="none" stroke="rgba(0,0,0,0.5)" stroke-width="2"/></svg>') 16 16, auto;
    border-radius: 5px;
}

#color-touch-game {
    height: 300px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.color-circle {
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.3s;
}

.color-circle:hover {
    transform: scale(1.1);
}

#color-game-reset {
    margin-top: 10px;
}


/* --- Video Gallery --- */
.video-gallery .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.video-item {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.video-item h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}


/* --- Chat Widget --- */
#chat-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #088395;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.3s;
}

#chat-icon:hover {
    transform: scale(1.1);
}

#chat-icon img {
    width: 35px;
    height: 35px;
}

#chat-widget {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    max-width: 90%;
    height: 500px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.3s, transform 0.3s;
}

#chat-widget.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

#chat-header {
    background: #0a4d68;
    color: #fff;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#chat-header h3 {
    margin: 0;
    color: #fff;
}

#close-chat {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

#chat-body {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-message {
    padding: 10px 15px;
    border-radius: 15px;
    max-width: 80%;
}

.chat-message.bot {
    background: #e0f7fa;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.chat-message.user {
    background: #088395;
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.chat-message .disclaimer {
    font-size: 12px;
    font-style: italic;
    margin-top: 10px;
    color: #555;
}

#chat-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid #eee;
}

#user-input {
    flex-grow: 1;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 14px;
}

#send-btn {
    background: #088395;
    color: #fff;
    border: none;
    padding: 0 20px;
    border-radius: 20px;
    margin-left: 10px;
    cursor: pointer;
}


/* --- Footer --- */
.main-footer {
    background-color: #0a4d68;
    color: #e0f7fa;
    padding: 30px 0;
    text-align: center;
}

.main-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-nav a {
    color: #e0f7fa;
    margin-left: 20px;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .main-nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: #fff;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }

    .main-nav ul.active {
        display: flex;
    }

    .main-nav li {
        margin: 15px 0;
        text-align: center;
    }

    .nav-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 36px;
    }

    .features .container {
        flex-direction: column;
        align-items: center;
    }

    .main-footer .container {
        flex-direction: column;
    }

    .main-footer p {
        margin-bottom: 15px;
    }
}
