/* ===== BASE ===== */
html {
    height: 100%;
}

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    background: radial-gradient(circle at top, #111827, #0f172a 60%);
    font-family: "Segoe UI", sans-serif;
    color: #e2e8f0;
    overscroll-behavior: contain;
}
/* ===== CHAT ===== */

.chat {
    flex: 1;
    overflow-y: auto;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 14px;

    scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
}

/* Scroll Chrome */
.chat::-webkit-scrollbar {
    width: 6px;
}

.chat::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

/* ===== MENSAGEM ===== */

.message {
    display: flex;
    flex-direction: column;
}

/* Header (Nome + Data) */
.message-header {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 2px;
}

/* Nome maior */
.message-author {
    font-weight: 700;
    font-size: 15px;
}
/* Espaço extra quando muda o autor */
.message.break {
    margin-top: 6px;
}
.user-author {
    color: #38bdf8;
}

.bot-author {
    color: #22c55e;
}

/* Data + hora */
.message-datetime {
    font-size: 12px;
    color: #64748b;
}

/* Texto */
.message-text {
    font-size: 14px;
    line-height: 1.5;
    color: #e2e8f0;
    word-break: break-word;
}

/* ===== FORM ===== */

form {
    display: flex;
    padding: 15px;
    background: #1e293b;
    border-top: 1px solid #334155;
}

form input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    outline: none;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 16px;
}

form button {
    margin-left: 10px;
    padding: 10px 20px;
    background: #22c55e;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: #0f172a;
    font-weight: 600;
    transition: background 0.2s ease;
}

form button:hover {
    background: #16a34a;
}
/* ===== MOBILE AJUSTES ===== */

@media (max-width: 600px) {

    .chat {
        padding: 10px 12px;
        font-size: 13px;
    }

    .message-author {
        font-size: 14px;
    }

    .message-datetime {
        font-size: 11px;
    }

    .message-text {
        font-size: 13px;
    }

    form {
        padding: 10px;
    }

    form button {
        padding: 10px 14px;
    }

}