:root {
    --bg: #05070f;
    --accent: #00ffd5;
    --bot: #7aa2ff;
}

body {
    background: radial-gradient(circle at top, #10142a, var(--bg));
    color: #eaeaff;
    font-family: system-ui, sans-serif;
    text-align: center;
}

/* ---------------- HEADER ---------------- */

h1 {
    margin-bottom: 6px;
}

/* ---------------- STATUS ---------------- */

#status {
    font-size: 14px;
    opacity: 0.85;
    margin-bottom: 10px;
}

/* ---------------- BOT AVATAR ---------------- */

#bot-wrap {
    width: 160px;
    height: 160px;
    margin: 10px auto 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#bot-avatar {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    filter: drop-shadow(0 0 20px rgba(0, 255, 213, 0.35));
    animation: breathe 4s ease-in-out infinite;
    transition: transform 0.25s, filter 0.25s;
}

#bot-avatar.speaking {
    transform: scale(1.1);
    filter: drop-shadow(0 0 35px rgba(122, 162, 255, 0.9));
}

/* ---------------- CONTROLS ---------------- */

#controls {
    margin: 12px 0;
}

/* ---------------- MIC INDICATOR ---------------- */

#mic {
    width: 14px;
    height: 14px;
    margin: 10px auto;
    border-radius: 50%;
    background: #444;
}

#mic.active {
    background: var(--accent);
    box-shadow: 0 0 18px var(--accent);
    animation: pulse 1.2s infinite;
}

/* ---------------- WAVEFORM ---------------- */

.wave-wrapper {
    width: 100%;
    max-width: 600px;
}

canvas {
    width: 100%;
    height: 140px;
    background: linear-gradient(180deg, #040716, #02030a);
    border-radius: 10px;
}

/* ---------------- CHAT ---------------- */

#chat {
    max-width: 600px;
    margin: 18px auto;
    text-align: left;
}

.msg {
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 8px;
    max-width: 85%;
    animation: fadeUp 0.25s ease;
}

.user {
    background: #1b2244;
    margin-left: auto;
}

.bot {
    background: #141a33;
    color: var(--bot);
}

/* ---------------- ANIMATIONS ---------------- */

@keyframes pulse {
    0% {
        box-shadow: 0 0 6px rgba(0, 255, 213, 0.4);
    }

    50% {
        box-shadow: 0 0 18px rgba(0, 255, 213, 1);
    }

    100% {
        box-shadow: 0 0 6px rgba(0, 255, 213, 0.4);
    }
}

@keyframes breathe {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   RESPONSIVE BREAKPOINTS
========================================================= */

/* Mobile */
@media (max-width: 576px) {
    h1 {
        font-size: 1.4rem;
    }

    #bot-wrap {
        width: 120px;
        height: 120px;
    }

    #bot-avatar {
        width: 100px;
        height: 100px;
    }

    canvas {
        height: 110px;
    }

    .msg {
        max-width: 95%;
        font-size: 14px;
    }
}

/* Tablet */
@media (max-width: 768px) {
    canvas {
        height: 120px;
    }
}