/* =====================================================
   🥔 PATATIA™
   STYLE COMPLET
   ===================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


body {

    min-height: 100vh;

    font-family:
        Inter,
        Arial,
        Helvetica,
        sans-serif;

    background: #f5f5f7;

    color: #222;

}


.background {

    position: fixed;

    inset: 0;

    z-index: -1;

    background:
        radial-gradient(
            circle at top left,
            #fff3c4,
            transparent 35%
        ),

        radial-gradient(
            circle at bottom right,
            #ffe0a3,
            transparent 35%
        );

}


.app {

    width: min(
        950px,
        calc(100% - 30px)
    );

    margin: 30px auto;

    background: rgba(255,255,255,.96);

    border: 1px solid #e8e8e8;

    border-radius: 24px;

    box-shadow:
        0 20px 60px rgba(0,0,0,.10);

    overflow: hidden;

}


/* =====================================================
   HEADER
   ===================================================== */

.header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

    padding: 20px 25px;

    border-bottom: 1px solid #eeeeee;

}


.brand {

    display: flex;

    align-items: center;

    gap: 14px;

}


.logo {

    width: 75px;

    height: 75px;

    object-fit: contain;

    border-radius: 18px;

}


.brand-text h1 {

    font-size: 30px;

    font-weight: 900;

    letter-spacing: -1px;

}


.brand-text p {

    margin-top: 3px;

    color: #777;

    font-size: 14px;

}


.status {

    display: flex;

    align-items: center;

    gap: 8px;

    padding: 9px 13px;

    border-radius: 999px;

    background: #f7f7f7;

    color: #555;

    font-size: 13px;

    white-space: nowrap;

}


.status-dot {

    width: 9px;

    height: 9px;

    border-radius: 50%;

    background: #36c759;

    box-shadow:
        0 0 10px rgba(54,199,89,.5);

}


/* =====================================================
   CONTENU
   ===================================================== */

.content {

    padding: 30px;

}


.welcome {

    text-align: center;

    padding: 10px 0 25px;

}


.big-potato {

    font-size: 70px;

    margin-bottom: 10px;

    animation:
        potatoFloat 3s ease-in-out infinite;

}


@keyframes potatoFloat {

    0%,
    100% {
        transform:
            translateY(0)
            rotate(0deg);
    }

    50% {
        transform:
            translateY(-8px)
            rotate(3deg);
    }

}


.welcome h2 {

    font-size: 26px;

    margin-bottom: 7px;

}


.welcome p {

    color: #777;

}


/* =====================================================
   CHAT
   ===================================================== */

.chat {

    height: 450px;

    overflow-y: auto;

    padding: 20px;

    background: #fafafa;

    border: 1px solid #eeeeee;

    border-radius: 18px;

    scroll-behavior: smooth;

}


.chat::-webkit-scrollbar {

    width: 7px;

}


.chat::-webkit-scrollbar-thumb {

    background: #d7d7d7;

    border-radius: 20px;

}


/* =====================================================
   MESSAGES
   ===================================================== */

.message {

    display: flex;

    margin-bottom: 18px;

    gap: 10px;

}


.message.ai {

    justify-content: flex-start;

}


.message.user {

    justify-content: flex-end;

}


.avatar {

    flex: 0 0 auto;

    width: 38px;

    height: 38px;

    display: flex;

    justify-content: center;

    align-items: center;

    border-radius: 50%;

    background: #fff1c7;

    font-size: 21px;

}


.bubble {

    max-width:
        min(75%, 600px);

    padding: 13px 16px;

    border-radius: 17px;

    line-height: 1.5;

    word-wrap: break-word;

}


.message.ai .bubble {

    background: white;

    border: 1px solid #eeeeee;

}


.message.user .bubble {

    background: #222;

    color: white;

    border-radius:
        17px 17px 4px 17px;

}


.bubble img {

    display: block;

    max-width: 100%;

    height: auto;

}


/* =====================================================
   INPUT
   ===================================================== */

.input-area {

    display: flex;

    gap: 10px;

    margin-top: 15px;

}


.input-area input {

    flex: 1;

    min-width: 0;

    height: 52px;

    padding: 0 17px;

    border: 1px solid #ddd;

    border-radius: 14px;

    outline: none;

    font-size: 15px;

    background: white;

    transition: .2s;

}


.input-area input:focus {

    border-color: #b98a4a;

    box-shadow:
        0 0 0 3px rgba(185,138,74,.12);

}


.input-area button {

    height: 52px;

    padding: 0 20px;

    border: none;

    border-radius: 14px;

    font-weight: 700;

    cursor: pointer;

    transition: .2s;

}


#send {

    background: #222;

    color: white;

}


#send:hover {

    background: #3a3a3a;

    transform: translateY(-1px);

}


.voice-button {

    width: 52px;

    padding: 0 !important;

    background: #f1f1f1;

    font-size: 21px;

}


.voice-button:hover {

    background: #e5e5e5;

}


.voice-button.listening {

    background: #ffdddd;

    animation:
        pulse 1s infinite;

}


@keyframes pulse {

    0% {
        box-shadow:
            0 0 0 0 rgba(255,0,0,.25);
    }

    70% {
        box-shadow:
            0 0 0 10px rgba(255,0,0,0);
    }

    100% {
        box-shadow:
            0 0 0 0 rgba(255,0,0,0);
    }

}


/* =====================================================
   OUTILS
   ===================================================== */

.tools {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-top: 13px;

    color: #777;

    font-size: 14px;

}


#clear {

    border: none;

    background: transparent;

    color: #777;

    cursor: pointer;

    font-size: 14px;

}


#clear:hover {

    color: #d33;

}


/* =====================================================
   FOOTER
   ===================================================== */

footer {

    padding: 24px 20px;

    text-align: center;

    color: #999;

    font-size: 12px;

    border-top: 1px solid #eeeeee;

}


/* =====================================================
   DISCORD
   ===================================================== */

.discord-button {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    padding: 12px 20px;

    background: #5865F2;

    color: white;

    text-decoration: none;

    font-weight: 700;

    font-size: 14px;

    border-radius: 12px;

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        background .2s ease;

}


.discord-button:hover {

    background: #4752C4;

    transform: translateY(-2px);

    box-shadow:
        0 8px 20px rgba(88,101,242,.25);

}


.discord-button:active {

    transform: translateY(0);

}


.footer-text {

    margin-top: 16px;

    line-height: 1.7;

}


/* =====================================================
   MOBILE
   ===================================================== */

@media (max-width: 700px) {

    .app {

        width: calc(100% - 14px);

        margin: 7px auto;

        border-radius: 18px;

    }


    .header {

        flex-direction: column;

        align-items: flex-start;

    }


    .status {

        align-self: flex-start;

    }


    .content {

        padding: 15px;

    }


    .chat {

        height: 50vh;

    }


    .input-area {

        flex-wrap: wrap;

    }


    .input-area input {

        width: 100%;

        flex: 1 1 100%;

    }


    #send {

        flex: 1;

    }


    .voice-button {

        width: 52px;

    }


    .bubble {

        max-width: 85%;

    }


    .brand-text h1 {

        font-size: 25px;

    }

}