/* Fonte e reset */
* {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ----------------------
   Fundo com a logo (decorativo)
---------------------- */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("../img/DesmoLogo.png") center center no-repeat;
    background-size: 40%;
    opacity: 0.03;
    z-index: 0;
    pointer-events: none;
}

/* ----------------------
   Variáveis de tema
---------------------- */
:root {
    --bg-light: #e4e4e7;
    --bg-dark: #111827;

    --card-light: rgba(255, 255, 255, 0.6);
    --card-dark: rgba(31, 41, 55, 0.6);

    --glass-border: rgba(255, 255, 255, 0.2);

    --text-light: #111;
    --text-dark: #f4f4f5;

    --accent: #3b82f6;
}

/* ----------------------
   Modo claro/escuro
---------------------- */
body.light-mode {
    background-color: var(--bg-light);
    color: var(--text-light);
}

body.dark-mode {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

/* ----------------------
   Informações de comandos
---------------------- */
.commands-info {
    background: var(--card-light);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 0.75rem 1.5rem;
    margin: 1rem auto;
    max-width: 90%;
    text-align: center;
    font-size: 0.9rem;
    color: #065f46;
}

body.dark-mode .commands-info {
    background: var(--card-dark);
    color: #a7f3d0;
}

/* ----------------------
   Container do chat
---------------------- */
.chat-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
    background: transparent;
    position: relative;
    z-index: 1;
}

.chat-container::-webkit-scrollbar {
    width: 6px;
}

.chat-container::-webkit-scrollbar-thumb {
    background-color: #9ca3af;
    border-radius: 0.5rem;
}

/* ----------------------
   Estilo das mensagens
---------------------- */
.message {
    max-width: 80%;
    padding: 0.85rem 1.25rem;
    border-radius: 1rem;
    margin-bottom: 0.75rem;
    backdrop-filter: blur(16px);
    background-color: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.user-message {
    align-self: flex-end;
    background-color: #3b82f6;
    color: white;
    border-bottom-right-radius: 0.25rem;
}

.bot-message {
    align-self: flex-start;
    background-color: rgba(255, 255, 255, 0.1);
    color: inherit;
    border-bottom-left-radius: 0.25rem;
}

body.dark-mode .bot-message {
    background-color: rgba(31, 41, 55, 0.6);
}

/* ----------------------
   Área de entrada
---------------------- */
.input-area {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    z-index: 2;
}

body.dark-mode .input-area {
    background-color: rgba(17, 24, 39, 0.6);
}

.text-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: none;
    background-color: rgba(255, 255, 255, 0.8);
    outline: none;
    font-size: 1rem;
    transition: box-shadow 0.2s ease;
}

.text-input:focus {
    box-shadow: 0 0 0 2px var(--accent);
}

body.dark-mode .text-input {
    background-color: rgba(55, 65, 81, 0.6);
    color: #f9fafb;
}

/* ----------------------
   Botão de enviar
---------------------- */
.send-button {
    background-color: var(--accent);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.send-button:hover {
    background-color: #2563eb;
}

/* ----------------------
   Indicador de digitação
---------------------- */
.typing-indicator {
    display: flex;
    align-items: center;
    margin-left: 1rem;
    margin-bottom: 0.5rem;
}

.typing-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: #9ca3af;
    margin-right: 0.25rem;
    animation: typing 1.5s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.5s;
}

.typing-dot:nth-child(3) {
    animation-delay: 1s;
}

@keyframes typing {
    0% {
        opacity: 0;
        transform: translateY(0);
    }

    50% {
        opacity: 1;
        transform: translateY(-0.25rem);
    }

    100% {
        opacity: 0;
        transform: translateY(0);
    }
}

/* Animação fade-in para mensagens */
.animate-fade-in {
    animation: fade-in 0.3s ease forwards;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Indicador de digitação */
.typing-indicator {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    margin-left: 1rem;
    margin-bottom: 0.5rem;
}

.typing-dot {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background-color: #9ca3af;
    animation: typing 1.5s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.3s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes typing {

    0%,
    100% {
        opacity: 0.3;
        transform: translateY(0);
    }

    50% {
        opacity: 1;
        transform: translateY(-5px);
    }
}

/* ----------------------
   Footer
---------------------- */
footer {
    color: #000000;
    padding: 12px 0;
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

body.dark-mode footer {
    color: #ffffff;
}

footer p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

footer img {
    width: 40px;
    height: auto;
    border-radius: 4px;
    padding: 0;
    margin: 0;
    transition: transform 0.3s ease;
    cursor: pointer;
    outline: none;
}

footer img:hover, footer img:focus {
    transform: scale(1.1);
}
