/* css/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #050505; /* Casi negro */
    color: #e0e0e0;
    font-family: 'Rajdhani', sans-serif; /* Fuente Tech */
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Fondo de Red Neuronal (Placeholder por ahora) */
#neural-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at center, #1a1a1a 0%, #000000 100%);
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 100;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #fff;
}

.highlight {
    color: #00f2ff; /* Cian Neón */
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #aaa;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.3s;
}

.nav-links a:hover {
    color: #00f2ff;
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
}

.status-dot {
    color: #00ff88;
    font-size: 0.8rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* Contenido Principal */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 60px;
    text-align: center;
}

.hero-text h1 {
    font-size: 4rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    background: linear-gradient(90deg, #fff, #00f2ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    font-family: 'Roboto Mono', monospace;
    color: #888;
    letter-spacing: 1px;
    margin-bottom: 50px;
}

/* Input Terminal */
.terminal-input {
    width: 100%;
    max-width: 800px;
    margin-bottom: 60px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #333;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.1);
}

.terminal-header {
    background: #111;
    padding: 8px 15px;
    text-align: left;
    font-size: 0.8rem;
    color: #555;
    border-bottom: 1px solid #222;
}

.input-group {
    display: flex;
    padding: 15px;
}

#query-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #00f2ff;
    font-family: 'Roboto Mono', monospace;
    font-size: 1.1rem;
    outline: none;
}

.btn-analyze {
    background: transparent;
    border: 1px solid #00f2ff;
    color: #00f2ff;
    padding: 10px 30px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    margin-left: 15px;
}

.btn-analyze:hover {
    background: #00f2ff;
    color: #000;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.6);
}

/* Tarjetas Glassmorphism */
.visual-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 900px;
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    min-height: 200px;
    transition: 0.3s;
}

.glass-card:hover {
    border-color: #00f2ff;
    transform: translateY(-5px);
}

.glass-card h3 {
    color: #888;
    margin-bottom: 20px;
    font-size: 1.1rem;
    text-transform: uppercase;
}

.metric-placeholder {
    font-size: 1.5rem;
    color: #fff;
    font-family: 'Roboto Mono', monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
}

/* Colores de Datos */
.bullish {
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.bearish {
    color: #ff3366;
    text-shadow: 0 0 10px rgba(255, 51, 102, 0.5);
}

/* Estado de Carga */
.loading::after {
    content: '...';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    80%, 100% { content: ''; }
}

/* Contenedor del Chart */
.chart-container {
    position: relative;
    height: 200px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

canvas {
    max-width: 100%;
    max-height: 100%;
}

/* css/style.css */

/* --- NEXUS CHATBOT --- */
#nexus-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
}

/* Botón Flotante */
#nexus-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #00f2ff;
    border: none;
    color: #000;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

#nexus-btn:hover {
    transform: scale(1.1);
}

.pulse-btn {
    animation: pulse-blue 2s infinite;
}

@keyframes pulse-blue {
    0% { box-shadow: 0 0 0 0 rgba(0, 242, 255, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(0, 242, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 242, 255, 0); }
}

/* Ventana del Chat */
#nexus-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid #333;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#nexus-window.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

/* Header */
.nexus-header {
    padding: 15px;
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255,255,255,0.05);
}

.nexus-avatar {
    background: rgba(0, 242, 255, 0.2);
    padding: 5px;
    border-radius: 50%;
    border: 1px solid #00f2ff;
}

.nexus-header h4 {
    margin: 0;
    font-size: 1rem;
    color: #00f2ff;
}

.status-text {
    font-size: 0.7rem;
    color: #00ff88;
}

#close-nexus {
    background: none;
    border: none;
    color: #666;
    font-size: 1.5rem;
    margin-left: auto;
    cursor: pointer;
}

#close-nexus:hover { color: #fff; }

/* Mensajes */
#nexus-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scrollbar-width: thin;
    scrollbar-color: #333 transparent;
}

.msg {
    max-width: 80%;
    padding: 10px 15px;
    font-size: 0.9rem;
    line-height: 1.4;
    border-radius: 10px;
    position: relative;
}

.nexus-msg {
    background: rgba(0, 242, 255, 0.1);
    border: 1px solid rgba(0, 242, 255, 0.3);
    align-self: flex-start;
    border-top-left-radius: 0;
    color: #d0faff;
}

.user-msg {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    align-self: flex-end;
    border-top-right-radius: 0;
    color: #fff;
}

/* Input */
.nexus-input-area {
    padding: 15px;
    border-top: 1px solid #333;
    display: flex;
    gap: 10px;
}

#nexus-input {
    flex: 1;
    background: rgba(0,0,0,0.5);
    border: 1px solid #444;
    color: #fff;
    padding: 10px;
    border-radius: 20px;
    outline: none;
}

#nexus-input:focus { border-color: #00f2ff; }

#send-nexus {
    background: #00f2ff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

#send-nexus:hover { transform: rotate(45deg); }

#neural-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Muy importante: Manda el fondo detrás de todo */
}