/* ===============================================
   AVL - Sistema de Desactivación de Explosivos
   Estilos Guerra Fría - Estética Militar Retro
   =============================================== */

:root {
    /* Paleta de colores - Tema Guerra Fría / Militar */
    --bg-primary: #0d1a0d;
    --bg-secondary: #1a2a1a;
    --bg-tertiary: #243324;
    
    /* Colores de acento militares */
    --accent-cyan: #33ff66;
    --accent-cyan-dim: #228844;
    --accent-red: #cc2020;
    --accent-red-glow: #ff3333;
    --accent-green: #33ff33;
    --accent-yellow: #ffaa00;
    --accent-orange: #ff6600;
    --accent-purple: #886644;
    --accent-amber: #ffb000;
    
    /* Colores militares adicionales */
    --military-olive: #4a5a3a;
    --military-khaki: #8b7355;
    --military-steel: #4a5568;
    --military-rust: #8b4513;
    
    --text-primary: #c8d4c8;
    --text-secondary: #8a9a8a;
    --text-dim: #4a5a4a;
    
    --border-color: #3a4a3a;
    --border-glow: rgba(51, 255, 102, 0.3);
    
    --success: #33ff33;
    --danger: #cc2020;
    --warning: #ffaa00;
    
    /* Tipografía */
    --font-display: 'Orbitron', monospace;
    --font-mono: 'Share Tech Mono', monospace;
    
    /* Efectos */
    --glow-cyan: 0 0 20px rgba(51, 255, 102, 0.5);
    --glow-red: 0 0 20px rgba(204, 32, 32, 0.5);
    --glow-green: 0 0 20px rgba(51, 255, 51, 0.5);
    --glow-amber: 0 0 20px rgba(255, 176, 0, 0.5);
}

/* Reset y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

/* Permitir scroll en pantalla de inicio si el contenido es largo */
body {
    font-family: var(--font-mono);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Efectos de fondo - Estilo CRT Guerra Fría */
.scan-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 50%,
        rgba(0, 20, 0, 0.15) 50%
    );
    background-size: 100% 3px;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.5;
    animation: scanFlicker 0.1s infinite;
}

@keyframes scanFlicker {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.45; }
}

.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.06;
    pointer-events: none;
    z-index: 999;
}

/* Efecto de viñeta militar */
.screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
    z-index: 998;
}

/* Pantallas */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    background: var(--bg-primary);
}

.screen.active {
    display: flex;
    flex-direction: column;
}

/* ===============================================
   PANTALLA DE INICIO
   =============================================== */

#start-screen {
    justify-content: flex-start;
    align-items: center;
    padding-top: 2rem;
    padding-bottom: 2rem;
    overflow-y: auto;
    overflow-x: hidden;
    background: 
        radial-gradient(ellipse at center, rgba(51, 255, 102, 0.03) 0%, transparent 60%),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(51, 255, 51, 0.02) 2px,
            rgba(51, 255, 51, 0.02) 4px
        ),
        linear-gradient(180deg, var(--bg-primary) 0%, #0a140a 100%);
}

/* ===============================================
   LOGO AVL
   =============================================== */

.avl-logo {
    position: absolute;
    height: 60px;
    width: auto;
    z-index: 100;
    opacity: 0.9;
    transition: opacity 0.3s ease, transform 0.3s ease;
    filter: drop-shadow(0 0 8px rgba(51, 255, 102, 0.4)) brightness(0.95);
}

.avl-logo:hover {
    opacity: 1;
    transform: scale(1.05);
    filter: drop-shadow(0 0 15px rgba(51, 255, 102, 0.6)) brightness(1.1);
}

.avl-logo-top-right {
    top: 20px;
    right: 20px;
}

.avl-logo-bottom-right {
    bottom: 20px;
    right: 20px;
}

.start-container {
    text-align: center;
    padding: 2rem;
    max-width: 700px;
    width: 100%;
    animation: fadeInUp 0.8s ease-out;
    position: relative;
    z-index: 10;
}

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

.logo-container {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ===============================================
   ANIMACIÓN AVL - Assess Verify Liberate
   Secuencia: Horizontal → Vertical → Palabras → Reducir → Mostrar UI
   =============================================== */

.avl-animation {
    position: relative;
    width: 450px;
    height: 220px;
    margin-bottom: 1.5rem;
}

.avl-row {
    display: flex;
    align-items: center;
    position: absolute;
    white-space: nowrap;
}

/* 
   TIMELINE DE ANIMACIÓN:
   0s-1.5s: AVL aparece en horizontal centrado (letras grandes)
   1.5s-4s: Movimiento lento a vertical
   4s-5.5s: Aparecen las palabras
   5.5s-7s: Las letras se reducen de tamaño
   7s-8s: Aparece warning box
   8s-9s: Aparece stats panel
   9s-10s: Aparece botón
*/

/* Posiciones iniciales: horizontal centrado */
.avl-row:nth-child(1) {
    animation: moveRowA 2s ease-in-out forwards;
}

.avl-row:nth-child(2) {
    animation: moveRowV 2s ease-in-out forwards;
}

.avl-row:nth-child(3) {
    animation: moveRowL 2s ease-in-out forwards;
}

/* Animación Letra A: horizontal → vertical + reducción */
@keyframes moveRowA {
    0% {
        left: calc(50% - 180px);
        top: 50%;
        transform: translateY(-50%);
    }
    30% {
        left: calc(50% - 180px);
        top: 50%;
        transform: translateY(-50%);
    }
    100% {
        left: 50px;
        top: 10px;
        transform: translateY(0);
    }
}

/* Animación Letra V: horizontal → vertical + reducción */
@keyframes moveRowV {
    0% {
        left: 50%;
        top: 50%;
        transform: translateX(-50%) translateY(-50%);
    }
    30% {
        left: 50%;
        top: 50%;
        transform: translateX(-50%) translateY(-50%);
    }
    100% {
        left: 50px;
        top: 75px;
        transform: translateX(0) translateY(0);
    }
}

/* Animación Letra L: horizontal → vertical + reducción */
@keyframes moveRowL {
    0% {
        left: calc(50% + 180px);
        top: 50%;
        transform: translateX(-50%) translateY(-50%);
    }
    30% {
        left: calc(50% + 180px);
        top: 50%;
        transform: translateX(-50%) translateY(-50%);
    }
    100% {
        left: 50px;
        top: 140px;
        transform: translateX(0) translateY(0);
    }
}

.avl-letter {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 900;
    color: var(--accent-cyan);
    text-shadow: 
        0 0 10px var(--accent-cyan),
        0 0 20px var(--accent-cyan),
        0 0 40px var(--accent-cyan);
    min-width: 60px;
    text-align: center;
    display: inline-block;
    animation: letterShrink 2s ease-in-out forwards, letterGlow 2s ease-in-out infinite 2s;
}

/* Animación de reducción de tamaño de las letras */
@keyframes letterShrink {
    0% {
        font-size: 6rem;
    }
    30% {
        font-size: 6rem;
    }
    100% {
        font-size: 3.5rem;
    }
}

@keyframes letterGlow {
    0%, 100% {
        text-shadow: 
            0 0 10px var(--accent-cyan),
            0 0 20px var(--accent-cyan),
            0 0 40px var(--accent-cyan);
        filter: brightness(1);
    }
    50% {
        text-shadow: 
            0 0 15px var(--accent-cyan),
            0 0 30px var(--accent-cyan),
            0 0 60px var(--accent-cyan),
            0 0 80px rgba(51, 255, 102, 0.3);
        filter: brightness(1.2);
    }
}

.avl-word {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 
        0 0 5px rgba(224, 231, 255, 0.3);
    opacity: 0;
    display: inline-block;
    letter-spacing: 0.05em;
    margin-left: -5px;
}

/* Palabras aparecen después del movimiento vertical */
.avl-row:nth-child(1) .avl-word {
    animation: wordReveal 0.5s ease-out 1.2s forwards;
}

.avl-row:nth-child(2) .avl-word {
    animation: wordReveal 0.5s ease-out 1.4s forwards;
}

.avl-row:nth-child(3) .avl-word {
    animation: wordReveal 0.5s ease-out 1.6s forwards;
}

@keyframes wordReveal {
    0% {
        opacity: 0;
        transform: translateX(-20px);
        filter: blur(10px);
        color: var(--accent-cyan);
    }
    60% {
        opacity: 0.8;
        filter: blur(3px);
        color: var(--accent-cyan);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
        filter: blur(0);
        color: var(--text-primary);
    }
}

/* Efecto hover en las filas */
.avl-row:hover .avl-letter {
    animation: letterGlitch 0.4s ease-in-out, letterGlow 2s ease-in-out infinite;
}

.avl-row:hover .avl-word {
    color: var(--accent-cyan);
    text-shadow: 0 0 10px var(--accent-cyan);
}

@keyframes letterGlitch {
    0%, 100% {
        transform: translateX(0);
    }
    20% {
        transform: translateX(-3px);
        text-shadow: 
            3px 0 var(--accent-red),
            0 0 20px var(--accent-cyan);
    }
    40% {
        transform: translateX(3px);
        text-shadow: 
            -3px 0 var(--accent-purple),
            0 0 20px var(--accent-cyan);
    }
    60% {
        transform: translateX(-2px);
        text-shadow: 
            2px 0 var(--accent-red),
            0 0 20px var(--accent-cyan);
    }
    80% {
        transform: translateX(2px);
        text-shadow: 
            -2px 0 var(--accent-purple),
            0 0 20px var(--accent-cyan);
    }
}

.subtitle {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--text-secondary);
    letter-spacing: 0.4em;
    margin-top: 0.5rem;
    opacity: 1;
}

@keyframes fadeInSubtitle {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Warning Box - Estilo Militar */
.warning-box {
    background: 
        linear-gradient(135deg, rgba(139, 69, 19, 0.15) 0%, rgba(74, 90, 58, 0.2) 100%);
    border: 2px solid var(--accent-amber);
    border-radius: 4px;
    margin: 2rem 0;
    overflow: hidden;
    animation: borderPulseAmber 2s ease-in-out infinite, fadeInWarning 0.8s ease-out 0.2s forwards;
    box-shadow: 
        inset 0 0 20px rgba(0, 0, 0, 0.3),
        0 4px 15px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeInWarning {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes borderPulseAmber {
    0%, 100% { border-color: var(--accent-amber); box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3), 0 0 10px rgba(255, 176, 0, 0.2); }
    50% { border-color: rgba(255, 176, 0, 0.6); box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 176, 0, 0.4); }
}

.warning-header {
    background: linear-gradient(180deg, var(--accent-amber) 0%, #cc8800 100%);
    color: #1a1a0a;
    padding: 0.6rem 1rem;
    font-family: var(--font-display);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 2px solid #996600;
}

.warning-content {
    padding: 1.2rem;
    text-align: left;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 1px,
        rgba(51, 255, 51, 0.02) 1px,
        rgba(51, 255, 51, 0.02) 2px
    );
}

.warning-content p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.warning-content .important {
    color: var(--accent-amber);
    text-align: center;
    margin-top: 1rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 176, 0, 0.3);
}

/* Stats Panel en inicio - Estilo Militar */
.stats-panel {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: 
        linear-gradient(180deg, rgba(36, 51, 36, 0.9) 0%, rgba(26, 42, 26, 0.95) 100%);
    border-radius: 4px;
    border: 2px solid var(--border-color);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3),
        0 4px 15px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInStats 0.8s ease-out 0.8s forwards;
}

@keyframes fadeInStats {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.stat-icon {
    font-size: 2rem;
    filter: grayscale(20%);
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-red);
    text-shadow: 0 0 10px rgba(204, 32, 32, 0.5);
}

.stat-number.score {
    color: var(--accent-amber);
    text-shadow: 0 0 10px rgba(255, 176, 0, 0.5);
}

