/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Share Tech Mono', monospace;
}

:root {
    --neon-blue: #00f3ff;
    --neon-pink: #ff00ff;
    --neon-green: #00ff8b;
    --neon-yellow: #ffff00;
    --cyber-dark: #050a30;
    --cyber-black: #0a0a18;
    --cyber-gray: #1e1e35;
    --terminal-green: #0cff0c;
    --glow-blue: 0 0 5px #00f3ff, 0 0 10px #00f3ff, 0 0 20px #00f3ff;
    --glow-pink: 0 0 5px #ff00ff, 0 0 10px #ff00ff, 0 0 20px #ff00ff;
    --glow-green: 0 0 5px #00ff8b, 0 0 10px #00ff8b, 0 0 20px #00ff8b;
}

body {
    background-color: var(--cyber-black);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animation du terminal */
.terminal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 10, 30, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s;
}

.terminal-window {
    width: 80%;
    max-width: 800px;
    height: 60%;
    background-color: var(--cyber-black);
    border: 1px solid var(--neon-green);
    border-radius: 4px;
    box-shadow: 0 0 15px var(--neon-green);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.terminal-header {
    background-color: var(--cyber-gray);
    padding: 8px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--neon-green);
}

.terminal-title {
    color: var(--neon-green);
    font-size: 14px;
}

.terminal-controls {
    display: flex;
    gap: 8px;
}

.terminal-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #555;
}

.terminal-content {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    color: var(--terminal-green);
    font-family: 'VT323', monospace;
    font-size: 16px;
    line-height: 1.4;
}

.terminal-content .command {
    color: var(--neon-yellow);
}

.terminal-content .success {
    color: var(--neon-green);
}

.terminal-content .error {
    color: #ff3333;
}

.terminal-content .highlight {
    color: var(--neon-blue);
    font-weight: bold;
}

/* Container principal */
.main-container {
    display: none; /* Initialement caché */
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Grilles cyberpunk */
.cyber-grid {
    position: absolute;
    left: 0;
    width: 100%;
    height: 80px;
    overflow: hidden;
    z-index: -1;
}

.top-grid {
    top: 0;
}

.bottom-grid {
    bottom: 0;
}

.grid-line {
    position: absolute;
    width: 100%;
    height: 1px;
    background-color: rgba(0, 243, 255, 0.3);
    animation: gridPulse 4s infinite alternate;
}

@keyframes gridPulse {
    0% { opacity: 0.3; }
    50% { opacity: 0.7; }
    100% { opacity: 0.3; }
}

/* Header avec logo ASCII */
.app-header {
    text-align: center;
    margin: 40px 0;
}

.logo-container {
    margin-bottom: 10px;
}

.ascii-art {
    color: var(--neon-blue);
    font-family: monospace;
    text-shadow: var(--glow-blue);
    font-size: 14px;
    line-height: 1.2;
    margin: 0;
    padding: 0;
}

.neon-text {
    font-size: 48px;
    color: var(--neon-pink);
    text-shadow: var(--glow-pink);
    margin: 10px 0;
    letter-spacing: 2px;
    animation: textFlicker 5s infinite alternate;
}

.tagline {
    font-size: 16px;
    color: var(--neon-green);
    letter-spacing: 1px;
}

@keyframes textFlicker {
    0%, 19.999%, 22%, 62.999%, 64%, 94.999%, 96%, 100% {
        opacity: 1;
    }
    20%, 21.999%, 63%, 63.999%, 95%, 95.999% {
        opacity: 0.8;
    }
}

/* Conteneur d'authentification */
.auth-container {
    background-color: var(--cyber-gray);
    border: 2px solid var(--neon-blue);
    border-radius: 8px;
    padding: 30px;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.auth-container::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 1px solid var(--neon-blue);
    border-radius: 10px;
    opacity: 0.5;
    z-index: -1;
}

/* Tabs */
.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--neon-blue);
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--neon-pink);
    transition: width 0.3s;
}

.tab-btn.active {
    color: var(--neon-pink);
}

.tab-btn.active::after {
    width: 100%;
}

.tab-btn:hover:not(.active) {
    color: var(--neon-blue);
}

/* Panels */
.auth-panel {
    display: none;
}

.auth-panel.active {
    display: block;
}

/* Form */
.cyber-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: var(--neon-blue);
    font-size: 14px;
}

.cyber-input {
    background-color: rgba(0, 0, 30, 0.6);
    border: 1px solid var(--neon-blue);
    border-radius: 4px;
    padding: 12px 15px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s;
}

.cyber-input:focus {
    outline: none;
    box-shadow: 0 0 10px var(--neon-blue);
    border-color: var(--neon-blue);
}

.cyber-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.cyber-btn {
    background-color: transparent;
    border: 2px solid var(--neon-green);
    border-radius: 4px;
    padding: 12px 25px;
    color: var(--neon-green);
    font-size: 16px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    margin-top: 10px;
    align-self: center;
}

.cyber-btn:hover {
    background-color: rgba(0, 255, 139, 0.1);
    box-shadow: 0 0 10px var(--neon-green);
}

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

.btn-glitch {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 65%, rgba(0, 255, 139, 0.8) 70%, transparent 80%);
    opacity: 0;
}

.cyber-btn:hover .btn-glitch {
    animation: glitch 1s forwards;
}

@keyframes glitch {
    0% { opacity: 0; left: -100%; }
    20% { opacity: 0.8; }
    30% { opacity: 0; }
    35% { opacity: 0.6; }
    65% { opacity: 0; }
    100% { opacity: 0; left: 100%; }
}

/* Footer */
.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding: 15px 0;
    border-top: 1px solid rgba(0, 243, 255, 0.3);
    font-size: 14px;
    color: var(--neon-blue);
}

.crypto-hash {
    font-family: 'VT323', monospace;
    letter-spacing: 1px;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--neon-green);
    box-shadow: 0 0 5px var(--neon-green);
    animation: pulse 2s infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .app-header {
        margin: 20px 0;
    }
    
    .neon-text {
        font-size: 36px;
    }
    
    .auth-container {
        padding: 20px;
    }
    
    .terminal-window {
        width: 90%;
        height: 70%;
    }
    
    .ascii-art {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .neon-text {
        font-size: 28px;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        width: 100%;
    }
    
    .terminal-window {
        width: 95%;
        height: 80%;
    }
}
