html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: #080808;
    width: 100%;
    min-height: 100vh;
    color: #0ff;
    font-family: 'Orbitron', 'Roboto Mono', monospace, sans-serif;
}
body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg,#0f2027 0%,#2c5364 100%), #000;
    overflow: hidden;
}
.center-glitch {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
}
.glitch-img {
    width: 200px;
    height: 200px;
    position: relative;
    animation: glitch 1.3s infinite linear alternate-reverse;
    filter: drop-shadow(0 0 20px #0ff) drop-shadow(0 0 2px #f0f);
}

/* Glitch animation */
@keyframes glitch {
    0% {
        filter: drop-shadow(0 0 20px #0ff) drop-shadow(0 0 2px #f0f) hue-rotate(0deg);
        transform: translate(0,0) skew(0deg,0deg) scale(1);
    }
    15% {
        filter: drop-shadow(-3px 2px 4px #0ff) drop-shadow(5px -1px 0 #0ff) hue-rotate(10deg);
        transform: translate(-2px,3px) skew(2deg,1deg) scale(1.01);
    }
    30% {
        filter: drop-shadow(2px 5px 3px #f0f) drop-shadow(-3px 1px 0 #0ff) hue-rotate(-10deg);
        transform: translate(3px,-2px) skew(-3deg,0deg) scale(0.99);
    }
    60% {
        filter: drop-shadow(0 0 14px #39ff14) hue-rotate(20deg);
        transform: translate(-1px,2px) scale(1.03);
    }
    100% {
        filter: drop-shadow(0 0 20px #0ff) drop-shadow(0 0 12px #f0f) hue-rotate(0deg);
        transform: translate(0,0) skew(0deg,0deg) scale(1);
    }
}

.glitch-text {
    position: relative;
    color: #0ff;
    font-size: 2em;
    font-weight: bold;
    letter-spacing: 2px;
    margin-top: 20px;
    text-align: center;
}
.glitch-text::before, .glitch-text::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    width: 100%;
    opacity: 0.7;
}
.glitch-text::before {
    color: #f0f;
    z-index: -2;
    animation: glitchTextBefore 1s infinite linear alternate-reverse;
}
.glitch-text::after {
    color: #39ff14;
    z-index: -1;
    animation: glitchTextAfter 1s infinite linear alternate-reverse;
}

@keyframes glitchTextBefore {
    0%, 100% { left: 0; top: 0; }
    20% { left: 3px; top: -1px; }
    40% { left: -2px; top: 2px; }
    60% { left: 4px; top: 2px; }
    80% { left: -2px; top: -2px;}
}
@keyframes glitchTextAfter {
    0%, 100% { left: 0; top: 0; }
    10% { left: 1px; top: 2px; }
    30% { left: -3px; top: 1px;}
    50% { left: 2px; top: -1px;}
    70% { left: 3px; top: 3px;}
}

/* Matrix background */
.matrix-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    opacity: 0.1;
    pointer-events: none;
}

/* Network Canvas */
.network-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Terminal fixe en bas à droite */
.terminal {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 280px;
    height: 120px;
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid #0ff;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    z-index: 100;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    overflow: hidden;
}

.terminal-header {
    background: linear-gradient(90deg, #0ff, #39ff14);
    color: #000;
    padding: 4px 8px;
    font-weight: bold;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.terminal-content {
    padding: 10px;
    color: #0ff;
    line-height: 1.4;
    height: calc(100% - 26px);
    overflow-y: auto;
}

.terminal-line {
    margin: 2px 0;
    opacity: 0.9;
}

.terminal-prompt {
    color: #39ff14;
    font-weight: bold;
}

.terminal-value {
    color: #ff0080;
    font-weight: bold;
}

.terminal-cursor {
    animation: blink 1s infinite;
}

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

/* Terminal d'erreur en haut à gauche */
.error-terminal {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 320px;
    height: 100px;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #ff0000;
    border-radius: 8px;
    box-shadow: 0 0 25px rgba(255, 0, 0, 0.5);
    z-index: 200;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    display: none;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.error-terminal-header {
    background: linear-gradient(90deg, #ff0000, #ff4444);
    color: #fff;
    padding: 4px 8px;
    font-weight: bold;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.error-terminal-content {
    padding: 10px;
    color: #0ff;
    line-height: 1.4;
    height: calc(100% - 26px);
    overflow-y: auto;
}

.error-terminal-line {
    margin: 2px 0;
    opacity: 0.9;
}

.error-terminal-prompt {
    color: #39ff14;
    font-weight: bold;
}

.error-fatal {
    color: #ff0000;
    font-weight: bold;
    animation: errorBlink 0.5s infinite;
}

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

.progress-bar {
    color: #0ff;
    font-family: monospace;
}

/* Data flow indicators */
.data-pulse {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(0, 255, 255, 0.8);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.8; 
    }
    50% { 
        transform: scale(2); 
        opacity: 0.3; 
    }
}

/* Terminal IP Challenge */
.ip-terminal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    height: 170px;
    max-width: 90vw;
    background: rgba(0, 0, 0, 0.95);
    border: 3px solid #ff6600;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(255, 102, 0, 0.6);
    z-index: 300;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    display: none;
    animation: ipTerminalSlideIn 0.5s ease-out;
}

@keyframes ipTerminalSlideIn {
    from {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes ipTerminalSlideOut {
    from {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    to {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
}

.ip-terminal-header {
    background: linear-gradient(90deg, #ff6600, #ff9900);
    color: #fff;
    padding: 8px 12px;
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timer {
    background: rgba(255, 0, 0, 0.8);
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
    animation: timerPulse 1s infinite;
}

@keyframes timerPulse {
    0%, 100% { 
        background: rgba(255, 0, 0, 0.8);
        transform: scale(1);
    }
    50% { 
        background: rgba(255, 0, 0, 1);
        transform: scale(1.1);
    }
}

.ip-terminal-content {
    padding: 12px;
    color: #0ff;
    line-height: 1.4;
    height: calc(100% - 40px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ip-terminal-line {
    margin: 4px 0;
    opacity: 0.95;
}

.ip-terminal-prompt {
    color: #ff6600;
    font-weight: bold;
}

.ip-input {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #0ff;
    color: #0ff;
    padding: 4px 8px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    width: 110px;
    outline: none;
    border-radius: 3px;
}

.ip-input:focus {
    border-color: #ff6600;
    box-shadow: 0 0 8px rgba(255, 102, 0, 0.5);
}

#target-ip {
    color: #ff6600;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 102, 0, 0.8);
}

/* Screen flash overlay */
.screen-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 0, 0, 0.7);
    z-index: 250;
    display: none;
    pointer-events: none;
}

.screen-flash.flashing {
    display: block;
    animation: redFlash 0.2s infinite;
}

@keyframes redFlash {
    0%, 100% { 
        opacity: 0;
    }
    50% { 
        opacity: 0.8;
    }
}

.nodes-hidden {
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

/* Media query pour les très petits écrans */
@media (max-width: 480px) {
    .ip-terminal {
        width: 280px;
        height: 160px;
        font-size: 12px;
    }
    
    .ip-terminal-content {
        padding: 8px;
    }
    
    .ip-input {
        font-size: 12px;
        width: 100px;
        padding: 3px 6px;
    }
    
    .ip-terminal-header {
        padding: 6px 10px;
        font-size: 11px;
    }
} 