@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

/* --- PALETA AEGIS --- */
:root {
    --aegis-blue: #005691;
    --aegis-dark: #003355;
    --aegis-light: #007ac3;
    --bg-dark: #121212;
    --header-bg: #050505; /* Nuevo: Casi negro para contraste del logo */
    --card-bg: #1e1e1e;
    --text-color: #e0e0e0;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Poppins', sans-serif; -webkit-tap-highlight-color: transparent; }

html, body {
    height: 100%; width: 100%;
    background-color: var(--bg-dark);
    position: fixed; overflow: hidden;
}

body { display: flex; flex-direction: column; }

/* --- ENCABEZADO CORREGIDO (CONTRASTE) --- */
header {
    background-color: var(--header-bg); /* Fondo Negro Profundo */
    padding: 15px;
    display: flex; justify-content: center; align-items: center;
    z-index: 10; flex-shrink: 0;
    border-bottom: 1px solid #222; /* Separador sutil */
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.logo-container {
    padding: 5px; text-align: center; width: auto;
    display: flex; justify-content: center; align-items: center;
}

.logo-img {
    max-height: 45px; width: auto; object-fit: contain;
    /* Un poco de brillo para que el azul del logo no se apague */
    filter: drop-shadow(0 0 5px rgba(0, 86, 145, 0.3)); 
}

/* --- CHAT --- */
.chat-box {
    flex: 1; padding: 20px; padding-bottom: 25px;
    overflow-y: auto; display: flex; flex-direction: column; gap: 15px;
    background-color: var(--bg-dark); scroll-behavior: smooth;
}

.message {
    padding: 12px 18px; border-radius: 18px; font-size: 0.95rem;
    line-height: 1.4; max-width: 85%; position: relative;
    animation: fadeIn 0.2s ease; word-wrap: break-word;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.bot-msg { 
    background-color: #f0f4f8; 
    color: #333; align-self: flex-start; 
    border-bottom-left-radius: 2px; border-left: 4px solid var(--aegis-light);
}

.user-msg { 
    background-color: var(--aegis-light); 
    color: white; align-self: flex-end; 
    border-bottom-right-radius: 2px; 
}

.chat-img { width: 200px; height: 200px; object-fit: cover; border-radius: 10px; margin-top: 8px; border: 2px solid rgba(255,255,255,0.2); }

/* --- BOTONES OPCIONES --- */
.options-container { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 5px; animation: fadeIn 0.3s ease; }

.option-btn {
    background-color: transparent; 
    color: var(--aegis-light); 
    border: 1px solid var(--aegis-light);
    padding: 8px 16px; border-radius: 25px; font-size: 0.9rem; cursor: pointer;
    transition: 0.2s; font-weight: 500;
}

.option-btn:active, .option-btn:hover {
    background-color: var(--aegis-light); color: white; transform: scale(0.98);
}

/* --- BARRA INPUT --- */
.input-area {
    background-color: #1a1a1a; width: 100%;
    padding: 12px 15px; padding-bottom: calc(25px + env(safe-area-inset-bottom));
    display: flex; align-items: center; gap: 10px;
    border-top: 1px solid #333; flex-shrink: 0;
}

#camera-btn { background: none; border: none; color: var(--aegis-light); font-size: 1.5rem; padding: 5px; cursor: pointer; flex-shrink: 0; }
#user-input {
    flex: 1; padding: 12px 18px; border: none; border-radius: 25px;
    background-color: #2c2c2c; color: white; font-size: 1rem; outline: none; min-width: 0;
    border: 1px solid transparent;
}
#user-input:focus { border-color: var(--aegis-dark); background-color: #333; }

#send-btn {
    background-color: var(--aegis-light); color: white; border: none; width: 45px; height: 45px;
    border-radius: 50%; display: flex; justify-content: center; align-items: center;
    font-size: 1.1rem; flex-shrink: 0; box-shadow: 0 4px 10px rgba(0, 122, 195, 0.4);
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }