/* Import de la police Windows 95 */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* Définition des polices Windows 95/98 */
@font-face {
    font-family: 'MS Sans Serif';
    src: local('MS Sans Serif'), local('Microsoft Sans Serif'), local('Tahoma'), local('Arial');
    font-display: swap;
}

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'MS Sans Serif', 'Microsoft Sans Serif', 'Tahoma', 'Arial', sans-serif;
    background: #008080;
    background-image: 
        radial-gradient(circle at 25% 25%, #00ffff 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, #ff00ff 0%, transparent 50%),
        linear-gradient(45deg, #008080 25%, transparent 25%),
        linear-gradient(-45deg, #004040 25%, transparent 25%);
    background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s ease;
    overflow-x: hidden;
}

/* Backgrounds pour chaque option */
body.option1 {
    background: #000080;
    background-image: 
        repeating-linear-gradient(45deg, #ffffff 0px, #ffffff 2px, transparent 2px, transparent 10px),
        repeating-linear-gradient(-45deg, #ffd700 0px, #ffd700 2px, transparent 2px, transparent 10px);
}

body.option2 {
    background: #800000;
    background-image: 
        radial-gradient(circle at 20% 20%, #ffff00 0%, transparent 30%),
        radial-gradient(circle at 80% 80%, #ff0000 0%, transparent 30%),
        repeating-linear-gradient(90deg, transparent, transparent 10px, #ffffff22 10px, #ffffff22 11px);
}

body.option3 {
    background: linear-gradient(45deg, #ff0000 25%, #ff7f00 25%, #ff7f00 50%, #ffff00 50%, #ffff00 75%, #00ff00 75%);
    background-size: 40px 40px;
    animation: rainbowMove 2s linear infinite;
}

@keyframes rainbowMove {
    0% {
        background-position: 0px 0px;
    }
    100% {
        background-position: 40px 40px;
    }
}

body.option4 {
    background: #654321;
    background-image: 
        repeating-conic-gradient(from 0deg at 50% 50%, #daa520 0deg, #cd853f 45deg, #8b4513 90deg, #654321 135deg, #daa520 180deg);
    background-size: 60px 60px;
}

.container {
    background: #c0c0c0;
    padding: 1.2rem;
    border: 3px outset #c0c0c0;
    box-shadow: 
        inset -2px -2px 0px #808080,
        inset 2px 2px 0px #ffffff,
        5px 5px 0px #000000;
    text-align: center;
    max-width: 450px;
    width: 90%;
    position: relative;
}

h1 {
    color: #000080;
    margin-bottom: 1.2rem;
    font-size: 1.3rem;
    font-weight: bold;
    text-shadow: 2px 2px 0px #c0c0c0;
    font-family: 'Press Start 2P', 'MS Sans Serif', 'Microsoft Sans Serif', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.4;
}

.dropdown-container {
    margin-bottom: 1.2rem;
    background: #c0c0c0;
    padding: 0.8rem;
    border: 2px inset #c0c0c0;
}

label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: bold;
    color: #000000;
    font-size: 0.95rem;
    font-family: 'MS Sans Serif', 'Microsoft Sans Serif', 'Tahoma', sans-serif;
    text-shadow: 1px 1px 0px #ffffff;
}

select {
    width: 100%;
    padding: 6px;
    font-size: 0.9rem;
    border: 2px inset #c0c0c0;
    background-color: #ffffff;
    font-family: 'MS Sans Serif', 'Microsoft Sans Serif', 'Tahoma', sans-serif;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: 
        linear-gradient(45deg, transparent 50%, #000000 50%),
        linear-gradient(135deg, #000000 50%, transparent 50%);
    background-position: 
        calc(100% - 15px) calc(50% - 2px),
        calc(100% - 10px) calc(50% - 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

select:hover {
    background-color: #e0e0e0;
}

select:focus {
    outline: 2px dotted #000000;
    outline-offset: 2px;
}

/* Animation pour les changements */
.fade-in {
    animation: fadeIn 0.3s linear;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Animation de scintillement kitsch */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.blink {
    animation: blink 1s infinite;
}

/* Styles pour la section de code */
.code-section {
    margin-top: 1.2rem;
    padding: 1rem;
    background-color: #c0c0c0;
    border: 3px groove #c0c0c0;
    position: relative;
}

.code-section::before {
    content: "● ■ ▲";
    position: absolute;
    top: 5px;
    left: 10px;
    color: #ff0000;
    font-size: 12px;
    animation: blink 1.5s infinite;
}

.code-section h3 {
    color: #000080;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    font-weight: bold;
    font-family: 'Press Start 2P', 'MS Sans Serif', 'Microsoft Sans Serif', monospace;
    text-shadow: 1px 1px 0px #ffffff;
    text-transform: uppercase;
    line-height: 1.4;
}

.code-input-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 0.8rem;
}

.code-input {
    width: 50px;
    height: 42px;
    font-size: 1.3rem;
    text-align: center;
    border: 2px inset #c0c0c0;
    background-color: #ffffff;
    font-weight: bold;
    font-family: 'Fixedsys', 'Courier New', 'MS Sans Serif', monospace;
    color: #000000;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.code-input:focus {
    outline: 2px dotted #000000;
    outline-offset: 2px;
    background-color: #ffff00;
}

/* Validation feedback styles */
.code-input.correct {
    background-color: #90EE90 !important;
    border-color: #4CAF50;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}

.code-input.incorrect {
    background-color: #ff6b6b !important;
    border-color: #f44336;
    box-shadow: 0 0 5px rgba(244, 67, 54, 0.5);
}

.separator {
    font-size: 1.3rem;
    font-weight: bold;
    color: #ff0000;
    font-family: 'Fixedsys', 'Courier New', 'MS Sans Serif', monospace;
    text-shadow: 1px 1px 0px #ffffff;
}

.validate-btn {
    background: #c0c0c0;
    color: #000000;
    border: 2px outset #c0c0c0;
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: bold;
    font-family: 'MS Sans Serif', 'Microsoft Sans Serif', 'Tahoma', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 2px 2px 0px #808080;
}

.validate-btn:hover {
    background: #e0e0e0;
}

.validate-btn:active {
    border: 2px inset #c0c0c0;
    box-shadow: inset 2px 2px 0px #808080;
}

.code-result {
    margin-top: 0.8rem;
    padding: 0.8rem;
    font-weight: bold;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'MS Sans Serif', 'Microsoft Sans Serif', 'Tahoma', sans-serif;
    border: 2px inset #c0c0c0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.code-result.success {
    background-color: #00ff00;
    color: #000000;
    text-shadow: 1px 1px 0px #ffffff;
    animation: blink 0.5s 3;
}

.code-result.error {
    background-color: #ff0000;
    color: #ffffff;
    text-shadow: 1px 1px 0px #000000;
    animation: blink 0.3s 5;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 1rem;
        margin: 0.8rem;
        box-shadow: 
            inset -2px -2px 0px #808080,
            inset 2px 2px 0px #ffffff,
            3px 3px 0px #000000;
    }
    
    h1 {
        font-size: 1.1rem;
        letter-spacing: 1px;
        margin-bottom: 1rem;
    }
    
    select {
        padding: 6px;
        font-size: 0.85rem;
    }
    
    .code-input {
        width: 45px;
        height: 38px;
        font-size: 1.1rem;
    }
    
    .validate-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    
    .code-section::before {
        font-size: 8px;
        top: 3px;
        left: 6px;
    }
    
    .dropdown-container {
        padding: 0.6rem;
        margin-bottom: 1rem;
    }
    
    .code-section {
        padding: 0.8rem;
        margin-top: 1rem;
    }
}

/* Curseur clignotant pour les inputs */
@keyframes cursor-blink {
    0%, 50% { border-right: 2px solid #000000; }
    51%, 100% { border-right: 2px solid transparent; }
}

.code-input:focus {
    animation: cursor-blink 1s infinite;
}
