@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

:root {
    --bg-body: #000000;
    --bg-card: #0f172a; /* Slate 900 */
    --input-bg: #1e293b; /* Slate 800 */
    --input-border: #334155; /* Slate 700 */
    /*--primary: #6366f1;*/ /* Indigo 500 */
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    margin: 0;
    -webkit-tap-highlight-color: transparent;
}

/* Fix Scrollbar */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* --- COMPONENTES VISUALES (Pure CSS) --- */

/* 1. INPUTS PROFESIONALES */
/* Esto arregla el "flash blanco" y el hover errático */
.input-field {
    width: 100%;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-main);
    border-radius: 0.75rem; /* 12px */
    padding: 0.75rem 1rem 0.75rem 2.75rem; /* Padding left para el ícono */
    font-size: 0.875rem;
    transition: all 0.2s ease;
    outline: none;
}

/* Hack para evitar que Chrome ponga el input amarillo/blanco al autocompletar */
.input-field:-webkit-autofill,
.input-field:-webkit-autofill:hover, 
.input-field:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-main);
    -webkit-box-shadow: 0 0 0px 1000px var(--input-bg) inset;
    transition: background-color 5000s ease-in-out 0s;
}

.input-field:hover {
    border-color: #475569; /* Un poco más claro */
}

.input-field:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* 2. BOTONES */
.btn-primary {
    width: 100%;
    background-color: var(--primary);
    color: white;
    font-weight: 500;
    padding: 0.875rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.1s, background-color 0.2s;
}
.btn-primary:active {
    transform: scale(0.98);
}
.btn-primary:hover {
    background-color: #4f46e5; /* Indigo 600 */
}

/* 3. BARRA DE PROGRESO HTMX */
.htmx-progress-container {
    position: absolute; /* Relativo al padre (Main) */
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 50;
    background: transparent;
    pointer-events: none;
}
.htmx-progress-bar {
    height: 100%;
    background-color: var(--primary);
    width: 0;
    opacity: 0;
    transition: opacity 0.3s;
}


/* Animaciones Custom */
@keyframes scaleIn {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.scale-in {
    animation: scaleIn 0.4s ease-out forwards;
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out forwards;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Pantalla Roja de Pánico */
#alerta-overlay {
    z-index: 9999 !important; /* Encima de todo */
    background-color: rgba(220, 38, 38, 0.95); /* Rojo intenso */
}


/* Ticker de Noticias */
.ticker-wrap {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: #0f172a; /* Slate 900 */
    border-top: 1px solid #334155;
    z-index: 50; /* Encima del contenido, debajo del pánico */
    overflow: hidden;
    display: none; /* Oculto si no hay noticias */
}

.ticker-content {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%; /* Empieza fuera de pantalla */
    animation: ticker 20s linear infinite;
    line-height: 40px;
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
}

@keyframes ticker {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* Colores de Ticker */
.ticker-alert { background: #b91c1c; border-color: #991b1b; } /* Rojo */
.ticker-warning { background: #ca8a04; border-color: #a16207; color: black; } /* Amarillo */


/* Animación Micrófono Dock */
.listening-dock #mic-pulse {
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
    opacity: 0.5;
}
.listening-dock i { color: white; }