/* =========================================================
   TRGPT – STYLE
========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    height: 100%;
}

body {
    font-family: Arial, sans-serif;
    color: white;

    background-color: #050a14;

    /* BREITES BILD – PC + iPAD */
    background-image:
        linear-gradient(
            rgba(3, 9, 20, 0.45),
            rgba(3, 9, 20, 0.45)
        ),
        url("/static/background.png");

    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;

    overflow: hidden;
}


/* =========================================================
   APP
========================================================= */

.app {
    width: 100%;
    height: 100vh;

    display: flex;
    flex-direction: column;

    background: rgba(0, 0, 0, 0.08);
}


/* =========================================================
   HEADER
========================================================= */

header {
    flex-shrink: 0;

    padding: 20px;

    text-align: center;

    background: rgba(7, 14, 28, 0.78);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    border-bottom: 1px solid rgba(255, 255, 255, 0.12);

    box-shadow:
        0 5px 25px rgba(0, 0, 0, 0.25);
}

header h1 {
    font-size: 30px;

    margin-bottom: 5px;

    letter-spacing: 0.5px;
}

header p {
    color: #b9c3d4;

    font-size: 14px;
}


/* =========================================================
   CHAT
========================================================= */

#chat {
    flex: 1;

    min-height: 0;

    overflow-y: auto;

    padding: 30px;

    display: flex;
    flex-direction: column;

    gap: 18px;

    scroll-behavior: smooth;
}


/* =========================================================
   NACHRICHTEN
========================================================= */

.message {
    max-width: 800px;

    padding: 16px 19px;

    border-radius: 18px;

    line-height: 1.5;

    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);

    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.25);

    border: 1px solid rgba(255, 255, 255, 0.08);
}

.message strong {
    display: block;

    margin-bottom: 6px;

    font-size: 17px;
}

.message p {
    white-space: pre-wrap;

    word-wrap: break-word;

    font-size: 16px;
}


/* =========================================================
   TRGPT
========================================================= */

.bot {
    align-self: flex-start;

    background: rgba(18, 27, 45, 0.82);
}


/* =========================================================
   BENUTZER
========================================================= */

.user {
    align-self: flex-end;

    background: rgba(37, 99, 235, 0.90);

    border-color:
        rgba(255, 255, 255, 0.10);
}


/* =========================================================
   GENERIERTE BILDER
========================================================= */

.message img {
    display: block;

    width: 100%;

    max-width: 800px;

    height: auto;

    margin-top: 12px;

    border-radius: 15px;

    box-shadow:
        0 10px 35px rgba(0, 0, 0, 0.45);
}


/* =========================================================
   EINGABEBEREICH
========================================================= */

.input-area {
    flex-shrink: 0;

    display: flex;

    gap: 10px;

    padding: 20px;

    background: rgba(7, 14, 28, 0.82);

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    border-top:
        1px solid rgba(255, 255, 255, 0.12);

    box-shadow:
        0 -5px 25px rgba(0, 0, 0, 0.20);
}


/* =========================================================
   TEXTFELD
========================================================= */

#message {
    flex: 1;

    min-width: 0;

    padding: 15px 17px;

    border:
        1px solid rgba(255, 255, 255, 0.18);

    border-radius: 14px;

    background: rgba(3, 9, 20, 0.78);

    color: white;

    outline: none;

    font-size: 16px;

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}

#message::placeholder {
    color: #aeb7c7;
}

#message:focus {
    border-color: #3b82f6;

    box-shadow:
        0 0 0 2px rgba(59, 130, 246, 0.15);
}


/* =========================================================
   SENDEN BUTTON
========================================================= */

button {
    flex-shrink: 0;

    padding: 0 25px;

    border: none;

    border-radius: 14px;

    background: #2563eb;

    color: white;

    font-size: 16px;

    cursor: pointer;

    transition:
        background 0.2s,
        transform 0.2s,
        box-shadow 0.2s;
}

button:hover {
    background: #1d4ed8;

    transform: translateY(-1px);

    box-shadow:
        0 6px 20px rgba(37, 99, 235, 0.35);
}

button:active {
    transform: scale(0.98);
}


/* =========================================================
   SCROLLBAR
========================================================= */

#chat::-webkit-scrollbar {
    width: 8px;
}

#chat::-webkit-scrollbar-track {
    background: transparent;
}

#chat::-webkit-scrollbar-thumb {
    background:
        rgba(255, 255, 255, 0.20);

    border-radius: 10px;
}

#chat::-webkit-scrollbar-thumb:hover {
    background:
        rgba(255, 255, 255, 0.30);
}


/* =========================================================
   IPAD / TABLET
   -> BLEIBT BEIM BREITEN BILD
========================================================= */

@media (min-width: 601px) and (max-width: 1100px) {

    body {
        background-image:
            linear-gradient(
                rgba(3, 9, 20, 0.45),
                rgba(3, 9, 20, 0.45)
            ),
            url("/static/background.png");

        background-size: cover;

        background-position: center center;

        background-repeat: no-repeat;

        background-attachment: scroll;
    }

    #chat {
        padding: 22px;
    }

    .message {
        max-width: 85%;
    }
}


/* =========================================================
   HANDY
   -> HOCHFORMAT-BILD
========================================================= */

@media (max-width: 600px) {

    body {
        background-image:
            linear-gradient(
                rgba(3, 9, 20, 0.32),
                rgba(3, 9, 20, 0.32)
            ),
            url("/static/background-mobile.png");

        background-size: cover;

        background-position: center center;

        background-repeat: no-repeat;

        background-attachment: scroll;
    }

    .app {
        height: 100dvh;
    }

    header {
        padding: 15px;
    }

    header h1 {
        font-size: 25px;
    }

    header p {
        font-size: 12px;
    }

    #chat {
        padding: 15px;

        gap: 14px;
    }

    .message {
        max-width: 90%;

        padding: 14px 16px;

        border-radius: 16px;
    }

    .message strong {
        font-size: 16px;
    }

    .message p {
        font-size: 15px;
    }

    .input-area {
        padding: 10px;

        gap: 8px;
    }

    #message {
        padding: 14px;

        font-size: 16px;

        border-radius: 13px;
    }

    button {
        padding: 0 18px;

        border-radius: 13px;

        font-size: 16px;
    }
}


/* =========================================================
   SEHR KLEINE HANDYS
========================================================= */

@media (max-width: 380px) {

    header h1 {
        font-size: 23px;
    }

    .message {
        max-width: 94%;
    }

    button {
        padding: 0 15px;
    }
}