/* ... (Mantenemos todo igual hasta transcription box, agregamos glitch) ... */
:root {
    --bg-dark: #07080a;
    --box-color: #1a1b1e;
    --box-border: #333;
    --neon-green: #0f0;
    --neon-red: #f00;
    --neon-yellow: #ff0;
    --neon-orange: #f90;
    --neon-blue: #0cf;
    --text-muted: #666;
    --font-mono: 'Share Tech Mono', monospace;
    --font-title: 'Teko', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: #000;
    color: #fff;
    font-family: sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
    user-select: none;
    padding: 20px 0;
}

.device-container {
    background: linear-gradient(145deg, #1f2024, #121315);
    width: 100%;
    max-width: 420px;
    border: 3px solid #2a2a2a;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8), inset 0 0 20px rgba(0,0,0,0.5);
    margin: 20px;
}

/* Tornillos */
.screw {
    width: 12px; height: 12px;
    background: radial-gradient(circle, #666, #222);
    border-radius: 50%; position: absolute;
    box-shadow: inset 0 0 2px #000, 0 1px 1px rgba(255,255,255,0.1);
}
.screw::after {
    content: ''; position: absolute; width: 8px; height: 2px;
    background: #111; top: 5px; left: 2px; transform: rotate(45deg);
}
.top-left { top: 10px; left: 10px; }
.top-right { top: 10px; right: 10px; transform: rotate(30deg); }
.bottom-left { bottom: 10px; left: 10px; transform: rotate(-20deg); }
.bottom-right { bottom: 10px; right: 10px; transform: rotate(70deg); }

/* Encabezado */
.device-header { text-align: center; margin-bottom: 15px; }
.brand-title { font-family: var(--font-title); font-size: 2.5rem; letter-spacing: 2px; color: #ddd; text-shadow: 0 2px 4px #000; line-height: 1; }
.brand-subtitle { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); letter-spacing: 1px; }

/* Pantallas CRT */
.screen {
    background: #051005; border: 3px solid #111; border-radius: 6px;
    padding: 15px; margin-bottom: 15px; position: relative; overflow: hidden;
    box-shadow: inset 0 0 15px #000;
}

.scanline {
    position: absolute; top: 0; left: 0; width: 100%; height: 10px;
    background: rgba(0, 255, 0, 0.05); opacity: 0.4;
    animation: scan 4s linear infinite; pointer-events: none; z-index: 10;
}
@keyframes scan { 0% { transform: translateY(-10px); } 100% { transform: translateY(200px); } }

.screen-header { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.8rem; margin-bottom: 5px; }
.status-offline { color: var(--neon-red); }
.status-online { color: var(--neon-green); text-shadow: 0 0 5px var(--neon-green); }
.status-gps { color: var(--neon-blue); text-shadow: 0 0 5px var(--neon-blue); font-size: 0.7rem; }

.sim-selector {
    background: #111; color: var(--neon-blue); border: 1px solid var(--neon-blue);
    font-family: var(--font-mono); font-size: 0.7rem; width: 100%; margin-bottom: 10px; padding: 2px; outline: none;
}

.frequency-display {
    text-align: center; font-family: var(--font-mono); font-size: 2.5rem;
    color: var(--neon-green); text-shadow: 0 0 10px rgba(0,255,0,0.5); margin: 5px 0; line-height: 1;
}
.freq-unit { font-size: 0.8rem; color: #5a5; }

.screen-grid {
    display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.75rem;
    color: #5a5; border-top: 1px dashed #252; padding-top: 5px;
}
.highlight { color: var(--neon-green); }

/* Transcriptor y Diálogo IA */
.transcription-box {
    margin-top: 10px; background: rgba(0,255,0,0.05); padding: 8px;
    border-radius: 4px; border: 1px solid #131; position: relative;
}
.trans-label {
    font-family: var(--font-mono); font-size: 0.65rem; color: #5a5;
    margin-bottom: 5px; text-align: center; border-bottom: 1px solid #252; padding-bottom: 2px;
}
.dialog-box { display: flex; flex-direction: column; gap: 4px; }
.user-text { font-family: var(--font-mono); font-size: 0.85rem; color: var(--neon-blue); text-align: right; min-height: 15px; }

.trans-text {
    font-family: var(--font-mono); font-size: 1.1rem; color: #fff;
    min-height: 24px; text-shadow: 0 0 4px #fff; text-align: left;
    letter-spacing: 2px;
}

/* Efecto visual de interferencia para el texto EVP */
.glitch-text {
    animation: textGlitch 0.2s infinite;
    opacity: 0.8;
}

@keyframes textGlitch {
    0% { transform: translate(0); text-shadow: 0 0 4px #fff; opacity: 1; }
    20% { transform: translate(-2px, 1px); text-shadow: 2px 0 2px #0f0, -2px 0 2px #f00; opacity: 0.6; }
    40% { transform: translate(2px, -1px); text-shadow: none; opacity: 0.9; }
    60% { transform: translate(-1px, 2px); text-shadow: 2px 0 2px #0f0; opacity: 0.5; }
    80% { transform: translate(1px, -2px); text-shadow: -2px 0 2px #f00; opacity: 0.8; }
    100% { transform: translate(0); text-shadow: 0 0 4px #fff; opacity: 1; }
}

/* Mic Section */
.mic-section { text-align: center; margin-bottom: 15px; }
.btn-mic {
    background: linear-gradient(to bottom, #103a3a, #052020); border: 2px solid #1a5a5a;
    color: var(--neon-blue); font-family: var(--font-title); font-size: 1.2rem;
    padding: 8px 0; width: 100%; border-radius: 6px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 10px; transition: all 0.2s; box-shadow: 0 4px 6px rgba(0,0,0,0.5);
}
.btn-mic:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-mic.listening {
    background: linear-gradient(to bottom, #154a4a, #208a8a); border-color: #fff;
    color: #fff; text-shadow: 0 0 5px #fff; animation: pulseMic 1s infinite alternate;
}
@keyframes pulseMic { 0% { box-shadow: 0 0 5px var(--neon-blue); } 100% { box-shadow: 0 0 20px var(--neon-blue); } }
.mic-status { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); margin-top: 5px; }

/* Medidor EMF */
.emf-meter { background: #111; padding: 12px; border-radius: 6px; margin-bottom: 15px; border: 2px solid #222; }
.emf-header { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); margin-bottom: 8px; }
.led-array { display: flex; justify-content: space-between; gap: 4px; }
.led { flex: 1; height: 15px; background: #222; border-radius: 3px; border: 1px solid #111; transition: background 0.05s; }
.led-green.active { background: var(--neon-green); box-shadow: 0 0 10px var(--neon-green); }
.led-yellow.active { background: var(--neon-yellow); box-shadow: 0 0 10px var(--neon-yellow); }
.led-orange.active { background: var(--neon-orange); box-shadow: 0 0 10px var(--neon-orange); }
.led-red.active { background: var(--neon-red); box-shadow: 0 0 10px var(--neon-red); }

/* Osciloscopio */
.oscilloscope-screen { padding: 0; height: 60px; position: relative; }
.osc-label { position: absolute; top: 5px; left: 8px; font-family: var(--font-mono); font-size: 0.65rem; color: var(--neon-green); z-index: 5; }
#osc-canvas { width: 100%; height: 100%; display: block; }

/* Panel de Control */
.control-panel { background: #1a1a1a; border: 2px solid #222; padding: 15px; border-radius: 6px; margin-bottom: 15px; }
.slider-group { margin-bottom: 15px; }
.slider-header { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); margin-bottom: 8px; }
.industrial-slider { width: 100%; -webkit-appearance: none; background: #111; height: 8px; border-radius: 4px; outline: none; border: 1px solid #333; }
.industrial-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; background: #444; border: 2px solid #666; border-radius: 50%; cursor: pointer; }
.toggles-grid { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 8px; }
.toggle-btn { background: #222; border: 2px solid #333; color: #666; padding: 8px 0; font-family: var(--font-mono); font-size: 0.85rem; border-radius: 4px; cursor: pointer; transition: all 0.2s; }
.toggle-btn.active { background: #333; border-color: #555; color: #fff; box-shadow: inset 0 0 5px #000; }

/* Botón de Encendido */
.power-section { text-align: center; }
.btn-power {
    background: linear-gradient(to bottom, #3a1010, #200505); border: 2px solid #5a1a1a;
    color: #ff8888; font-family: var(--font-title); font-size: 1.5rem;
    padding: 10px 0; width: 100%; border-radius: 6px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 10px; transition: all 0.2s; box-shadow: 0 4px 6px rgba(0,0,0,0.5);
}
.btn-power:active { transform: translateY(2px); box-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.btn-power.on { background: linear-gradient(to bottom, #4a1515, #8a2020); border-color: var(--neon-red); color: #fff; text-shadow: 0 0 5px #fff; }
.power-indicator { width: 10px; height: 10px; border-radius: 50%; background: #333; border: 1px solid #111; }
.btn-power.on .power-indicator { background: var(--neon-red); box-shadow: 0 0 8px var(--neon-red); border-color: #fff; }