/* Start Button - Estilo Militar */
.btn-start {
    position: relative;
    background: 
        linear-gradient(180deg, #4a6a3a 0%, #3a5a2a 40%, #2a4a1a 100%);
    border: 3px solid #5a7a4a;
    border-radius: 4px;
    padding: 1.2rem 3rem;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: #ddeedd;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease;
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    box-shadow: 
        0 6px 0 #1a3a0a,
        0 8px 15px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    animation: fadeInButton 1s ease-out 8.5s forwards;
}

@keyframes fadeInButton {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    70% {
        opacity: 1;
        transform: translateY(-5px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.btn-start:hover {
    background: 
        linear-gradient(180deg, #5a7a4a 0%, #4a6a3a 40%, #3a5a2a 100%);
    box-shadow: 
        0 6px 0 #1a3a0a,
        0 8px 20px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(51, 255, 102, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-start:active {
    transform: translateY(4px);
    box-shadow: 
        0 2px 0 #1a3a0a,
        0 3px 8px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.15) 50%,
        transparent 70%
    );
    animation: shine 4s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

/* ===============================================
   PANTALLA DE JUEGO - Estilo Guerra Fría
   =============================================== */

#game-screen {
    background: 
        radial-gradient(circle at 50% 50%, rgba(51, 255, 102, 0.02) 0%, transparent 50%),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(51, 255, 51, 0.015) 2px,
            rgba(51, 255, 51, 0.015) 4px
        ),
        linear-gradient(180deg, var(--bg-primary) 0%, #050a05 100%);
}

/* Header del juego - Panel de Control Militar */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: relative;
    background: 
        linear-gradient(180deg, #1a2a1a 0%, #0f1a0f 100%);
    border-bottom: 3px solid #3a4a3a;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 4px 15px rgba(0, 0, 0, 0.5);
}

.header-left, .header-right {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex: 1;
}

.header-left {
    justify-content: flex-start;
}

.header-right {
    justify-content: flex-end;
}

.bomb-status {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.status-label, .strikes-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
}

.status-value {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
}

.status-value.armed {
    color: var(--accent-red);
    animation: blink 1s infinite;
}

.status-value.defused {
    color: var(--accent-green);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.score-display {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.score-display span:last-child {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-yellow);
    margin-left: 0.5rem;
}

/* Timer Wrapper - Centrado absoluto */
.timer-wrapper {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
}

/* Timer - Display 7 Segmentos */
.timer-container {
    text-align: center;
    background: linear-gradient(180deg, #0a0a0a 0%, #050505 100%);
    padding: 12px 20px;
    border: 3px solid #333;
    border-radius: 4px;
    box-shadow: 
        inset 0 0 30px rgba(0, 0, 0, 0.8),
        0 4px 10px rgba(0, 0, 0, 0.5);
}

/* Display de 7 segmentos */
.timer-display-7seg {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Cada dígito de 7 segmentos */
.digit {
    position: relative;
    width: 38px;
    height: 64px;
}

/* Segmentos base */
.seg {
    position: absolute;
    background: #2a0505;
    transition: background 0.1s ease, box-shadow 0.1s ease;
    border-radius: 1px;
}

/* Segmentos horizontales (a, d, g) */
.seg-a, .seg-d, .seg-g {
    width: 26px;
    height: 5px;
    left: 6px;
}

/* Segmentos verticales (b, c, e, f) */
.seg-b, .seg-c, .seg-e, .seg-f {
    width: 5px;
    height: 24px;
}

/* Posiciones de los segmentos */
.seg-a { top: 0; }
.seg-g { top: 50%; transform: translateY(-50%); }
.seg-d { bottom: 0; }

.seg-f { left: 0; top: 5px; }
.seg-b { right: 0; top: 5px; }
.seg-e { left: 0; bottom: 5px; }
.seg-c { right: 0; bottom: 5px; }

/* Segmentos encendidos (rojo brillante) */
.seg.on {
    background: #ff2222;
    box-shadow: 
        0 0 8px #ff2222,
        0 0 16px rgba(255, 34, 34, 0.6),
        0 0 24px rgba(255, 34, 34, 0.3);
}

/* Estados de los dígitos 0-9 */
.digit[data-value="0"] .seg-a,
.digit[data-value="0"] .seg-b,
.digit[data-value="0"] .seg-c,
.digit[data-value="0"] .seg-d,
.digit[data-value="0"] .seg-e,
.digit[data-value="0"] .seg-f { background: #ff2222; box-shadow: 0 0 8px #ff2222, 0 0 16px rgba(255, 34, 34, 0.6); }

.digit[data-value="1"] .seg-b,
.digit[data-value="1"] .seg-c { background: #ff2222; box-shadow: 0 0 8px #ff2222, 0 0 16px rgba(255, 34, 34, 0.6); }

.digit[data-value="2"] .seg-a,
.digit[data-value="2"] .seg-b,
.digit[data-value="2"] .seg-g,
.digit[data-value="2"] .seg-e,
.digit[data-value="2"] .seg-d { background: #ff2222; box-shadow: 0 0 8px #ff2222, 0 0 16px rgba(255, 34, 34, 0.6); }

.digit[data-value="3"] .seg-a,
.digit[data-value="3"] .seg-b,
.digit[data-value="3"] .seg-g,
.digit[data-value="3"] .seg-c,
.digit[data-value="3"] .seg-d { background: #ff2222; box-shadow: 0 0 8px #ff2222, 0 0 16px rgba(255, 34, 34, 0.6); }

.digit[data-value="4"] .seg-f,
.digit[data-value="4"] .seg-g,
.digit[data-value="4"] .seg-b,
.digit[data-value="4"] .seg-c { background: #ff2222; box-shadow: 0 0 8px #ff2222, 0 0 16px rgba(255, 34, 34, 0.6); }

.digit[data-value="5"] .seg-a,
.digit[data-value="5"] .seg-f,
.digit[data-value="5"] .seg-g,
.digit[data-value="5"] .seg-c,
.digit[data-value="5"] .seg-d { background: #ff2222; box-shadow: 0 0 8px #ff2222, 0 0 16px rgba(255, 34, 34, 0.6); }

.digit[data-value="6"] .seg-a,
.digit[data-value="6"] .seg-f,
.digit[data-value="6"] .seg-g,
.digit[data-value="6"] .seg-c,
.digit[data-value="6"] .seg-d,
.digit[data-value="6"] .seg-e { background: #ff2222; box-shadow: 0 0 8px #ff2222, 0 0 16px rgba(255, 34, 34, 0.6); }

.digit[data-value="7"] .seg-a,
.digit[data-value="7"] .seg-b,
.digit[data-value="7"] .seg-c { background: #ff2222; box-shadow: 0 0 8px #ff2222, 0 0 16px rgba(255, 34, 34, 0.6); }

.digit[data-value="8"] .seg-a,
.digit[data-value="8"] .seg-b,
.digit[data-value="8"] .seg-c,
.digit[data-value="8"] .seg-d,
.digit[data-value="8"] .seg-e,
.digit[data-value="8"] .seg-f,
.digit[data-value="8"] .seg-g { background: #ff2222; box-shadow: 0 0 8px #ff2222, 0 0 16px rgba(255, 34, 34, 0.6); }

.digit[data-value="9"] .seg-a,
.digit[data-value="9"] .seg-b,
.digit[data-value="9"] .seg-c,
.digit[data-value="9"] .seg-d,
.digit[data-value="9"] .seg-f,
.digit[data-value="9"] .seg-g { background: #ff2222; box-shadow: 0 0 8px #ff2222, 0 0 16px rgba(255, 34, 34, 0.6); }

/* Dos puntos separadores */
.timer-colon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    height: 64px;
    padding: 0 2px;
}

.colon-dot {
    width: 7px;
    height: 7px;
    background: #ff2222;
    border-radius: 50%;
    box-shadow: 
        0 0 8px #ff2222,
        0 0 16px rgba(255, 34, 34, 0.6);
    animation: colonBlink 1s infinite;
}

@keyframes colonBlink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0.2; }
}

/* Warning state - cambia a naranja/amarillo */
.timer-container.warning .seg {
    background: #331100 !important;
}

.timer-container.warning .digit[data-value="0"] .seg-a,
.timer-container.warning .digit[data-value="0"] .seg-b,
.timer-container.warning .digit[data-value="0"] .seg-c,
.timer-container.warning .digit[data-value="0"] .seg-d,
.timer-container.warning .digit[data-value="0"] .seg-e,
.timer-container.warning .digit[data-value="0"] .seg-f,
.timer-container.warning .digit[data-value="1"] .seg-b,
.timer-container.warning .digit[data-value="1"] .seg-c,
.timer-container.warning .digit[data-value="2"] .seg-a,
.timer-container.warning .digit[data-value="2"] .seg-b,
.timer-container.warning .digit[data-value="2"] .seg-g,
.timer-container.warning .digit[data-value="2"] .seg-e,
.timer-container.warning .digit[data-value="2"] .seg-d,
.timer-container.warning .digit[data-value="3"] .seg-a,
.timer-container.warning .digit[data-value="3"] .seg-b,
.timer-container.warning .digit[data-value="3"] .seg-g,
.timer-container.warning .digit[data-value="3"] .seg-c,
.timer-container.warning .digit[data-value="3"] .seg-d,
.timer-container.warning .digit[data-value="4"] .seg-f,
.timer-container.warning .digit[data-value="4"] .seg-g,
.timer-container.warning .digit[data-value="4"] .seg-b,
.timer-container.warning .digit[data-value="4"] .seg-c,
.timer-container.warning .digit[data-value="5"] .seg-a,
.timer-container.warning .digit[data-value="5"] .seg-f,
.timer-container.warning .digit[data-value="5"] .seg-g,
.timer-container.warning .digit[data-value="5"] .seg-c,
.timer-container.warning .digit[data-value="5"] .seg-d,
.timer-container.warning .digit[data-value="6"] .seg-a,
.timer-container.warning .digit[data-value="6"] .seg-f,
.timer-container.warning .digit[data-value="6"] .seg-g,
.timer-container.warning .digit[data-value="6"] .seg-c,
.timer-container.warning .digit[data-value="6"] .seg-d,
.timer-container.warning .digit[data-value="6"] .seg-e,
.timer-container.warning .digit[data-value="7"] .seg-a,
.timer-container.warning .digit[data-value="7"] .seg-b,
.timer-container.warning .digit[data-value="7"] .seg-c,
.timer-container.warning .digit[data-value="8"] .seg-a,
.timer-container.warning .digit[data-value="8"] .seg-b,
.timer-container.warning .digit[data-value="8"] .seg-c,
.timer-container.warning .digit[data-value="8"] .seg-d,
.timer-container.warning .digit[data-value="8"] .seg-e,
.timer-container.warning .digit[data-value="8"] .seg-f,
.timer-container.warning .digit[data-value="8"] .seg-g,
.timer-container.warning .digit[data-value="9"] .seg-a,
.timer-container.warning .digit[data-value="9"] .seg-b,
.timer-container.warning .digit[data-value="9"] .seg-c,
.timer-container.warning .digit[data-value="9"] .seg-d,
.timer-container.warning .digit[data-value="9"] .seg-f,
.timer-container.warning .digit[data-value="9"] .seg-g {
    background: #ffaa00 !important;
    box-shadow: 0 0 8px #ffaa00, 0 0 16px rgba(255, 170, 0, 0.6) !important;
    animation: warningPulse 0.5s infinite;
}

.timer-container.warning .colon-dot {
    background: #ffaa00;
    box-shadow: 0 0 8px #ffaa00, 0 0 16px rgba(255, 170, 0, 0.6);
    animation: colonBlink 0.3s infinite, warningPulse 0.5s infinite;
}

@keyframes warningPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.timer-bar {
    width: 200px;
    height: 6px;
    background: #1a1a1a;
    border-radius: 3px;
    margin-top: 0.5rem;
    overflow: hidden;
    border: 1px solid #333;
}

.timer-fill {
    height: 100%;
    background: linear-gradient(90deg, #33ff33, #ffaa00, #ff3333);
    width: 100%;
    transition: width 1s linear;
    box-shadow: 0 0 10px currentColor;
}

/* Strikes */
.strikes-container {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.strikes-display {
    display: flex;
    gap: 0.5rem;
}

.strike {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-dim);
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.strike.active {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: white;
    box-shadow: var(--glow-red);
}

.serial-number {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.serial-number span:last-child {
    color: var(--accent-yellow);
    font-weight: 700;
    margin-left: 0.5rem;
    letter-spacing: 0.1em;
}

/* ===============================================
   CAJA DE LA BOMBA - ESTILO MILITAR GUERRA FRÍA
   =============================================== */

.bomb-box-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    perspective: 1000px;
}

.bomb-box {
    position: relative;
    width: 938px;
    height: 650px;
    background: 
        linear-gradient(180deg, 
            #5a6a4a 0%, 
            #4a5a3a 15%, 
            #3a4a2a 50%, 
            #4a5a3a 85%, 
            #2a3a1a 100%
        );
    border: 6px solid #3a4a2a;
    border-radius: 4px;
    box-shadow: 
        inset 0 2px 0 rgba(255, 255, 255, 0.1),
        inset 0 -2px 0 rgba(0, 0, 0, 0.3),
        inset 0 0 50px rgba(0, 0, 0, 0.3),
        0 10px 40px rgba(0, 0, 0, 0.6),
        0 2px 4px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

/* Textura de metal rugoso */
.bomb-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.08;
    pointer-events: none;
}

.box-edge {
    position: absolute;
    background: linear-gradient(90deg, #2a3a1a, #4a5a3a, #2a3a1a);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.box-edge.top {
    top: 15px;
    left: 15px;
    right: 15px;
    height: 3px;
    width: calc(100% - 30px);
}

.box-edge.right {
    top: 15px;
    right: 15px;
    width: 3px;
    height: calc(100% - 30px);
    background: linear-gradient(180deg, #2a3a1a, #4a5a3a, #2a3a1a);
}

.box-edge.bottom {
    bottom: 15px;
    left: 15px;
    right: 15px;
    height: 3px;
    width: calc(100% - 30px);
}

.box-edge.left {
    top: 15px;
    left: 15px;
    width: 3px;
    height: calc(100% - 30px);
    background: linear-gradient(180deg, #2a3a1a, #4a5a3a, #2a3a1a);
}

/* ===============================================
   PANELES DESLIZANTES
   =============================================== */

.panels-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.module-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    transform: translateX(100%);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    opacity: 0;
}

.module-panel.active {
    transform: translateX(0);
    opacity: 1;
}

.module-panel.solved {
    transform: translateX(-100%);
    opacity: 0;
}

.panel-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Indicador de módulo - parte inferior derecha de la pantalla */
.module-indicator {
    position: fixed;
    bottom: 120px;
    right: 40px;
    display: flex;
    gap: 1rem;
    z-index: 100;
}

/* Botón SKIP en el header */
.btn-skip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(180deg, #aa7733 0%, #886622 50%, #664411 100%);
    border: 3px solid #997744;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffeedd;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 
        0 4px 0 #332200,
        0 6px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.1s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.btn-skip:hover {
    background: linear-gradient(180deg, #bb8844 0%, #997733 50%, #775522 100%);
    box-shadow: 
        0 4px 0 #332200,
        0 6px 15px rgba(0, 0, 0, 0.4),
        0 0 10px rgba(255, 170, 0, 0.2);
}

.btn-skip:active {
    transform: translateY(3px);
    box-shadow: 
        0 1px 0 #551155,
        0 2px 5px rgba(0, 0, 0, 0.3);
}

.skip-icon {
    font-size: 1rem;
}

.indicator-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #333;
    border: 2px solid #555;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.5),
        0 1px 2px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.indicator-dot.active {
    background: #00ff00;
    border-color: #00aa00;
    box-shadow: 
        0 0 10px #00ff00,
        0 0 20px #00ff00,
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}

.indicator-dot.completed {
    background: #00ff00;
    border-color: #00aa00;
    box-shadow: 
        0 0 5px #00ff00,
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}

/* ===============================================
   BOTÓN DE TEST - SOLO DESARROLLO
   =============================================== */

.btn-test-skip {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 1000;
    padding: 8px 16px;
    background: linear-gradient(180deg, #ff00ff 0%, #aa00aa 50%, #660066 100%);
    border: 3px solid #ff00ff;
    border-radius: 8px;
    color: white;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 
        0 4px 0 #440044,
        0 0 20px rgba(255, 0, 255, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.1s ease;
    animation: testBtnPulse 2s ease-in-out infinite;
}

.btn-test-skip:hover {
    background: linear-gradient(180deg, #ff44ff 0%, #cc00cc 50%, #880088 100%);
    box-shadow: 
        0 4px 0 #440044,
        0 0 30px rgba(255, 0, 255, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-test-skip:active {
    transform: translateY(3px);
    box-shadow: 
        0 1px 0 #440044,
        0 0 15px rgba(255, 0, 255, 0.5);
}

@keyframes testBtnPulse {
    0%, 100% { 
        box-shadow: 
            0 4px 0 #440044,
            0 0 20px rgba(255, 0, 255, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    50% { 
        box-shadow: 
            0 4px 0 #440044,
            0 0 35px rgba(255, 0, 255, 0.8),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}


/* Footer del juego */
.game-footer {
    padding: 1rem 2rem;
    background: var(--bg-secondary);
    border-top: 2px solid var(--border-color);
}

.indicators {
    display: flex;
    justify-content: center;
    gap: 3rem;
    align-items: center;
}

.indicator-group, .batteries-group, .ports-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.indicator-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
}

.indicators-list, .ports-list {
    display: flex;
    gap: 0.5rem;
}

.indicator-tag {
    padding: 0.3rem 0.6rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--text-primary);
}

.indicator-tag.lit {
    background: rgba(0, 240, 255, 0.2);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.port-tag {
    padding: 0.3rem 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

#batteries-count {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-yellow);
}

/* ===============================================
   MÓDULO SIMON DICE - REALISTA
   =============================================== */

.simon-module-realistic {
    width: 100%;
    height: 100%;
    background-image: url('media/simon.png');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

/* Serial number posicionado junto al texto "SERIAL NUMBER" de la imagen */
.simon-serial-display {
    position: absolute;
    bottom: 16%;
    left: 35%;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    color: #555;
    letter-spacing: 4px;
}

/* Contenedor del panel Simon dentro del rectángulo derecho */
.simon-panel-area {
    position: absolute;
    top: 40%;
    right: calc(16% + 10px);
    transform: translateY(-50%);
    width: 180px;
    height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.simon-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    padding: 8px;
    background: radial-gradient(circle, #222 0%, #0a0a0a 100%);
    border-radius: 50%;
    box-shadow: 
        inset 0 0 40px rgba(0, 0, 0, 0.9),
        0 0 15px rgba(0, 0, 0, 0.6),
        0 4px 8px rgba(0, 0, 0, 0.4);
    border: 3px solid #333;
}

.simon-btn {
    width: 68px;
    height: 68px;
    border: none;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.15s ease;
    position: relative;
    overflow: hidden;
}

.simon-btn::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 15%;
    width: 30%;
    height: 20%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    filter: blur(3px);
}

.simon-btn:hover {
    opacity: 0.6;
}

.simon-btn.lit {
    opacity: 1;
    box-shadow: 
        0 0 30px currentColor,
        0 0 60px currentColor,
        inset 0 0 20px rgba(255, 255, 255, 0.3);
}

.simon-btn.red { 
    background: radial-gradient(circle at 30% 30%, #ff6b6b 0%, #cc0000 50%, #800000 100%);
    color: #ff4444;
    border-radius: 70px 10px 10px 10px;
}

.simon-btn.blue { 
    background: radial-gradient(circle at 70% 30%, #6b9fff 0%, #0044cc 50%, #002266 100%);
    color: #4488ff;
    border-radius: 10px 70px 10px 10px;
}

.simon-btn.green { 
    background: radial-gradient(circle at 30% 70%, #6bff6b 0%, #00cc00 50%, #006600 100%);
    color: #44ff44;
    border-radius: 10px 10px 10px 70px;
}

.simon-btn.yellow { 
    background: radial-gradient(circle at 70% 70%, #ffff6b 0%, #ccaa00 50%, #665500 100%);
    color: #ffdd00;
    border-radius: 10px 10px 70px 10px;
}

/* Controles en la zona izquierda de la imagen */
.simon-controls-area {
    position: absolute;
    top: 45%;
    left: 12%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

/* Display de etapa con 7 segmentos */
.stage-display-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stage-label {
    font-family: var(--font-display);
    font-size: 0.6rem;
    color: #666;
    letter-spacing: 2px;
}

.stage-seven-segment {
    background: linear-gradient(180deg, #0d0d0d 0%, #050505 100%);
    border: 3px solid #2a2a2a;
    border-radius: 5px;
    padding: 10px 15px;
    box-shadow: 
        inset 0 0 25px rgba(0, 0, 0, 0.9),
        0 3px 6px rgba(0, 0, 0, 0.5),
        0 0 0 1px #1a1a1a;
    position: relative;
    overflow: hidden;
}

.stage-seven-segment::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 1px,
            rgba(0, 50, 0, 0.1) 1px,
            rgba(0, 50, 0, 0.1) 2px
        );
    pointer-events: none;
}

.stage-digits {
    font-family: 'Consolas', 'Monaco', 'Lucida Console', monospace;
    font-size: 1.6rem;
    font-weight: bold;
    color: #39ff14;
    text-shadow: 
        0 0 5px #39ff14,
        0 0 10px #39ff14,
        0 0 20px #39ff14,
        0 0 40px rgba(57, 255, 20, 0.3);
    letter-spacing: 4px;
    position: relative;
    z-index: 1;
}

.stage-digits .dim {
    color: #0a3d0a;
    text-shadow: none;
}

/* Display LCD verde retro */
.lcd-display {
    background: linear-gradient(180deg, #3d4a1f 0%, #4a5c23 50%, #3d4a1f 100%);
    border: 4px solid #1a1a1a;
    border-radius: 4px;
    padding: 8px 15px;
    box-shadow: 
        inset 0 0 15px rgba(0, 0, 0, 0.6),
        0 2px 4px rgba(0, 0, 0, 0.5),
        0 0 0 2px #333;
    position: relative;
    overflow: hidden;
}

.lcd-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 1px,
            rgba(0, 0, 0, 0.15) 1px,
            rgba(0, 0, 0, 0.15) 2px
        );
    pointer-events: none;
}

.lcd-text {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: bold;
    color: #1a2e0a;
    text-shadow: 
        1px 1px 0 #3a4a1a;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

/* Display de 7 segmentos verde */
.seven-segment-display {
    background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 3px solid #333;
    border-radius: 4px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 
        inset 0 0 20px rgba(0, 0, 0, 0.8),
        0 2px 4px rgba(0, 0, 0, 0.5);
}

.segment-digit {
    font-family: 'DSEG7 Classic', 'Courier New', monospace;
    font-size: 1.8rem;
    font-weight: bold;
    color: #33ff33;
    text-shadow: 
        0 0 10px #33ff33,
        0 0 20px #33ff33,
        0 0 30px rgba(51, 255, 51, 0.5);
    letter-spacing: 2px;
}

.segment-label {
    font-family: var(--font-display);
    font-size: 0.6rem;
    color: #666;
    letter-spacing: 1px;
}

/* Estilo alternativo con CSS para simular 7 segmentos */
.digit-display {
    display: inline-block;
    background: #0a0a0a;
    padding: 5px 8px;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 1.5rem;
    font-weight: bold;
    color: #39ff14;
    text-shadow: 
        0 0 5px #39ff14,
        0 0 10px #39ff14,
        0 0 20px #39ff14,
        0 0 40px rgba(57, 255, 20, 0.4);
    letter-spacing: 3px;
    border: 2px solid #222;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
}

/* Botón realista de ver secuencia */
.btn-sequence-realistic {
    width: 130px;
    height: 55px;
    background: linear-gradient(180deg, #555 0%, #333 40%, #222 100%);
    border: 3px solid #444;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    box-shadow: 
        0 6px 0 #111,
        0 8px 15px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    transition: all 0.1s ease;
}

.btn-sequence-realistic:hover {
    background: linear-gradient(180deg, #666 0%, #444 40%, #333 100%);
}

.btn-sequence-realistic:active {
    transform: translateY(5px);
    box-shadow: 
        0 1px 0 #111,
        0 2px 5px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-sequence-realistic span {
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 700;
    color: #ccc;
    letter-spacing: 1px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

/* LED indicador en el botón */
.btn-led {
    position: absolute;
    top: 5px;
    right: 10px;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle at 30% 30%, #440000 0%, #220000 100%);
    border-radius: 50%;
    border: 1px solid #333;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
}

.btn-led.active {
    background: radial-gradient(circle at 30% 30%, #ff4444 0%, #cc0000 100%);
    border-color: #aa0000;
    box-shadow: 
        0 0 8px #ff0000,
        0 0 15px #ff0000,
        0 0 25px rgba(255, 0, 0, 0.5),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}

/* ===============================================
   MÓDULO DE ENGRANAJES - REALISTA
   =============================================== */

.gears-module-realistic {
    width: 100%;
    height: 100%;
    background-image: url('media/engranajes.png');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    position: relative;
}

/* Ventana de visualización de engranajes */
.gears-window {
    position: absolute;
    top: 40%;
    right: 160px;
    transform: translateY(-50%);
    width: 190px;
    height: 190px;
    background: 
        radial-gradient(ellipse at center, #1a1a1a 0%, #0a0a0a 100%);
    border: 6px solid #333;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 
        inset 0 0 40px rgba(0, 0, 0, 0.9),
        inset 0 0 10px rgba(57, 255, 20, 0.05),
        0 4px 15px rgba(0, 0, 0, 0.5);
}

.gears-window::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 10;
}

.gears-chain {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.gear {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    aspect-ratio: 1 / 1;
}

/* Cuerpo principal del engranaje */
.gear-body {
    position: absolute;
    width: 70%;
    height: 70%;
    border-radius: 50%;
    box-shadow: 
        inset 0 0 15px rgba(0, 0, 0, 0.6),
        0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Centro del engranaje (eje) */
.gear-center {
    position: absolute;
    width: 25%;
    height: 25%;
    background: radial-gradient(circle at 35% 35%, #555 0%, #222 70%, #111 100%);
    border-radius: 50%;
    border: 2px solid #333;
    box-shadow: 
        inset 0 1px 3px rgba(255, 255, 255, 0.2),
        inset 0 -2px 5px rgba(0, 0, 0, 0.5),
        0 2px 5px rgba(0, 0, 0, 0.5);
    z-index: 5;
}

/* Agujero central */
.gear-center::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40%;
    height: 40%;
    background: #0a0a0a;
    border-radius: 50%;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.8);
}

/* Contenedor de dientes */
.gear-teeth-container {
    position: absolute;
    width: 100%;
    height: 100%;
}

/* Diente individual del engranaje - forma trapezoidal */
.gear-tooth {
    position: absolute;
    width: 14%;
    height: 20%;
    left: 50%;
    top: -2%;
    transform-origin: 50% 260%;
    clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
    box-shadow: 
        inset 0 2px 3px rgba(255, 255, 255, 0.4),
        inset 0 -2px 3px rgba(0, 0, 0, 0.4);
}

/* Borde del diente para dar profundidad */
.gear-tooth::after {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 30%;
    background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, transparent 100%);
    clip-path: polygon(10% 0%, 90% 0%, 100% 100%, 0% 100%);
}

/* Etiqueta de número de dientes */
.gear-label {
    position: absolute;
    bottom: -20px;
    font-size: 0.6rem;
    color: #39ff14;
    font-family: var(--font-display);
    white-space: nowrap;
    text-shadow: 0 0 5px #39ff14;
    z-index: 10;
}

@keyframes rotateCW {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotateCCW {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

/* Panel de control izquierdo */
.gears-control-panel {
    position: absolute;
    left: 160px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* Display LCD para información - estilo 7 segmentos verde */
.gears-lcd {
    background: linear-gradient(180deg, #0d0d0d 0%, #050505 100%);
    border: 2px solid #2a2a2a;
    border-radius: 4px;
    padding: 8px 12px;
    box-shadow: 
        inset 0 0 20px rgba(0, 0, 0, 0.9),
        0 2px 5px rgba(0, 0, 0, 0.5),
        0 0 0 1px #1a1a1a;
    position: relative;
    overflow: hidden;
}

.gears-lcd::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 1px,
            rgba(0, 50, 0, 0.1) 1px,
            rgba(0, 50, 0, 0.1) 2px
        );
    pointer-events: none;
}

.gears-lcd-text {
    font-family: 'Consolas', 'Monaco', 'Lucida Console', monospace;
    font-size: 0.75rem;
    font-weight: bold;
    color: #39ff14;
    text-shadow: 
        0 0 5px #39ff14,
        0 0 10px #39ff14,
        0 0 15px #39ff14;
    letter-spacing: 1px;
}

/* Potenciómetro realista */
.potentiometer-realistic {
    position: relative;
    width: 90px;
    height: 90px;
}

.pot-body {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: 
        radial-gradient(circle at 35% 35%, #666 0%, #333 50%, #1a1a1a 100%);
    border: 3px solid #222;
    box-shadow: 
        0 6px 15px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.15),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    user-select: none;
    position: relative;
}

.pot-cap {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 38px;
    height: 38px;
    background: 
        radial-gradient(circle at 35% 35%, #888 0%, #444 50%, #222 100%);
    border-radius: 50%;
    border: 2px solid #333;
    box-shadow: 
        0 3px 8px rgba(0, 0, 0, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.pot-indicator-line {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 18px;
    background: #fff;
    border-radius: 2px;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    transform-origin: center 39px;
}

.pot-marks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.pot-mark-line {
    position: absolute;
    width: 2px;
    height: 8px;
    background: #666;
    left: 50%;
    top: 0;
    transform-origin: center 45px;
}

.pot-mark-line:nth-child(1) { transform: translateX(-50%) rotate(-135deg); }
.pot-mark-line:nth-child(2) { transform: translateX(-50%) rotate(-90deg); }
.pot-mark-line:nth-child(3) { transform: translateX(-50%) rotate(-45deg); }
.pot-mark-line:nth-child(4) { transform: translateX(-50%) rotate(0deg); }
.pot-mark-line:nth-child(5) { transform: translateX(-50%) rotate(45deg); }
.pot-mark-line:nth-child(6) { transform: translateX(-50%) rotate(90deg); }
.pot-mark-line:nth-child(7) { transform: translateX(-50%) rotate(135deg); }

/* Interruptor de palanca vintage */
.toggle-switch-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
}

.toggle-labels {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0 2px;
}

.toggle-label {
    font-family: var(--font-display);
    font-size: 0.55rem;
    font-weight: 700;
    color: #555;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.toggle-label.active {
    color: #39ff14;
    text-shadow: 0 0 8px #39ff14;
}

.toggle-label.active.ccw-active {
    color: #ff4444;
    text-shadow: 0 0 8px #ff4444;
}

.toggle-switch-vintage {
    position: relative;
    width: 50px;
    height: 70px;
    background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 3px solid #333;
    border-radius: 8px;
    box-shadow: 
        inset 0 0 15px rgba(0, 0, 0, 0.8),
        0 3px 8px rgba(0, 0, 0, 0.5),
        0 0 0 1px #222;
    cursor: pointer;
    overflow: visible;
    perspective: 200px;
}

/* LED indicador */
.toggle-switch-vintage::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #39ff14;
    border-radius: 50%;
    box-shadow: 0 0 8px #39ff14, 0 0 15px #39ff14;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toggle-switch-vintage.cw::before {
    opacity: 1;
    background: #39ff14;
    box-shadow: 0 0 8px #39ff14, 0 0 15px #39ff14;
}

.toggle-switch-vintage.ccw::before {
    opacity: 1;
    background: #ff4444;
    box-shadow: 0 0 8px #ff4444, 0 0 15px #ff4444;
}

.toggle-lever {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    width: 30px;
    height: 55px;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.toggle-lever-base {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 15px;
    background: linear-gradient(180deg, #555 0%, #333 50%, #222 100%);
    border-radius: 4px;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.5);
}

.toggle-lever-handle {
    position: absolute;
    left: 50%;
    bottom: 15px;
    transform: translateX(-50%);
    width: 14px;
    height: 35px;
    background: linear-gradient(90deg, #777 0%, #999 30%, #bbb 50%, #999 70%, #777 100%);
    border-radius: 5px 5px 3px 3px;
    box-shadow: 
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        inset 0 -2px 0 rgba(0, 0, 0, 0.2),
        1px 0 3px rgba(0, 0, 0, 0.3),
        -1px 0 3px rgba(0, 0, 0, 0.3);
}

.toggle-lever-handle::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 2px;
    background: #444;
    border-radius: 1px;
}

.toggle-lever-handle::after {
    content: '';
    position: absolute;
    top: 9px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 2px;
    background: #444;
    border-radius: 1px;
}

.toggle-lever-ball {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 18px;
    background: radial-gradient(circle at 35% 35%, #ddd 0%, #999 50%, #666 100%);
    border-radius: 50%;
    box-shadow: 
        0 2px 5px rgba(0, 0, 0, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

/* Posición CW (normal) */
.toggle-switch-vintage.cw .toggle-lever {
    transform: translateX(-50%) translateY(-50%) rotateX(0deg);
}

/* Posición CCW (invertido) */
.toggle-switch-vintage.ccw .toggle-lever {
    transform: translateX(-50%) translateY(-50%) rotateX(180deg);
}

/* Efecto hover */
.toggle-switch-vintage:hover .toggle-lever-handle {
    background: linear-gradient(90deg, #888 0%, #aaa 30%, #ccc 50%, #aaa 70%, #888 100%);
}

.toggle-switch-vintage:active .toggle-lever-ball {
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.rpm-lcd {
    margin-top: 10px;
    background: linear-gradient(180deg, #0d0d0d 0%, #050505 100%);
    border: 2px solid #2a2a2a;
    border-radius: 4px;
    padding: 6px 12px;
    box-shadow: 
        inset 0 0 20px rgba(0, 0, 0, 0.9),
        0 2px 5px rgba(0, 0, 0, 0.5),
        0 0 0 1px #1a1a1a;
    position: relative;
    overflow: hidden;
}

.rpm-lcd::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 1px,
            rgba(0, 50, 0, 0.1) 1px,
            rgba(0, 50, 0, 0.1) 2px
        );
    pointer-events: none;
}

.rpm-lcd-text {
    font-family: 'Consolas', 'Monaco', 'Lucida Console', monospace;
    font-size: 1.1rem;
    font-weight: bold;
    color: #39ff14;
    text-shadow: 
        0 0 5px #39ff14,
        0 0 10px #39ff14,
        0 0 20px #39ff14;
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
}

/* Botón Validar realista */
.btn-validate-realistic {
    width: 90px;
    height: 40px;
    background: linear-gradient(180deg, #666 0%, #444 40%, #333 100%);
    border: 3px solid #555;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    box-shadow: 
        0 5px 0 #222,
        0 7px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    transition: all 0.1s ease;
}

.btn-validate-realistic:hover {
    background: linear-gradient(180deg, #777 0%, #555 40%, #444 100%);
}

.btn-validate-realistic:active {
    transform: translateY(4px);
    box-shadow: 
        0 1px 0 #222,
        0 2px 6px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-validate-realistic span {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    color: #ddd;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
    letter-spacing: 1px;
}

/* ===============================================
   MÓDULO DE BATERÍA - REALISTA
   =============================================== */

.battery-module-realistic {
    width: 100%;
    height: 100%;
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    position: relative;
}

/* Fondos según química de batería */
.battery-module-realistic[data-chemistry="LFP"] {
    background-image: url('media/Bateria_LFP.png');
}

.battery-module-realistic[data-chemistry="NCA"] {
    background-image: url('media/Bateria_NCA.png');
}

.battery-module-realistic[data-chemistry="NMC"] {
    background-image: url('media/Bateria_NMC.png');
}

/* Botón transparente de inspeccionar sobre el rectángulo azul */
.btn-inspect-battery {
    position: absolute;
    top: 16%;
    right: 4%;
    width: 190px;
    height: 340px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.btn-inspect-battery:hover .inspect-text {
    text-shadow: 
        0 0 5px #00f0ff,
        0 0 10px #00f0ff,
        0 0 20px #00f0ff,
        0 0 40px #00f0ff;
}

.btn-inspect-battery:hover .inspect-icon {
    filter: drop-shadow(0 0 15px #00f0ff) drop-shadow(0 0 30px #00f0ff);
    transform: scale(1.1);
}

.btn-inspect-battery:active {
    transform: scale(0.98);
}

.inspect-text {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    color: #00f0ff;
    text-shadow: 
        0 0 5px #00f0ff,
        0 0 10px rgba(0, 240, 255, 0.5);
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.inspect-icon {
    font-size: 3rem;
    transition: all 0.3s ease;
}

/* Lupa neón SVG */
.inspect-icon svg {
    width: 60px;
    height: 60px;
    stroke: #00f0ff;
    stroke-width: 3;
    fill: none;
    filter: drop-shadow(0 0 8px #00f0ff) drop-shadow(0 0 15px rgba(0, 240, 255, 0.5));
    transition: all 0.3s ease;
}

/* Modal de inspección de batería */
.battery-inspect-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.battery-inspect-modal.active {
    opacity: 1;
    visibility: visible;
}

.battery-modal-content {
    background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
    border: 4px solid #333;
    border-radius: 16px;
    width: 500px;
    max-width: 95vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 
        0 0 0 2px rgba(0, 240, 255, 0.3),
        0 20px 60px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-30px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.battery-modal-header {
    background: linear-gradient(180deg, #ff4444 0%, #cc0000 100%);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #880000;
}

.modal-title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

.btn-close-modal {
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
}

.battery-modal-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Dispositivo de batería - ahora dentro del modal */
.battery-device-realistic {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #2a2a3a 0%, #1a1a2a 100%);
    border: 4px solid #444;
    border-radius: 12px;
    padding: 25px;
    width: 400px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Cables visibles */
.wires-display {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    border: 2px solid #333;
}

.wire-realistic {
    width: 100px;
    height: 16px;
    border-radius: 8px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wire-realistic:hover {
    transform: scale(1.05);
}

.wire-realistic.red {
    background: linear-gradient(180deg, #ff7777 0%, #ff4444 40%, #cc0000 100%);
    box-shadow: 
        0 3px 0 #880000,
        0 5px 15px rgba(255, 68, 68, 0.4);
}

.wire-realistic.blue {
    background: linear-gradient(180deg, #77aaff 0%, #4488ff 40%, #0044cc 100%);
    box-shadow: 
        0 3px 0 #002288,
        0 5px 15px rgba(68, 136, 255, 0.4);
}

.wire-realistic::before,
.wire-realistic::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: #333;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    border: 2px solid #555;
}

.wire-realistic::before { left: 3px; }
.wire-realistic::after { right: 3px; }

/* Batería principal */
.battery-cell-realistic {
    background: linear-gradient(180deg, #666 0%, #444 50%, #333 100%);
    border: 3px solid #555;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    margin-bottom: 15px;
}

.battery-cell-realistic .battery-label {
    font-family: var(--font-display);
    font-size: 1rem;
    color: #ddd;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* LCD para datos - Estilo 7 segmentos verde */
.battery-lcd {
    background: linear-gradient(180deg, #0d0d0d 0%, #050505 100%);
    border: 3px solid #2a2a2a;
    border-radius: 6px;
    padding: 12px 15px;
    box-shadow: 
        inset 0 0 25px rgba(0, 0, 0, 0.9),
        0 3px 6px rgba(0, 0, 0, 0.5),
        0 0 0 1px #1a1a1a;
    position: relative;
    overflow: hidden;
}

.battery-lcd::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 1px,
            rgba(0, 50, 0, 0.1) 1px,
            rgba(0, 50, 0, 0.1) 2px
        );
    pointer-events: none;
    border-radius: 4px;
}

.battery-lcd-row {
    display: flex;
    justify-content: space-between;
    font-family: 'Consolas', 'Monaco', 'Lucida Console', monospace;
    font-size: 0.85rem;
    font-weight: bold;
    color: #39ff14;
    text-shadow: 
        0 0 5px #39ff14,
        0 0 10px #39ff14,
        0 0 15px rgba(57, 255, 20, 0.5);
    margin: 5px 0;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

/* Botones de acción realistas */
.battery-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-action-realistic {
    padding: 12px 20px;
    border: 3px solid;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    transition: all 0.1s ease;
    position: relative;
}

.btn-action-realistic.nitrogen {
    background: linear-gradient(180deg, #00ccff 0%, #0088aa 50%, #006688 100%);
    border-color: #004466;
    color: white;
    box-shadow: 0 4px 0 #003344;
}

.btn-action-realistic.nitrogen:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #003344;
}

.btn-action-realistic.nitrogen.used {
    background: #444;
    border-color: #333;
    color: #666;
    box-shadow: none;
    cursor: not-allowed;
}

.btn-action-realistic.discharge {
    background: linear-gradient(180deg, #ffaa00 0%, #cc8800 50%, #996600 100%);
    border-color: #664400;
    color: white;
    box-shadow: 0 4px 0 #442200;
}

.btn-action-realistic.discharge:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #442200;
}

/* Botones de corte de cable */
.cut-wire-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 10px;
}

.btn-cut-realistic {
    padding: 15px 25px;
    border: 3px solid;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    transition: all 0.1s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-cut-realistic.red {
    background: linear-gradient(180deg, #ff5555 0%, #cc0000 50%, #990000 100%);
    border-color: #660000;
    box-shadow: 0 5px 0 #440000;
}

.btn-cut-realistic.blue {
    background: linear-gradient(180deg, #5588ff 0%, #0044cc 50%, #003399 100%);
    border-color: #002266;
    box-shadow: 0 5px 0 #001144;
}

.btn-cut-realistic:hover {
    filter: brightness(1.1);
}

.btn-cut-realistic:active {
    transform: translateY(4px);
    box-shadow: 0 1px 0 #000;
}

.wire-sample {
    width: 25px;
    height: 6px;
    border-radius: 3px;
}

.wire-sample.red {
    background: linear-gradient(90deg, #ff6666, #cc0000);
}

.wire-sample.blue {
    background: linear-gradient(90deg, #66aaff, #0044cc);
}

/* Modal de confirmación de corte */
.cut-confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cut-confirm-modal.active {
    opacity: 1;
    visibility: visible;
}

.cut-confirm-content {
    background: linear-gradient(180deg, #1a1a2e 0%, #0a0a15 100%);
    border: 4px solid #ff4444;
    border-radius: 16px;
    width: 420px;
    max-width: 90vw;
    overflow: hidden;
    box-shadow: 
        0 0 0 2px rgba(255, 68, 68, 0.5),
        0 0 50px rgba(255, 0, 0, 0.3),
        0 20px 60px rgba(0, 0, 0, 0.8);
    animation: confirmModalPulse 0.4s ease-out;
}

@keyframes confirmModalPulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.cut-confirm-header {
    background: linear-gradient(180deg, #ff4444 0%, #cc0000 100%);
    padding: 18px 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-bottom: 3px solid #880000;
}

.confirm-warning-icon {
    font-size: 1.8rem;
    animation: warningPulse 1s ease-in-out infinite;
}

@keyframes warningPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.confirm-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 3px;
}

.cut-confirm-body {
    padding: 30px 25px;
    text-align: center;
}

.confirm-message {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: #e0e7ff;
    margin-bottom: 12px;
}

.confirm-warning {
    font-family: var(--font-display);
    font-size: 1rem;
    color: #ff6b6b;
}

.confirm-warning strong {
    color: #ff4444;
    font-size: 1.2rem;
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

.cut-confirm-buttons {
    display: flex;
    gap: 15px;
    padding: 0 25px 25px 25px;
    justify-content: center;
}

.btn-confirm-cut {
    flex: 1;
    padding: 15px 25px;
    background: linear-gradient(180deg, #ff5555 0%, #cc0000 50%, #990000 100%);
    border: 3px solid #660000;
    border-radius: 10px;
    color: white;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 
        0 5px 0 #440000,
        0 8px 15px rgba(0, 0, 0, 0.4);
    transition: all 0.1s ease;
}

.btn-confirm-cut:hover {
    background: linear-gradient(180deg, #ff6666 0%, #dd1111 50%, #aa0000 100%);
}

.btn-confirm-cut:active {
    transform: translateY(4px);
    box-shadow: 0 1px 0 #440000;
}

.btn-cancel-cut {
    flex: 1;
    padding: 15px 25px;
    background: linear-gradient(180deg, #555 0%, #333 50%, #222 100%);
    border: 3px solid #444;
    border-radius: 10px;
    color: #ccc;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 
        0 5px 0 #111,
        0 8px 15px rgba(0, 0, 0, 0.4);
    transition: all 0.1s ease;
}

.btn-cancel-cut:hover {
    background: linear-gradient(180deg, #666 0%, #444 50%, #333 100%);
    color: white;
}

.btn-cancel-cut:active {
    transform: translateY(4px);
    box-shadow: 0 1px 0 #111;
}

/* ===============================================
   PANTALLAS DE RESULTADO - Estilo Militar
   =============================================== */

.result-container {
    text-align: center;
    padding: 3rem;
    animation: fadeInUp 0.5s ease;
    background: 
        radial-gradient(ellipse at center, rgba(51, 255, 102, 0.03) 0%, transparent 60%),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(51, 255, 51, 0.02) 2px,
            rgba(51, 255, 51, 0.02) 4px
        );
}

.result-container.win {
    color: var(--accent-green);
}

.result-container.win h1 {
    text-shadow: 
        0 0 10px var(--accent-green),
        0 0 20px var(--accent-green),
        0 0 40px rgba(51, 255, 51, 0.3);
}

.result-container.lose {
    color: var(--accent-red);
}

.result-container.lose h1 {
    text-shadow: 
        0 0 10px var(--accent-red),
        0 0 20px var(--accent-red),
        0 0 40px rgba(204, 32, 32, 0.3);
}

.result-icon {
    font-size: 6rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 20px currentColor);
}

.result-container h1 {
    font-family: var(--font-display);
    font-size: 3rem;
    letter-spacing: 0.2em;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.result-message {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.stats-box {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(26, 42, 26, 0.8);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: inline-flex;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 0 0 10px currentColor;
}

.stat-value.penalty {
    color: var(--accent-red);
}

.btn-next, .btn-retry, .btn-play-again {
    padding: 1rem 2.5rem;
    border: 3px solid;
    border-radius: 4px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.btn-next {
    background: linear-gradient(180deg, #3a6a3a 0%, #2a5a2a 50%, #1a4a1a 100%);
    border-color: #4a7a4a;
    color: #ddeedd;
    box-shadow: 
        0 5px 0 #0a2a0a,
        0 7px 15px rgba(0, 0, 0, 0.4);
}

.btn-next:hover {
    background: linear-gradient(180deg, #4a7a4a 0%, #3a6a3a 50%, #2a5a2a 100%);
    box-shadow: 
        0 5px 0 #0a2a0a,
        0 7px 20px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(51, 255, 51, 0.2);
}

.btn-next:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #0a2a0a;
}

.btn-retry {
    background: linear-gradient(180deg, #8a3030 0%, #6a2020 50%, #4a1010 100%);
    border-color: #aa4040;
    color: #ffdddd;
    box-shadow: 
        0 5px 0 #2a0a0a,
        0 7px 15px rgba(0, 0, 0, 0.4);
}

.btn-retry:hover {
    background: linear-gradient(180deg, #9a4040 0%, #7a3030 50%, #5a2020 100%);
    box-shadow: 
        0 5px 0 #2a0a0a,
        0 7px 20px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(204, 32, 32, 0.2);
}

.btn-retry:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #2a0a0a;
}

/* Efecto de explosión */
.explosion-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.explosion-ring {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 3px solid var(--accent-red);
    border-radius: 50%;
    animation: explode 1s ease-out infinite;
}

.explosion-ring:nth-child(2) {
    animation-delay: 0.2s;
}

.explosion-ring:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes explode {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
        margin-left: -150px;
        margin-top: -150px;
    }
}

/* ===============================================
   RESPONSIVE
   =============================================== */

@media (max-width: 768px) {
    .glitch {
        font-size: 3rem;
    }
    
    .stats-panel {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .game-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .timer-wrapper {
        position: relative;
        left: auto;
        transform: none;
        flex-direction: column;
        gap: 8px;
    }
    
    .header-left, .header-right {
        width: 100%;
    justify-content: space-between;
    }
    
    .bomb-box {
        width: 100%;
        height: 400px;
    }
    
    .simon-btn {
        width: 70px;
        height: 70px;
    }
    
    .gears-control {
        flex-direction: column;
    }
    
    .potentiometer-container {
        width: 120px;
        height: 120px;
    }
    
    .potentiometer {
        width: 120px;
        height: 120px;
    }
    
    .indicators {
        flex-direction: column;
        gap: 1rem;
    }
    
    .timer-display {
        font-size: 2rem;
    }
}

/* ===============================================
   ANIMACIONES ADICIONALES
   =============================================== */

@keyframes explodeShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

/* ===============================================
   MÓDULO DE MEMORIA - REALISTA
   =============================================== */

.memory-module-realistic {
    width: 100%;
    height: 100%;
    background-image: url('media/memoria.png');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    position: relative;
}

/* Panel de control izquierdo dentro del rectángulo plateado */
.memory-control-panel {
    position: absolute;
    left: 12%;
    top: 50%;
    transform: translateY(-50%);
    width: 220px;
    height: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 20px 10px;
}

/* Display principal de memoria - estilo 7 segmentos verde */
.memory-display-main {
    background: linear-gradient(180deg, #0d0d0d 0%, #050505 100%);
    border: 3px solid #2a2a2a;
    border-radius: 6px;
    padding: 12px 20px;
    box-shadow: 
        inset 0 0 25px rgba(0, 0, 0, 0.9),
        0 3px 6px rgba(0, 0, 0, 0.5),
        0 0 0 1px #1a1a1a;
    position: relative;
    overflow: hidden;
    width: 100%;
    text-align: center;
}

.memory-display-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 1px,
            rgba(0, 50, 0, 0.1) 1px,
            rgba(0, 50, 0, 0.1) 2px
        );
    pointer-events: none;
    border-radius: 4px;
}

.memory-display-text {
    font-family: 'Consolas', 'Monaco', 'Lucida Console', monospace;
    font-size: 1.4rem;
    font-weight: bold;
    color: #39ff14;
    text-shadow: 
        0 0 5px #39ff14,
        0 0 10px #39ff14,
        0 0 20px #39ff14,
        0 0 40px rgba(57, 255, 20, 0.3);
    letter-spacing: 3px;
    position: relative;
    z-index: 1;
}

/* Contenedor de botones de memoria */
.memory-buttons-container {
    display: flex;
    flex-direction: row;
    gap: 8px;
    width: 100%;
    justify-content: center;
}

/* Botones de memoria con números */
.memory-btn {
    width: 48px;
    height: 55px;
    background: linear-gradient(180deg, #555 0%, #333 40%, #222 100%);
    border: 3px solid #444;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    box-shadow: 
        0 5px 0 #111,
        0 7px 12px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    transition: all 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.memory-btn:hover {
    background: linear-gradient(180deg, #666 0%, #444 40%, #333 100%);
}

.memory-btn:active {
    transform: translateY(5px);
    box-shadow: 
        0 1px 0 #111,
        0 2px 5px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.memory-btn.lit {
    background: linear-gradient(180deg, #77dd77 0%, #44aa44 40%, #228822 100%);
    border-color: #33aa33;
    box-shadow: 
        0 5px 0 #116611,
        0 7px 12px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(57, 255, 20, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.memory-btn-number {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    color: #ddd;
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.5),
        0 0 10px rgba(255, 255, 255, 0.1);
}

.memory-btn.lit .memory-btn-number {
    color: #fff;
    text-shadow: 
        0 0 10px #fff,
        0 0 20px rgba(255, 255, 255, 0.5);
}

/* Display de etapa - debajo de los botones */
.memory-stage-display {
    background: linear-gradient(180deg, #0d0d0d 0%, #050505 100%);
    border: 3px solid #2a2a2a;
    border-radius: 6px;
    padding: 10px 15px;
    box-shadow: 
        inset 0 0 25px rgba(0, 0, 0, 0.9),
        0 3px 6px rgba(0, 0, 0, 0.5),
        0 0 0 1px #1a1a1a;
    position: relative;
    overflow: hidden;
    width: 100%;
    text-align: center;
}

.memory-stage-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 1px,
            rgba(0, 50, 0, 0.1) 1px,
            rgba(0, 50, 0, 0.1) 2px
        );
    pointer-events: none;
    border-radius: 4px;
}

.memory-stage-label {
    font-family: var(--font-display);
    font-size: 0.55rem;
    font-weight: 700;
    color: #39ff14;
    text-shadow: 0 0 5px #39ff14;
    letter-spacing: 2px;
    margin-bottom: 5px;
    position: relative;
    z-index: 1;
}

.memory-stage-number {
    font-family: 'Consolas', 'Monaco', 'Lucida Console', monospace;
    font-size: 1.6rem;
    font-weight: bold;
    color: #39ff14;
    text-shadow: 
        0 0 5px #39ff14,
        0 0 10px #39ff14,
        0 0 20px #39ff14,
        0 0 40px rgba(57, 255, 20, 0.3);
    letter-spacing: 4px;
    position: relative;
    z-index: 1;
}

/* LED indicador de estado */
.memory-status-led {
    width: 12px;
    height: 12px;
    background: radial-gradient(circle at 30% 30%, #440000 0%, #220000 100%);
    border-radius: 50%;
    border: 2px solid #333;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
    position: absolute;
    top: 8px;
    right: 8px;
}

.memory-status-led.active {
    background: radial-gradient(circle at 30% 30%, #44ff44 0%, #00cc00 100%);
    border-color: #00aa00;
    box-shadow: 
        0 0 8px #00ff00,
        0 0 15px #00ff00,
        0 0 25px rgba(0, 255, 0, 0.5),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}

.memory-status-led.error {
    background: radial-gradient(circle at 30% 30%, #ff4444 0%, #cc0000 100%);
    border-color: #aa0000;
    box-shadow: 
        0 0 8px #ff0000,
        0 0 15px #ff0000,
        0 0 25px rgba(255, 0, 0, 0.5),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
    animation: ledBlink 0.3s ease-in-out 3;
}

@keyframes ledBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ===============================================
   MÓDULO DE CÓDIGO MORSE - REALISTA
   =============================================== */

.morse-module-realistic {
    width: 100%;
    height: 100%;
    background-image: url('media/morse.png');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    position: relative;
}

/* Panel de control superior - dentro del rectángulo blanco */
.morse-control-panel {
    position: absolute;
    top: 3%;
    left: 50%;
    transform: translateX(-50%);
    width: 620px;
    height: 220px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 15px 20px;
}

/* Columna izquierda: Display de frecuencia */
.morse-display-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Columna central: Potenciómetro */
.morse-pot-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Columna derecha: Botones */
.morse-buttons-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/* Display de frecuencia Mhz - estilo 7 segmentos verde */
.morse-frequency-display {
    background: linear-gradient(180deg, #0d0d0d 0%, #050505 100%);
    border: 3px solid #2a2a2a;
    border-radius: 6px;
    padding: 12px 25px;
    box-shadow: 
        inset 0 0 25px rgba(0, 0, 0, 0.9),
        0 3px 6px rgba(0, 0, 0, 0.5),
        0 0 0 1px #1a1a1a;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.morse-frequency-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 1px,
            rgba(0, 50, 0, 0.1) 1px,
            rgba(0, 50, 0, 0.1) 2px
        );
    pointer-events: none;
    border-radius: 4px;
}

.morse-frequency-label {
    font-family: var(--font-display);
    font-size: 0.5rem;
    font-weight: 700;
    color: #39ff14;
    text-shadow: 0 0 5px #39ff14;
    letter-spacing: 2px;
    margin-bottom: 5px;
    position: relative;
    z-index: 1;
}

.morse-frequency-value {
    font-family: 'Consolas', 'Monaco', 'Lucida Console', monospace;
    font-size: 2rem;
    font-weight: bold;
    color: #39ff14;
    text-shadow: 
        0 0 5px #39ff14,
        0 0 10px #39ff14,
        0 0 20px #39ff14,
        0 0 40px rgba(57, 255, 20, 0.3);
    letter-spacing: 3px;
    position: relative;
    z-index: 1;
}

.morse-frequency-unit {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    color: #39ff14;
    text-shadow: 0 0 5px #39ff14;
    margin-left: 5px;
}

/* Potenciómetro de frecuencia - estilo dorado */
.morse-potentiometer {
    position: relative;
    width: 100px;
    height: 100px;
}

.morse-pot-body {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: 
        radial-gradient(circle at 35% 35%, #d4a84b 0%, #a67c30 40%, #8b6914 70%, #604008 100%);
    border: 4px solid #4a3506;
    box-shadow: 
        0 6px 15px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(255, 215, 100, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.4),
        0 0 0 2px #2a2a2a;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.morse-pot-cap {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: 
        radial-gradient(circle at 35% 35%, #e8c86b 0%, #c9a43a 40%, #a67c30 70%, #7a5a12 100%);
    border-radius: 50%;
    border: 3px solid #604008;
    box-shadow: 
        0 3px 8px rgba(0, 0, 0, 0.4),
        inset 0 1px 2px rgba(255, 215, 100, 0.4),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.05s ease-out;
}

.morse-pot-indicator {
    position: absolute;
    top: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 18px;
    background: linear-gradient(180deg, #fff 0%, #ccc 50%, #999 100%);
    border-radius: 2px;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

.morse-pot-marks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.morse-pot-mark {
    position: absolute;
    width: 2px;
    height: 10px;
    background: #333;
    left: 50%;
    top: -5px;
    transform-origin: center 55px;
}

.morse-pot-mark:nth-child(1) { transform: translateX(-50%) rotate(-120deg); }
.morse-pot-mark:nth-child(2) { transform: translateX(-50%) rotate(-80deg); }
.morse-pot-mark:nth-child(3) { transform: translateX(-50%) rotate(-40deg); }
.morse-pot-mark:nth-child(4) { transform: translateX(-50%) rotate(0deg); }
.morse-pot-mark:nth-child(5) { transform: translateX(-50%) rotate(40deg); }
.morse-pot-mark:nth-child(6) { transform: translateX(-50%) rotate(80deg); }
.morse-pot-mark:nth-child(7) { transform: translateX(-50%) rotate(120deg); }

/* Cinta de código morse - parte inferior */
.morse-tape-container {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 520px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
}

.morse-code-display {
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 1rem;
    font-weight: 900;
    color: #000000;
    letter-spacing: 4px;
    text-shadow: none;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* Botón de recibir código morse */
.morse-receive-btn {
    width: 130px;
    height: 50px;
    background: linear-gradient(180deg, #555 0%, #333 40%, #222 100%);
    border: 3px solid #444;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 700;
    color: #ddd;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
    box-shadow: 
        0 5px 0 #111,
        0 7px 12px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: all 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.morse-receive-btn:hover {
    background: linear-gradient(180deg, #666 0%, #444 40%, #333 100%);
}

.morse-receive-btn:active {
    transform: translateY(4px);
    box-shadow: 
        0 1px 0 #111,
        0 2px 5px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.morse-receive-btn.receiving {
    background: linear-gradient(180deg, #664422 0%, #553311 40%, #442200 100%);
    border-color: #ff6600;
    box-shadow: 
        0 5px 0 #331100,
        0 7px 12px rgba(0, 0, 0, 0.5),
        0 0 15px rgba(255, 102, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.morse-receive-btn .receive-icon {
    font-size: 1rem;
}

/* LED indicador en el panel */
.morse-led-indicator {
    width: 12px;
    height: 12px;
    background: radial-gradient(circle at 30% 30%, #440000 0%, #220000 100%);
    border-radius: 50%;
    border: 2px solid #333;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
}

.morse-led-indicator.active {
    background: radial-gradient(circle at 30% 30%, #ff9944 0%, #ff6600 100%);
    border-color: #884400;
    box-shadow: 
        0 0 8px #ff6600,
        0 0 15px #ff6600,
        0 0 25px rgba(255, 102, 0, 0.5),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
    animation: ledPulse 0.3s ease-in-out;
}

@keyframes ledPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Botón de validar morse */
.morse-validate-btn {
    width: 130px;
    height: 50px;
    background: linear-gradient(180deg, #44aa44 0%, #228822 50%, #116611 100%);
    border: 3px solid #0a550a;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
    box-shadow: 
        0 5px 0 #063306,
        0 7px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.1s ease;
}

.morse-validate-btn:hover {
    background: linear-gradient(180deg, #55bb55 0%, #33aa33 50%, #228822 100%);
}

.morse-validate-btn:active {
    transform: translateY(4px);
    box-shadow: 
        0 1px 0 #063306,
        0 2px 6px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.morse-validate-btn:disabled {
    background: linear-gradient(180deg, #555 0%, #444 50%, #333 100%);
    border-color: #333;
    color: #666;
    cursor: not-allowed;
    box-shadow: 
        0 3px 0 #222,
        0 5px 8px rgba(0, 0, 0, 0.3);
}

/* ===============================================
   MÓDULO DE CABLES - REALISTA
   =============================================== */

.wires-module-realistic {
    width: 100%;
    height: 100%;
    background-image: url('media/cables.png');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    position: relative;
}

/* Área de la placa verde donde van los cables interactivos */
.wires-panel-area {
    position: absolute;
    top: 22%;
    left: 24%;
    width: 210px;
    height: 56%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 10px;
}

/* Cable individual horizontal */
.wire-horizontal {
    position: relative;
    height: 14px;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.wire-horizontal:hover {
    transform: scaleY(1.2);
    filter: brightness(1.2);
}

.wire-horizontal:hover::after {
    opacity: 1;
}

/* Cuerpo del cable */
.wire-body {
    position: relative;
    width: 100%;
    height: 10px;
    border-radius: 5px;
    box-shadow: 
        inset 0 2px 4px rgba(255, 255, 255, 0.25),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3),
        0 2px 6px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

/* Reflejo del cable */
.wire-body::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 5%;
    width: 90%;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.4) 20%, 
        rgba(255, 255, 255, 0.5) 50%, 
        rgba(255, 255, 255, 0.4) 80%, 
        transparent 100%);
    border-radius: 2px;
    pointer-events: none;
}

/* Textura del cable */
.wire-body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 8px,
        rgba(0, 0, 0, 0.05) 8px,
        rgba(0, 0, 0, 0.05) 10px
    );
    pointer-events: none;
}

/* Colores de cables */
.wire-horizontal.red .wire-body {
    background: linear-gradient(180deg, 
        #ff6b6b 0%, 
        #e63946 30%, 
        #cc2936 60%, 
        #a61c24 100%);
}

.wire-horizontal.blue .wire-body {
    background: linear-gradient(180deg, 
        #74b9ff 0%, 
        #4a90d9 30%, 
        #2d6eb8 60%, 
        #1a4c8b 100%);
}

.wire-horizontal.yellow .wire-body {
    background: linear-gradient(180deg, 
        #ffe066 0%, 
        #f1c40f 30%, 
        #d4a600 60%, 
        #b38b00 100%);
}

.wire-horizontal.black .wire-body {
    background: linear-gradient(180deg, 
        #555555 0%, 
        #333333 30%, 
        #222222 60%, 
        #111111 100%);
}

.wire-horizontal.white .wire-body {
    background: linear-gradient(180deg, 
        #ffffff 0%, 
        #e8e8e8 30%, 
        #d0d0d0 60%, 
        #b8b8b8 100%);
}

.wire-horizontal.green .wire-body {
    background: linear-gradient(180deg, 
        #7dcea0 0%, 
        #27ae60 30%, 
        #1e8449 60%, 
        #145a32 100%);
}

/* Conectores en los extremos del cable */
.wire-connector {
    position: absolute;
    width: 12px;
    height: 16px;
    background: linear-gradient(180deg, 
        #888888 0%, 
        #666666 30%, 
        #444444 70%, 
        #333333 100%);
    border-radius: 2px;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.wire-connector.left {
    left: -6px;
}

.wire-connector.right {
    right: -6px;
}

/* Pin metálico en el conector */
.wire-connector::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 4px;
    background: radial-gradient(circle at 30% 30%, 
        #c0c0c0 0%, 
        #808080 50%, 
        #505050 100%);
    border-radius: 50%;
    border: 1px solid #404040;
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.4),
        0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Efecto hover - tijeras/corte */
.wire-horizontal::after {
    content: '✂';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.8),
        0 2px 4px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 10;
}

/* Cable cortado */
.wire-horizontal.cut {
    pointer-events: none;
}

.wire-horizontal.cut .wire-body {
    opacity: 0.3;
    filter: grayscale(0.5);
}

.wire-horizontal.cut::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, 
        rgba(255, 200, 100, 0.8) 0%, 
        rgba(255, 150, 50, 0.4) 40%, 
        transparent 70%);
    animation: sparkCut 0.5s ease-out;
    pointer-events: none;
    z-index: 5;
}

@keyframes sparkCut {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* ===============================================
   SELECTOR DE MISIONES
   =============================================== */

.missions-container {
    margin: 2rem 0;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInMissions 0.8s ease-out 0.5s forwards;
}

@keyframes fadeInMissions {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.missions-title {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--accent-cyan);
    letter-spacing: 0.3em;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 10px var(--accent-cyan);
}

.missions-grid {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.mission-card {
    position: relative;
    width: 280px;
    background: linear-gradient(180deg, rgba(36, 51, 36, 0.95) 0%, rgba(20, 30, 20, 0.98) 100%);
    border: 3px solid var(--border-color);
    border-radius: 8px;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    text-align: left;
    font-family: inherit;
    color: inherit;
}

.mission-card:hover:not(.locked):not(:disabled) {
    border-color: var(--accent-cyan);
    box-shadow: 
        0 0 20px rgba(51, 255, 102, 0.3),
        inset 0 0 30px rgba(51, 255, 102, 0.05);
    transform: translateY(-5px);
}

.mission-card:active:not(.locked):not(:disabled) {
    transform: translateY(-2px);
}

.mission-card.locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.mission-card.completed {
    border-color: var(--accent-green);
}

.mission-card.completed::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: var(--accent-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #000;
    font-weight: bold;
    box-shadow: 0 0 15px var(--accent-green);
}

.mission-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    z-index: 10;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.mission-card:not(.locked) .mission-lock-overlay {
    opacity: 0;
    pointer-events: none;
}

.lock-icon {
    font-size: 3rem;
    filter: grayscale(100%);
}

.lock-text {
    font-family: var(--font-display);
    font-size: 0.7rem;
    color: #888;
    letter-spacing: 0.1em;
}

.mission-header {
    background: linear-gradient(90deg, var(--military-olive) 0%, var(--bg-tertiary) 100%);
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border-color);
}

.mission-number {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--accent-amber);
    text-shadow: 0 0 10px rgba(255, 176, 0, 0.5);
}

.mission-codename {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.2em;
}

.mission-content {
    padding: 15px;
}

.mission-content h3 {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    letter-spacing: 0.1em;
}

.mission-modules {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.module-tag {
    background: rgba(51, 255, 102, 0.1);
    border: 1px solid rgba(51, 255, 102, 0.3);
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 0.75rem;
    color: var(--accent-cyan);
}

.mission-reward {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-amber);
    text-shadow: 0 0 8px rgba(255, 176, 0, 0.4);
}

.mission-status {
    background: linear-gradient(180deg, #2a3a2a 0%, #1a2a1a 100%);
    padding: 10px 15px;
    text-align: center;
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    border-top: 2px solid var(--border-color);
}

.mission-status.complete {
    color: var(--accent-green);
    text-shadow: 0 0 10px var(--accent-green);
}

/* Badge de misión en el header del juego */
.mission-badge {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.mission-badge-label {
    font-size: 0.65rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
}

.mission-badge-name {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-amber);
    text-shadow: 0 0 10px rgba(255, 176, 0, 0.5);
    letter-spacing: 0.1em;
}

/* Texto de razón de derrota */
.lose-reason-text {
    font-size: 1rem;
    color: var(--accent-red);
    margin-bottom: 1.5rem;
    font-style: italic;
}

/* ===============================================
   MODAL DE CÓDIGO DE TIEMPO EXTRA
   =============================================== */

.time-code-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.time-code-modal.active {
    opacity: 1;
    visibility: visible;
}

.time-code-content {
    background: linear-gradient(180deg, #1a2a1a 0%, #0f1a0f 100%);
    border: 4px solid var(--accent-amber);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 
        0 0 30px rgba(255, 176, 0, 0.3),
        inset 0 0 50px rgba(0, 0, 0, 0.5);
    animation: modalPop 0.3s ease-out;
}

@keyframes modalPop {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.time-code-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--accent-amber);
    margin-bottom: 10px;
    letter-spacing: 0.2em;
    text-shadow: 0 0 15px rgba(255, 176, 0, 0.5);
}

.time-code-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.time-code-input {
    width: 100%;
    padding: 15px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 0.3em;
    text-align: center;
    text-transform: uppercase;
    background: #0a0a0a;
    border: 3px solid #333;
    border-radius: 8px;
    color: var(--accent-cyan);
    outline: none;
    transition: all 0.3s ease;
}

.time-code-input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(51, 255, 102, 0.3);
}

.time-code-input.error {
    border-color: var(--accent-red);
    animation: shake 0.5s ease;
}

.time-code-input.success {
    border-color: var(--accent-green);
    box-shadow: 0 0 30px rgba(51, 255, 51, 0.5);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-10px); }
    40%, 80% { transform: translateX(10px); }
}

.time-code-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: center;
}

.btn-code-submit {
    padding: 12px 30px;
    background: linear-gradient(180deg, #4a6a3a 0%, #3a5a2a 50%, #2a4a1a 100%);
    border: 3px solid #5a7a4a;
    border-radius: 6px;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    color: #ddeedd;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 0 #1a3a0a;
}

.btn-code-submit:hover {
    background: linear-gradient(180deg, #5a7a4a 0%, #4a6a3a 50%, #3a5a2a 100%);
}

.btn-code-submit:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #1a3a0a;
}

.btn-code-cancel {
    padding: 12px 30px;
    background: linear-gradient(180deg, #555 0%, #333 50%, #222 100%);
    border: 3px solid #666;
    border-radius: 6px;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    color: #ccc;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 0 #111;
}

.btn-code-cancel:hover {
    background: linear-gradient(180deg, #666 0%, #444 50%, #333 100%);
}

.btn-code-cancel:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #111;
}

.time-code-message {
    margin-top: 15px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    min-height: 20px;
}

.time-code-message.error {
    color: var(--accent-red);
}

.time-code-message.success {
    color: var(--accent-green);
    text-shadow: 0 0 10px var(--accent-green);
}

/* Timer clickeable */
.timer-container {
    cursor: pointer;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.timer-container:hover {
    box-shadow: 
        inset 0 0 30px rgba(0, 0, 0, 0.8),
        0 4px 10px rgba(0, 0, 0, 0.5),
        0 0 15px rgba(255, 51, 51, 0.3);
    border-color: #444;
}

.timer-container:active {
    border-color: #555;
    box-shadow: 
        inset 0 0 40px rgba(0, 0, 0, 0.9),
        0 2px 5px rgba(0, 0, 0, 0.5);
}

/* Botón SKIP dentro del timer-wrapper */
.timer-wrapper .btn-skip {
    margin: 0;
    flex-shrink: 0;
}

/* Efecto de tiempo añadido */
.time-added-effect {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 900;
    color: var(--accent-green);
    text-shadow: 
        0 0 20px var(--accent-green),
        0 0 40px var(--accent-green),
        0 0 60px rgba(51, 255, 51, 0.5);
    pointer-events: none;
    z-index: 3000;
    animation: timeAddedPop 1.5s ease-out forwards;
}

@keyframes timeAddedPop {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -60%) scale(1);
    }
}

/* ===============================================
   MÓDULO DE CANDADOS ELÉCTRICOS - ESTILO MILITAR
   =============================================== */

.electric-locks-module {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    gap: 12px;
    background: 
        radial-gradient(ellipse at center, rgba(51, 255, 102, 0.02) 0%, transparent 70%),
        linear-gradient(180deg, #1a2a1a 0%, #0d1a0d 100%);
}

.locks-display-panel {
    display: flex;
    gap: 25px;
    background: linear-gradient(180deg, #0d0d0d 0%, #050505 100%);
    padding: 10px 20px;
    border: 3px solid #2a2a2a;
    border-radius: 6px;
    box-shadow: 
        inset 0 0 25px rgba(0, 0, 0, 0.9),
        0 3px 6px rgba(0, 0, 0, 0.5),
        0 0 0 1px #1a1a1a;
    position: relative;
    overflow: hidden;
}

.locks-display-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 1px,
            rgba(0, 50, 0, 0.1) 1px,
            rgba(0, 50, 0, 0.1) 2px
        );
    pointer-events: none;
    border-radius: 4px;
}

.locks-serial-display,
.locks-indicator-count {
    font-family: 'Consolas', 'Monaco', 'Lucida Console', monospace;
    font-size: 0.8rem;
    font-weight: bold;
    color: #39ff14;
    text-shadow: 
        0 0 5px #39ff14,
        0 0 10px #39ff14,
        0 0 15px rgba(57, 255, 20, 0.5);
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.locks-container {
    display: flex;
    gap: 8px;
    padding: 15px 20px;
    background: linear-gradient(180deg, #2a3a2a 0%, #1a2a1a 100%);
    border: 4px solid #3a4a3a;
    border-radius: 8px;
    box-shadow: 
        inset 0 2px 15px rgba(0, 0, 0, 0.6),
        0 5px 15px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(51, 255, 102, 0.1);
}

.electric-lock {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 8px;
    background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 2px solid #3a3a3a;
    border-radius: 6px;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 3px 8px rgba(0, 0, 0, 0.4);
}

.lock-plate {
    width: 35px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid;
    box-shadow: 
        inset 0 2px 4px rgba(255, 255, 255, 0.15),
        0 3px 6px rgba(0, 0, 0, 0.4);
    position: relative;
}

.lock-plate::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    height: 40%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, transparent 100%);
    border-radius: 2px 2px 0 0;
}

.lock-plate.blue {
    background: linear-gradient(180deg, #5599ff 0%, #3377dd 50%, #2255aa 100%);
    border-color: #77aaff;
}

.lock-plate.red {
    background: linear-gradient(180deg, #ff5555 0%, #dd3333 50%, #aa2222 100%);
    border-color: #ff7777;
}

.lock-connection {
    width: 6px;
    height: 25px;
    background: linear-gradient(90deg, #222 0%, #333 50%, #222 100%);
    border-radius: 3px;
    position: relative;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
}

.lock-connection.connected::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, #39ff14 0%, #22aa00 100%);
    border-radius: 50%;
    box-shadow: 
        0 0 8px #39ff14,
        0 0 15px #39ff14,
        inset 0 1px 2px rgba(255, 255, 255, 0.5);
    animation: ledPulse 1s ease-in-out infinite;
}

@keyframes ledPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px #39ff14, 0 0 15px #39ff14; }
    50% { opacity: 0.7; box-shadow: 0 0 5px #39ff14, 0 0 10px #39ff14; }
}

.connection-line {
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, #555 0%, #333 100%);
    margin: 0 auto;
}

.current-flow-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
    border: 3px solid #333;
    border-radius: 8px;
    box-shadow: 
        inset 0 2px 8px rgba(0, 0, 0, 0.5),
        0 3px 8px rgba(0, 0, 0, 0.3);
}

.flow-led {
    width: 16px;
    height: 16px;
    background: radial-gradient(circle at 35% 35%, #444 0%, #222 100%);
    border-radius: 50%;
    border: 2px solid #555;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.flow-led.active {
    background: radial-gradient(circle at 35% 35%, #66ff66 0%, #39ff14 50%, #22aa00 100%);
    border-color: #88ff88;
    box-shadow: 
        0 0 10px #39ff14,
        0 0 20px #39ff14,
        0 0 30px rgba(57, 255, 20, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.5);
    animation: flowPulse 0.5s ease-in-out infinite;
}

@keyframes flowPulse {
    0%, 100% { box-shadow: 0 0 10px #39ff14, 0 0 20px #39ff14, 0 0 30px rgba(57, 255, 20, 0.5); }
    50% { box-shadow: 0 0 15px #39ff14, 0 0 30px #39ff14, 0 0 45px rgba(57, 255, 20, 0.7); }
}

.flow-label {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.doors-container {
    display: flex;
    gap: 10px;
}

.electric-door {
    width: 50px;
    height: 55px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: linear-gradient(180deg, #4a4a4a 0%, #333 50%, #222 100%);
    border: 3px solid #555;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 
        0 5px 0 #1a1a1a,
        0 7px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.electric-door:hover {
    background: linear-gradient(180deg, #5a5a5a 0%, #444 50%, #333 100%);
}

.electric-door:active {
    transform: translateY(4px);
    box-shadow: 
        0 1px 0 #1a1a1a,
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.electric-door.open {
    background: linear-gradient(180deg, #3a6a3a 0%, #2a5a2a 50%, #1a4a1a 100%);
    border-color: #4a8a4a;
    box-shadow: 
        0 5px 0 #0a2a0a,
        0 0 15px rgba(51, 255, 51, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.electric-door.closed {
    background: linear-gradient(180deg, #6a3a3a 0%, #5a2a2a 50%, #4a1a1a 100%);
    border-color: #8a4a4a;
}

.door-number {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 900;
    color: #eee;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.door-status {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.locks-controls {
    display: flex;
    gap: 15px;
}

.btn-switch-power {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(180deg, #555 0%, #333 50%, #222 100%);
    border: 3px solid #666;
    border-radius: 8px;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    color: #aaa;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 
        0 5px 0 #111,
        0 7px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    letter-spacing: 1px;
}

.btn-switch-power.on {
    background: linear-gradient(180deg, #4a7a4a 0%, #3a6a3a 50%, #2a5a2a 100%);
    border-color: #5a9a5a;
    color: #ddeedd;
    box-shadow: 
        0 5px 0 #1a3a1a,
        0 0 20px rgba(51, 255, 51, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-switch-power:active {
    transform: translateY(4px);
    box-shadow: 0 1px 0 #111;
}

.power-icon {
    font-size: 1.3rem;
    filter: drop-shadow(0 0 3px currentColor);
}

.btn-validate-locks {
    padding: 12px 30px;
    background: linear-gradient(180deg, #666 0%, #444 40%, #333 100%);
    border: 3px solid #777;
    border-radius: 8px;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    color: #ddd;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 
        0 5px 0 #222,
        0 7px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    letter-spacing: 2px;
}

.btn-validate-locks:hover {
    background: linear-gradient(180deg, #777 0%, #555 40%, #444 100%);
}

.btn-validate-locks:active {
    transform: translateY(4px);
    box-shadow: 0 1px 0 #222;
}

/* ===============================================
   MÓDULO DE 4 ANILLOS ROTATIVOS CONCÉNTRICOS
   =============================================== */

.rotating-rings-module {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    gap: 10px;
    background: 
        radial-gradient(ellipse at center, rgba(51, 255, 102, 0.02) 0%, transparent 70%),
        linear-gradient(180deg, #1a2a1a 0%, #0d1a0d 100%);
}

.rings-info-panel {
    display: flex;
    gap: 25px;
    background: linear-gradient(180deg, #0d0d0d 0%, #050505 100%);
    padding: 8px 18px;
    border: 3px solid #2a2a2a;
    border-radius: 6px;
    box-shadow: 
        inset 0 0 25px rgba(0, 0, 0, 0.9),
        0 3px 6px rgba(0, 0, 0, 0.5),
        0 0 0 1px #1a1a1a;
    position: relative;
    overflow: hidden;
}

.rings-info-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 1px,
            rgba(0, 50, 0, 0.1) 1px,
            rgba(0, 50, 0, 0.1) 2px
        );
    pointer-events: none;
}

.rings-serial,
.rings-batteries {
    font-family: 'Consolas', 'Monaco', 'Lucida Console', monospace;
    font-size: 0.75rem;
    font-weight: bold;
    color: #39ff14;
    text-shadow: 
        0 0 5px #39ff14,
        0 0 10px #39ff14,
        0 0 15px rgba(57, 255, 20, 0.5);
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

/* Contenedor principal de anillos concéntricos */
.concentric-rings-container {
    position: relative;
    width: 280px;
    height: 280px;
    background: 
        radial-gradient(circle at 30% 30%, #2a2a2a 0%, #0d0d0d 70%);
    border-radius: 50%;
    border: 5px solid #3a4a3a;
    box-shadow: 
        inset 0 5px 30px rgba(0, 0, 0, 0.8),
        0 8px 25px rgba(0, 0, 0, 0.6),
        0 0 0 2px #222;
}

/* Marcas cardinales estáticas */
.static-cardinal-marks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
}

.cardinal-mark {
    position: absolute;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 900;
    color: #39ff14;
    text-shadow: 
        0 0 8px #39ff14,
        0 0 15px #39ff14,
        0 0 25px rgba(57, 255, 20, 0.7);
    background: rgba(0, 0, 0, 0.7);
    padding: 2px 6px;
    border-radius: 3px;
}

.cardinal-mark.north {
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
}

.cardinal-mark.south {
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
}

.cardinal-mark.east {
    top: 50%;
    right: 5px;
    transform: translateY(-50%);
}

.cardinal-mark.west {
    top: 50%;
    left: 5px;
    transform: translateY(-50%);
}

/* Líneas de cuadrantes */
.quadrant-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.quadrant-line {
    position: absolute;
    background: rgba(57, 255, 20, 0.15);
}

.quadrant-line.horizontal {
    top: 50%;
    left: 10%;
    right: 10%;
    height: 1px;
    transform: translateY(-50%);
}

.quadrant-line.vertical {
    left: 50%;
    top: 10%;
    bottom: 10%;
    width: 1px;
    transform: translateX(-50%);
}

/* Anillos concéntricos */
.concentric-ring {
    position: absolute;
    border-radius: 50%;
    cursor: pointer;
    transition: box-shadow 0.2s ease;
}

.concentric-ring:hover {
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.5);
}

.concentric-ring.stopped {
    box-shadow: 
        0 0 10px rgba(255, 170, 0, 0.5),
        inset 0 0 10px rgba(255, 170, 0, 0.2);
}

/* Anillo 1 (exterior) */
.concentric-ring.ring-0 {
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    width: auto;
    height: auto;
    border: 4px solid #555;
    background: transparent;
    z-index: 10;
}

/* Anillo 2 */
.concentric-ring.ring-1 {
    top: 45px;
    left: 45px;
    right: 45px;
    bottom: 45px;
    width: auto;
    height: auto;
    border: 4px solid #555;
    background: transparent;
    z-index: 11;
}

/* Anillo 3 */
.concentric-ring.ring-2 {
    top: 75px;
    left: 75px;
    right: 75px;
    bottom: 75px;
    width: auto;
    height: auto;
    border: 4px solid #555;
    background: transparent;
    z-index: 12;
}

/* Anillo 4 (interior) */
.concentric-ring.ring-3 {
    top: 105px;
    left: 105px;
    right: 105px;
    bottom: 105px;
    width: auto;
    height: auto;
    border: 4px solid #555;
    background: transparent;
    z-index: 13;
}

/* Banda del anillo (la parte que rota) */
.ring-band {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transition: none;
}

/* Indicador en cada anillo */
.ring-indicator {
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 16px solid #ff3333;
    filter: drop-shadow(0 0 5px #ff3333) drop-shadow(0 0 10px rgba(255, 51, 51, 0.7));
}

/* Diferentes colores para cada anillo */
.ring-0 .ring-indicator {
    border-bottom-color: #ff3333;
    filter: drop-shadow(0 0 5px #ff3333);
}

.ring-1 .ring-indicator {
    border-bottom-color: #33ff33;
    filter: drop-shadow(0 0 5px #33ff33);
}

.ring-2 .ring-indicator {
    border-bottom-color: #3399ff;
    filter: drop-shadow(0 0 5px #3399ff);
}

.ring-3 .ring-indicator {
    border-bottom-color: #ffaa00;
    filter: drop-shadow(0 0 5px #ffaa00);
}

/* Número de anillo */
.ring-number {
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-display);
    font-size: 0.6rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

/* Centro de los anillos */
.rings-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: 
        radial-gradient(circle at 35% 35%, #666 0%, #333 50%, #1a1a1a 100%);
    border-radius: 50%;
    border: 3px solid #555;
    box-shadow: 
        inset 0 2px 6px rgba(0, 0, 0, 0.5),
        0 3px 8px rgba(0, 0, 0, 0.4);
    z-index: 20;
}

/* Display de direcciones */
.rings-direction-display {
    display: flex;
    gap: 10px;
    background: linear-gradient(180deg, #0d0d0d 0%, #050505 100%);
    padding: 8px 15px;
    border: 2px solid #2a2a2a;
    border-radius: 6px;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.8);
}

.direction-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    border: 1px solid #333;
}

.dir-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #888;
}

.dir-value {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    font-weight: bold;
    color: #ffaa00;
    text-shadow: 0 0 5px rgba(255, 170, 0, 0.5);
    min-width: 15px;
    text-align: center;
}

/* Colores de valor según anillo */
#dir-0 .dir-value { color: #ff3333; text-shadow: 0 0 5px rgba(255, 51, 51, 0.5); }
#dir-1 .dir-value { color: #33ff33; text-shadow: 0 0 5px rgba(51, 255, 51, 0.5); }
#dir-2 .dir-value { color: #3399ff; text-shadow: 0 0 5px rgba(51, 153, 255, 0.5); }
#dir-3 .dir-value { color: #ffaa00; text-shadow: 0 0 5px rgba(255, 170, 0, 0.5); }

/* Botón de validar */
.btn-validate-rings {
    padding: 10px 30px;
    background: linear-gradient(180deg, #666 0%, #444 40%, #333 100%);
    border: 3px solid #777;
    border-radius: 8px;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    color: #ddd;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 
        0 5px 0 #222,
        0 7px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    letter-spacing: 2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.btn-validate-rings:hover {
    background: linear-gradient(180deg, #777 0%, #555 40%, #444 100%);
}

.btn-validate-rings:active {
    transform: translateY(4px);
    box-shadow: 0 1px 0 #222;
}

/* ===============================================
   MÓDULO SISTEMA HERTZ - ESTILO MILITAR
   =============================================== */

.hertz-system-module {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    gap: 10px;
    background: 
        radial-gradient(ellipse at center, rgba(51, 255, 102, 0.02) 0%, transparent 70%),
        linear-gradient(180deg, #1a2a1a 0%, #0d1a0d 100%);
}

.hertz-info-panel {
    text-align: center;
    padding: 10px 25px;
    background: linear-gradient(180deg, #0d0d0d 0%, #050505 100%);
    border: 3px solid #2a2a2a;
    border-radius: 6px;
    box-shadow: 
        inset 0 0 25px rgba(0, 0, 0, 0.9),
        0 3px 6px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.hertz-info-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 1px,
            rgba(0, 50, 0, 0.1) 1px,
            rgba(0, 50, 0, 0.1) 2px
        );
    pointer-events: none;
}

.hertz-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    color: #39ff14;
    text-shadow: 
        0 0 5px #39ff14,
        0 0 10px #39ff14,
        0 0 20px rgba(57, 255, 20, 0.5);
    margin-bottom: 4px;
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
}

.hertz-instructions {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

.hertz-channels-container {
    display: flex;
    gap: 12px;
    padding: 15px;
    background: linear-gradient(180deg, #2a3a2a 0%, #1a2a1a 100%);
    border: 4px solid #3a4a3a;
    border-radius: 10px;
    box-shadow: 
        inset 0 2px 15px rgba(0, 0, 0, 0.6),
        0 5px 15px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(51, 255, 102, 0.1);
}

.hertz-channel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px;
    background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
    border-radius: 8px;
    border: 3px solid #333;
    transition: all 0.2s ease;
    min-width: 100px;
    box-shadow: 
        inset 0 2px 8px rgba(0, 0, 0, 0.5),
        0 3px 8px rgba(0, 0, 0, 0.3);
}

.hertz-channel.active {
    border-color: #39ff14;
    box-shadow: 
        0 0 15px rgba(57, 255, 20, 0.4),
        inset 0 2px 8px rgba(0, 0, 0, 0.5);
}

.hertz-channel.locked {
    border-color: #ffaa00;
    box-shadow: 
        0 0 10px rgba(255, 170, 0, 0.3),
        inset 0 2px 8px rgba(0, 0, 0, 0.5);
}

.hertz-channel.locked::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: none;
    border-radius: 5px;
}

.channel-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.channel-name {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.channel-target {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: #ffaa00;
    text-shadow: 0 0 5px rgba(255, 170, 0, 0.5);
}

.channel-lock-status {
    font-size: 0.9rem;
    filter: drop-shadow(0 0 3px currentColor);
}

.channel-wave-display {
    background: linear-gradient(180deg, #050505 0%, #0a0a0a 100%);
    border-radius: 4px;
    border: 2px solid #222;
    overflow: hidden;
    box-shadow: 
        inset 0 0 15px rgba(0, 0, 0, 0.8),
        0 0 0 1px #1a1a1a;
    position: relative;
}

.channel-wave-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 3px,
            rgba(0, 50, 0, 0.1) 3px,
            rgba(0, 50, 0, 0.1) 4px
        );
    pointer-events: none;
}

.wave-canvas {
    display: block;
    width: 85px;
    height: 40px;
}

.channel-freq-display {
    display: flex;
    align-items: baseline;
    gap: 4px;
    background: linear-gradient(180deg, #0d0d0d 0%, #050505 100%);
    padding: 4px 10px;
    border-radius: 4px;
    border: 2px solid #222;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.freq-value {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 1rem;
    font-weight: bold;
    color: #39ff14;
    text-shadow: 
        0 0 5px #39ff14,
        0 0 10px rgba(57, 255, 20, 0.5);
}

.freq-unit {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-secondary);
}

.hertz-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.frequency-adjuster {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 12px;
    background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
    border: 3px solid #333;
    border-radius: 8px;
    box-shadow: 
        inset 0 2px 8px rgba(0, 0, 0, 0.5),
        0 3px 8px rgba(0, 0, 0, 0.3);
}

.btn-freq {
    width: 38px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #444 0%, #2a2a2a 100%);
    border: 2px solid #555;
    border-radius: 5px;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    color: #ccc;
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow: 
        0 3px 0 #1a1a1a,
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-freq:hover {
    background: linear-gradient(180deg, #555 0%, #3a3a3a 100%);
}

.btn-freq:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #1a1a1a;
}

.btn-freq.minus-100,
.btn-freq.minus-10,
.btn-freq.minus-1 {
    color: #ff6666;
    border-color: #664444;
    background: linear-gradient(180deg, #4a3333 0%, #2a1a1a 100%);
}

.btn-freq.minus-100:hover,
.btn-freq.minus-10:hover,
.btn-freq.minus-1:hover {
    background: linear-gradient(180deg, #5a4444 0%, #3a2a2a 100%);
}

.btn-freq.plus-1,
.btn-freq.plus-10,
.btn-freq.plus-100 {
    color: #66ff66;
    border-color: #446644;
    background: linear-gradient(180deg, #334a33 0%, #1a2a1a 100%);
}

.btn-freq.plus-1:hover,
.btn-freq.plus-10:hover,
.btn-freq.plus-100:hover {
    background: linear-gradient(180deg, #445a44 0%, #2a3a2a 100%);
}

.freq-current-display {
    padding: 5px 12px;
    background: linear-gradient(180deg, #0d0d0d 0%, #050505 100%);
    border-radius: 4px;
    border: 2px solid #222;
    min-width: 85px;
    text-align: center;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.8);
    position: relative;
    overflow: hidden;
}

.freq-current-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 1px,
            rgba(0, 50, 0, 0.1) 1px,
            rgba(0, 50, 0, 0.1) 2px
        );
    pointer-events: none;
}

#current-freq-display {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    font-weight: bold;
    color: #39ff14;
    text-shadow: 
        0 0 5px #39ff14,
        0 0 10px #39ff14;
    position: relative;
    z-index: 1;
}

.channel-selector {
    display: flex;
    gap: 10px;
}

.btn-channel {
    padding: 8px 18px;
    background: linear-gradient(180deg, #444 0%, #2a2a2a 100%);
    border: 3px solid #555;
    border-radius: 6px;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    color: #aaa;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 
        0 4px 0 #1a1a1a,
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    letter-spacing: 1px;
}

.btn-channel:hover {
    background: linear-gradient(180deg, #555 0%, #3a3a3a 100%);
}

.btn-channel:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #1a1a1a;
}

.btn-channel.selected {
    background: linear-gradient(180deg, #3a6a3a 0%, #2a5a2a 50%, #1a4a1a 100%);
    border-color: #4a8a4a;
    color: #aaffaa;
    box-shadow: 
        0 4px 0 #0a2a0a,
        0 0 15px rgba(51, 255, 51, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.hertz-action-buttons {
    display: flex;
    gap: 12px;
}

.btn-lock-channel {
    padding: 10px 18px;
    background: linear-gradient(180deg, #555 0%, #333 50%, #222 100%);
    border: 3px solid #666;
    border-radius: 6px;
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 700;
    color: #ccc;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 
        0 4px 0 #111,
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    letter-spacing: 1px;
}

.btn-lock-channel:hover {
    background: linear-gradient(180deg, #666 0%, #444 50%, #333 100%);
}

.btn-lock-channel:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #111;
}

.btn-validate-hertz {
    padding: 10px 22px;
    background: linear-gradient(180deg, #666 0%, #444 40%, #333 100%);
    border: 3px solid #777;
    border-radius: 6px;
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 700;
    color: #ddd;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 
        0 4px 0 #222,
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    letter-spacing: 1px;
}

.btn-validate-hertz:hover {
    background: linear-gradient(180deg, #777 0%, #555 40%, #444 100%);
}

.btn-validate-hertz:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #222;
}

/* ===============================================
   OVERLAY DE FALLO (-1 min)
   =============================================== */

.strike-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 0, 0, 0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.strike-overlay.active {
    opacity: 1;
    visibility: visible;
    animation: strikeFlash 2s ease-out forwards;
}

@keyframes strikeFlash {
    0% {
        background: rgba(255, 0, 0, 0.7);
    }
    25% {
        background: rgba(255, 0, 0, 0.5);
    }
    100% {
        background: rgba(255, 0, 0, 0);
        opacity: 0;
    }
}

.strike-overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    animation: strikeShake 0.5s ease-in-out;
}

@keyframes strikeShake {
    0%, 100% { transform: translateX(0); }
    10% { transform: translateX(-20px) rotate(-2deg); }
    20% { transform: translateX(20px) rotate(2deg); }
    30% { transform: translateX(-15px) rotate(-1deg); }
    40% { transform: translateX(15px) rotate(1deg); }
    50% { transform: translateX(-10px); }
    60% { transform: translateX(10px); }
    70% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
    90% { transform: translateX(-2px); }
}

.strike-text {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 
        0 0 20px rgba(255, 0, 0, 1),
        0 0 40px rgba(255, 0, 0, 0.8),
        0 0 60px rgba(255, 0, 0, 0.6),
        4px 4px 0 #000;
    letter-spacing: 6px;
    animation: strikePulse 0.3s ease-in-out 3;
}

@keyframes strikePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.strike-penalty {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: #ffcc00;
    text-shadow: 
        0 0 15px rgba(255, 200, 0, 0.8),
        0 0 30px rgba(255, 150, 0, 0.5),
        3px 3px 0 #000;
    margin-top: 15px;
    animation: penaltyDrop 0.4s ease-out 0.2s backwards;
}

@keyframes penaltyDrop {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(1.3);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===============================================
   CONTADOR DE FALLOS
   =============================================== */

.strike-counter {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--danger-color);
    text-shadow: 0 0 10px rgba(255, 45, 85, 0.5);
    min-width: 40px;
    text-align: center;
}

.strike-counter.pulse {
    animation: counterPulse 0.3s ease-out;
}

@keyframes counterPulse {
    0% { 
        transform: scale(1); 
        color: var(--danger-color);
    }
    50% { 
        transform: scale(1.5); 
        color: #fff;
        text-shadow: 0 0 20px rgba(255, 45, 85, 1);
    }
    100% { 
        transform: scale(1); 
        color: var(--danger-color);
    }
}

/* ===============================================
   PANTALLA DE BRIEFING - COMUNICADO TOP SECRET
   =============================================== */

#briefing-screen {
    justify-content: center;
    align-items: center;
    padding: 2rem;
    overflow-y: auto;
    background: 
        radial-gradient(ellipse at center, rgba(139, 69, 19, 0.05) 0%, transparent 60%),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(139, 69, 19, 0.02) 2px,
            rgba(139, 69, 19, 0.02) 4px
        ),
        linear-gradient(180deg, #0a0a08 0%, #12120e 100%);
}

.briefing-container {
    max-width: 800px;
    width: 100%;
    animation: fadeInUp 0.8s ease-out;
    position: relative;
    z-index: 10;
}

/* Documento clasificado */
.classified-document {
    background: 
        linear-gradient(135deg, rgba(245, 235, 220, 0.03) 0%, rgba(210, 190, 160, 0.02) 100%),
        rgba(20, 18, 15, 0.95);
    border: 2px solid rgba(139, 69, 19, 0.4);
    border-radius: 4px;
    padding: 0;
    position: relative;
    box-shadow: 
        0 0 30px rgba(139, 69, 19, 0.2),
        inset 0 0 60px rgba(0, 0, 0, 0.5),
        0 10px 40px rgba(0, 0, 0, 0.6);
}

/* Efecto de papel envejecido */
.classified-document::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    border-radius: 4px;
}

/* Barra de clasificación TOP SECRET */
.classification-banner {
    background: linear-gradient(90deg, #8b0000 0%, #cc0000 50%, #8b0000 100%);
    padding: 0.8rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #5a0000;
    position: relative;
    overflow: hidden;
}

.classification-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: classifiedShine 4s infinite;
}

@keyframes classifiedShine {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

.classification-text {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 4px;
}

.classification-code {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 1px;
}

/* Información del documento */
.document-info {
    padding: 1.5rem 2rem;
    border-bottom: 1px dashed rgba(139, 69, 19, 0.3);
    background: rgba(0, 0, 0, 0.2);
}

.doc-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.doc-row:last-child {
    margin-bottom: 0;
}

.doc-label {
    color: rgba(180, 160, 140, 0.7);
    min-width: 120px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.doc-value {
    color: rgba(220, 200, 170, 0.9);
    font-weight: 600;
}

.doc-value.hazard {
    color: #ff4444;
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
    animation: hazardPulse 1.5s ease-in-out infinite;
}

@keyframes hazardPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Cuerpo del documento */
.document-body {
    padding: 2rem;
    min-height: 280px;
}

.document-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: rgba(200, 180, 150, 0.9);
    letter-spacing: 3px;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(139, 69, 19, 0.3);
    text-align: center;
}

.document-content {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    color: rgba(200, 190, 170, 0.95);
    line-height: 1.8;
    text-align: justify;
    min-height: 180px;
    position: relative;
}

/* Cursor parpadeante para efecto typewriter */
.document-content::after {
    content: '█';
    color: #33ff66;
    animation: cursorBlink 0.8s infinite;
    margin-left: 2px;
}

.document-content.typing-complete::after {
    display: none;
}

@keyframes cursorBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Párrafos del briefing */
.briefing-paragraph {
    margin-bottom: 1rem;
    text-indent: 2rem;
}

.briefing-paragraph:first-child {
    text-indent: 0;
}

.briefing-highlight {
    color: #ffaa00;
    font-weight: bold;
}

.briefing-critical {
    color: #ff4444;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 68, 68, 0.3);
}

/* Pie del documento */
.document-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 1.5rem 2rem;
    border-top: 1px dashed rgba(139, 69, 19, 0.3);
    background: rgba(0, 0, 0, 0.2);
}

.classification-stamp {
    width: 100px;
    height: 100px;
    border: 3px solid #cc0000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-15deg);
    opacity: 0.6;
    position: relative;
}

.classification-stamp span {
    font-family: var(--font-display);
    font-size: 0.65rem;
    color: #cc0000;
    text-align: center;
    font-weight: 900;
    letter-spacing: 2px;
}

.classification-stamp::before {
    content: '';
    position: absolute;
    inset: 8px;
    border: 2px solid #cc0000;
    border-radius: 50%;
}

.document-signature {
    text-align: right;
    font-family: var(--font-mono);
}

.signature-line {
    display: block;
    color: rgba(180, 160, 140, 0.5);
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
}

.signature-title {
    font-size: 0.7rem;
    color: rgba(180, 160, 140, 0.6);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Nota del briefing */
.briefing-note {
    margin: 0 2rem 1.5rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 170, 0, 0.1);
    border: 1px solid rgba(255, 170, 0, 0.3);
    border-left: 4px solid #ffaa00;
    border-radius: 0 4px 4px 0;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.briefing-note.visible {
    opacity: 1;
    transform: translateY(0);
}

.note-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.note-text {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #ffaa00;
    line-height: 1.6;
    font-weight: 500;
}

/* Botón de continuar */
.btn-briefing-continue {
    width: calc(100% - 4rem);
    margin: 0 2rem 2rem;
    padding: 1rem 2rem;
    background: linear-gradient(180deg, #1a3a1a 0%, #0d1f0d 100%);
    border: 2px solid rgba(51, 255, 102, 0.3);
    border-radius: 4px;
    color: rgba(51, 255, 102, 0.5);
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 3px;
    cursor: not-allowed;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.btn-briefing-continue.visible {
    opacity: 1;
    transform: translateY(0);
}

.btn-briefing-continue:not(:disabled) {
    cursor: pointer;
    color: #33ff66;
    border-color: #33ff66;
    box-shadow: 
        0 0 20px rgba(51, 255, 102, 0.2),
        inset 0 0 20px rgba(51, 255, 102, 0.05);
}

.btn-briefing-continue:not(:disabled):hover {
    background: linear-gradient(180deg, #2a5a2a 0%, #1a3a1a 100%);
    box-shadow: 
        0 0 30px rgba(51, 255, 102, 0.4),
        inset 0 0 30px rgba(51, 255, 102, 0.1);
    transform: translateY(-2px);
}

.btn-briefing-continue:not(:disabled):active {
    transform: translateY(0);
}

.btn-briefing-continue .btn-icon {
    font-size: 1.2rem;
}

/* Animación de entrada para elementos del briefing */
@keyframes briefingFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Efecto de texto de recepción */
.received-confirmation {
    display: block;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px dashed rgba(51, 255, 102, 0.3);
    color: #33ff66;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 3px;
    text-align: center;
    opacity: 0;
    animation: confirmationAppear 0.5s ease forwards;
}

@keyframes confirmationAppear {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive para briefing */
@media (max-width: 768px) {
    .briefing-container {
        padding: 1rem;
    }
    
    .classification-text {
        font-size: 1rem;
        letter-spacing: 2px;
    }
    
    .classification-code {
        display: none;
    }
    
    .document-info {
        padding: 1rem;
    }
    
    .doc-row {
        flex-direction: column;
        gap: 0.2rem;
    }
    
    .doc-label {
        min-width: auto;
        font-size: 0.7rem;
    }
    
    .document-body {
        padding: 1.5rem;
    }
    
    .document-content {
        font-size: 0.85rem;
    }
    
    .document-footer {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
    }
    
    .classification-stamp {
        width: 80px;
        height: 80px;
    }
    
    .document-signature {
        text-align: center;
    }
    
    .briefing-note {
        margin: 0 1rem 1rem;
        flex-direction: column;
        text-align: center;
    }
    
    .btn-briefing-continue {
        width: calc(100% - 2rem);
        margin: 0 1rem 1.5rem;
        font-size: 0.85rem;
        letter-spacing: 2px;
    }
}

