/* ==========================================
   VARIABLES GLOBALES (Dark Mode & Colores)
   ========================================== */
:root {
    --bg-app: #0f1115;
    --bg-card: #1c1f26;
    --text-main: #ffffff;
    --text-muted: #8b92a5;
    --accent-cyan: #00e5ff;
    --accent-glow: rgba(0, 229, 255, 0.25);
}

body {
    background-color: var(--bg-app);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    justify-content: center;
    padding: 20px 20px 100px 20px; /* Padding bottom para que la nav no tape el contenido */
    margin: 0;
}

#app-container {
    width: 100%;
    max-width: 400px;
}

/* ==========================================
   SISTEMA DE VISTAS (TABS)
   ========================================== */
.view {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}
.view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   TARJETAS Y COMPONENTES
   ========================================== */
.ev-card {
    background-color: var(--bg-card);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ev-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.ev-header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.badge {
    background-color: var(--accent-glow);
    color: var(--accent-cyan);
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
}

.accent-text {
    color: var(--accent-cyan);
    font-weight: 600;
}

.text-muted {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* ==========================================
   CONTROLES: SLIDERS ELÉCTRICOS
   ========================================== */
.slider-container {
    margin-bottom: 24px;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.electric-slider {
    -webkit-appearance: none;
    appearance: none; 
    width: 100%;
    height: 8px;
    background: #2a2e39;
    border-radius: 4px;
    outline: none;
}

.electric-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-cyan);
    cursor: pointer;
    box-shadow: 0 0 12px var(--accent-cyan);
    transition: transform 0.1s ease;
}

.electric-slider::-webkit-slider-thumb:active {
    transform: scale(1.15);
}

/* ==========================================
   DISPLAY DE RESULTADO
   ========================================== */
.result-container {
    text-align: center;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.range-output {
    transition: opacity 0.3s ease;
}

#range-value {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -2px;
}

.unit {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-left: 4px;
}

/* ==========================================
   VISTA 2: SELECTOR DE VEHÍCULO
   ========================================== */
.input-group {
    margin-top: 20px;
}

.modern-select {
    width: 100%;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 255, 0.3);
    color: white;
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    /* Corrección de compatibilidad para linters y navegadores antiguos: */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /* Flecha customizada en SVG (Color Cian) */
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2300e5ff%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 15px top 50%;
    background-size: 12px auto;
}

.modern-select:focus {
    border-color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

.ev-specs {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    font-size: 0.95rem;
    color: #ccc;
    line-height: 1.6;
}

/* ==========================================
   NAVEGACIÓN INFERIOR (Estilo App Nativa)
   ========================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(22, 26, 35, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-around;
    padding: 15px 0 calc(15px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
}

.nav-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn.active {
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}