:root {
    --maui-blue: #003366;
    --maui-teal: #00ced1;
    --maui-aqua: #20b2aa;
    --sand-light: #fdf5e6;
    --sky-blue: #87ceeb;
}

body {
    font-family: "Georgia", serif;
    margin: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--sand-light);
    overflow: hidden;
    background: linear-gradient(
        135deg,
        var(--maui-blue),
        #005f99,
        var(--sky-blue),
        var(--maui-blue)
    );
    background-size: 400% 400%;
    animation: waterFlow 15s ease infinite;
}

@keyframes waterFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#vanta-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

#header {
    text-align: center;
    padding: 15px;
    background: rgba(0, 25, 50, 0.8);
    width: 100%;
    border-bottom: 2px solid var(--maui-teal);
    backdrop-filter: blur(10px);
}

#char-img {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    border: 3px solid var(--maui-teal);
    box-shadow: 0 0 15px var(--maui-aqua);
}

#chat-box {
    width: 90%;
    max-width: 500px;
    flex-grow: 1;
    overflow-y: auto;
    background: rgba(0, 10, 30, 0.75);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid var(--maui-teal);
    display: flex;
    flex-direction: column;
}

.bubble {
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 12px;
    line-height: 1.5;
    font-size: 1.05rem;
}

.ai {
    background: rgba(0, 206, 209, 0.2);
    border: 1.5px solid var(--maui-teal);
    color: #e0ffff;
    align-self: flex-start;
}

.user {
    background: rgba(255, 255, 255, 0.1);
    text-align: right;
    border-right: 4px solid #999;
    align-self: flex-end;
    color: white;
}

#input-area {
    width: 90%;
    max-width: 500px;
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    z-index: 10;
}

input {
    flex-grow: 1;
    padding: 12px;
    border-radius: 20px;
    border: 1.5px solid var(--maui-teal);
    background: #001a33;
    color: white;
    outline: none;
}

button {
    background: var(--maui-teal);
    border: none;
    color: #002b5c;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
}

#typing-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 25, 50, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.glow-text {
    font-size: 2.5rem;
    color: var(--maui-teal);
    text-shadow: 0 0 20px var(--maui-aqua);
    animation: pulseGlow 1.5s ease-in-out infinite;
    font-weight: bold;
    letter-spacing: 3px;
}

@keyframes pulseGlow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
        text-shadow: 0 0 10px var(--maui-teal);
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
        text-shadow: 0 0 30px var(--maui-teal), 0 0 50px var(--maui-aqua);
    }
}

footer {
    font-size: 0.75rem;
    color: #bbb;
    padding-bottom: 10px;
    z-index: 10;
}
