:root {
    --bg-color: #050505;
    --primary-color: #fff;
    --accent-color: #ff3333;
    --glass-bg: rgba(20, 20, 20, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    background-color: var(--bg-color);
    color: var(--primary-color);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: -1;
    pointer-events: none;
}

.container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    z-index: 10;
}

.login-box {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 3rem 2.5rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: fadeIn 1s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

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

.title {
    font-family: 'Space Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    text-align: center;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.subtitle {
    font-size: 0.85rem;
    color: #888;
    text-align: center;
    margin-bottom: 2.5rem;
}

.input-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.input-group label {
    display: block;
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    color: #aaa;
}

.input-group input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.error-msg {
    color: var(--accent-color);
    font-size: 0.8rem;
    font-family: 'Space Mono', monospace;
    text-align: center;
    margin-bottom: 1rem;
    min-height: 1.2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.error-msg.visible {
    opacity: 1;
}

.submit-btn {
    width: 100%;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 1rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 2px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.submit-btn:hover {
    background: #fff;
    color: #000;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

/* L'indice invisible, de la même couleur que le fond */
.anomaly {
    position: absolute;
    top: 20px;
    right: 20px;
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    color: var(--bg-color); /* Rend le texte invisible jusqu'à ce qu'il soit surligné */
    user-select: text;
    cursor: text;
    z-index: 5;
    opacity: 0.8;
}

/* Le texte devient visible uniquement quand on le sélectionne */
.anomaly::selection {
    background-color: #333;
    color: #22ff22;
}
.anomaly::-moz-selection {
    background-color: #333;
    color: #22ff22;
}

.glitch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.01);
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    animation: glitch 8s infinite;
}

@keyframes glitch {
    0% { opacity: 0; }
    5% { opacity: 0; }
    5.1% { opacity: 0.5; background: rgba(255, 0, 0, 0.03); }
    5.2% { opacity: 0; }
    99% { opacity: 0; }
    100% { opacity: 0; }
}

.reset-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: transparent;
    color: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
}

.reset-btn:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
    background: rgba(255, 51, 51, 0.1);
}
