:root {
    --primary: #8b5cf6;
    --secondary: #ec4899;
    --bg-dark: #0f172a;
    --glass: rgba(255, 255, 255, 0.05);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: white;
    overflow-x: hidden;
}

/* Fond animé */
.animated-bg {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 20% 30%, #2e1065 0%, transparent 40%),
                radial-gradient(circle at 80% 70%, #831843 0%, transparent 40%);
    animation: pulse 10s infinite alternate;
}

@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.2); }
}

.main-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header { text-align: center; margin-bottom: 50px; }
h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    letter-spacing: -2px;
    margin: 10px 0;
    background: linear-gradient(to right, #a78bfa, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.subtitle { color: #cbd5e1; font-size: 1.2rem; }

.glass-card {
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 30px;
}

/* CARTE DE QUESTION UNIQUE */
.single-q-card {
    width: 100%;
    max-width: 500px;
    text-align: center;
    padding: 50px 30px;
    transition: transform 0.2s, opacity 0.2s;
}

.single-q-card h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    color: #a78bfa;
    margin: 0 0 30px 0;
    letter-spacing: 2px;
}

.single-q-card input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 20px;
    border-radius: 12px;
    color: white;
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 30px;
    outline: none;
    transition: 0.3s;
}

.single-q-card input:focus {
    border-color: var(--primary);
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

/* BARRE DE PROGRESSION */
.progress-container {
    width: 100%;
    max-width: 500px;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    margin-top: 40px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%; /* Mis à jour en JS */
    background: linear-gradient(to right, #a78bfa, #f472b6);
    transition: width 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hidden { display: none !important; }
.success { text-align: center; max-width: 500px; }
.check-icon { font-size: 4rem; color: #4ade80; margin-bottom: 20px; }

/* STYLE DES BOUTONS */
.primary-btn {
    background: white;
    color: var(--bg-dark);
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    width: 100%;
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    transition: 0.3s;
}

.primary-btn:hover { 
    transform: translateY(-2px); 
    background: #a78bfa; 
    color: white; 
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.3);
}

/* ANIMATION PULSE BOUTON */
.pulse {
    animation: shadow-pulse 2s infinite;
}

@keyframes shadow-pulse {
    0% { box-shadow: 0 0 0 0px rgba(167, 139, 250, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(167, 139, 250, 0); }
    100% { box-shadow: 0 0 0 0px rgba(167, 139, 250, 0); }
}

/* STYLE DU VERROUILLAGE (OVERLAY) */
.auth-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.auth-card {
    max-width: 400px;
    width: 90%;
    text-align: center;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.lock-icon { font-size: 3rem; margin-bottom: 15px; }

.auth-card input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 15px;
    border-radius: 12px;
    color: white;
    text-align: center;
    font-size: 1.2rem;
    margin: 20px 0;
    outline: none;
    transition: border-color 0.3s;
}

.auth-card input:focus {
    border-color: var(--primary);
}

.auth-error { color: #f87171; font-size: 0.85rem; margin-top: 15px; font-weight: bold; }

.overlay-hide {
    opacity: 0;
    pointer-events: none;
}

.rules-list {
    text-align: left;
    background: rgba(0,0,0,0.2);
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.rules-list p { margin: 10px 0; }


.results-container {
    width: 100%;
    max-width: 600px;
    margin-top: 20px;
}

.results-list-final {
    max-height: 400px;
    overflow-y: auto;
    text-align: left;
    padding-right: 10px;
}

.result-item {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    margin-bottom: 10px;
    padding: 15px;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.result-num {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--secondary);
    margin-right: 20px;
    min-width: 40px;
}

.result-details p { margin: 2px 0; font-size: 0.9rem; }
.player-val { color: #cbd5e1; }
.correct-val { color: #4ade80; font-weight: bold; }

/* Scrollbar stylisée */
.results-list-final::-webkit-scrollbar { width: 6px; }
.results-list-final::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }