* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family:
        Inter,
        Arial,
        Helvetica,
        sans-serif;

    background:
        radial-gradient(
            circle at center,
            #171923 0%,
            #090a0f 55%,
            #050506 100%
        );

    color: white;
}


body {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
}


.voice-app {
    width: 100%;

    min-height: 100vh;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    padding: 30px;
}


.brand {
    position: absolute;

    top: 30px;

    font-size: 15px;
    font-weight: 700;

    letter-spacing: 8px;

    opacity: 0.65;
}


/* ============================================================
   ORB
============================================================ */

.orb {
    position: relative;

    width: 260px;
    height: 260px;

    display: flex;
    align-items: center;
    justify-content: center;

    transition:
        transform 0.4s ease,
        filter 0.4s ease;
}


.orb-layer {
    position: absolute;

    width: 190px;
    height: 190px;

    border-radius: 45% 55% 58% 42% / 50% 44% 56% 50%;

    background:
        linear-gradient(
            135deg,
            #8e7dff,
            #5fd6ff,
            #d167ff
        );

    filter: blur(4px);

    opacity: 0.8;
}


.layer-one {
    animation:
        morphOne 6s ease-in-out infinite,
        rotateOne 9s linear infinite;
}


.layer-two {
    width: 175px;
    height: 175px;

    opacity: 0.55;

    animation:
        morphTwo 5s ease-in-out infinite,
        rotateTwo 8s linear infinite reverse;
}


.orb-core {
    width: 125px;
    height: 125px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle at 35% 30%,
            #ffffff,
            #9ee7ff 15%,
            #7b76ff 45%,
            #5f36aa 100%
        );

    box-shadow:
        0 0 50px rgba(103, 126, 255, 0.65),
        0 0 110px rgba(163, 73, 255, 0.35);

    animation:
        coreFloat 3s ease-in-out infinite;
}


/* ============================================================
   STATES
============================================================ */

.orb.listening {
    transform: scale(1.08);
}

.orb.listening .orb-layer {
    animation-duration: 2.5s;
}

.orb.listening .orb-core {
    box-shadow:
        0 0 70px rgba(91, 203, 255, 0.85),
        0 0 130px rgba(100, 97, 255, 0.55);
}


.orb.thinking .orb-layer {
    animation-duration: 1.2s;
}

.orb.thinking {
    transform: scale(0.95);
}


.orb.speaking {
    animation:
        speakingPulse 0.55s ease-in-out infinite alternate;
}


.orb.speaking .orb-layer {
    animation-duration: 1.5s;
}


@keyframes speakingPulse {

    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.10);
    }
}


@keyframes coreFloat {

    0%,
    100% {
        transform: translateY(-4px);
    }

    50% {
        transform: translateY(5px);
    }
}


@keyframes rotateOne {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}


@keyframes rotateTwo {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}


@keyframes morphOne {

    0%,
    100% {
        border-radius:
            45% 55% 58% 42%
            /
            50% 44% 56% 50%;
    }

    50% {
        border-radius:
            58% 42% 45% 55%
            /
            42% 60% 40% 58%;
    }
}


@keyframes morphTwo {

    0%,
    100% {
        border-radius:
            55% 45% 42% 58%
            /
            48% 58% 42% 52%;
    }

    50% {
        border-radius:
            42% 58% 60% 40%
            /
            60% 40% 55% 45%;
    }
}


/* ============================================================
   TEXT
============================================================ */

.status {
    margin-top: 15px;

    font-size: 19px;

    font-weight: 600;

    letter-spacing: 0.4px;
}


.subtitle {
    min-height: 25px;

    margin-top: 8px;

    color: #999eae;

    font-size: 14px;
}


/* ============================================================
   BUTTONS
============================================================ */

.voice-button,
.stop-button {

    margin-top: 28px;

    border: 0;

    min-width: 150px;
    min-height: 48px;

    padding: 0 24px;

    border-radius: 999px;

    font-size: 15px;

    cursor: pointer;
}


.voice-button {
    background: white;
    color: black;
}


.stop-button {

    background: #20222a;

    color: white;

    border: 1px solid #343640;
}


.conversation {

    position: absolute;

    bottom: 30px;

    width: min(
        600px,
        calc(100% - 40px)
    );

    text-align: center;

    font-size: 13px;

    color: #777d8d;
}


.conversation-line {
    margin: 5px;
}


.ace-line {
    color: #a7acbc;
}


@media (max-width: 600px) {

    .orb {
        width: 220px;
        height: 220px;
    }

    .orb-layer {
        width: 160px;
        height: 160px;
    }

    .layer-two {
        width: 145px;
        height: 145px;
    }

    .orb-core {
        width: 105px;
        height: 105px;
    }

}