:root {
    --primary: #0D47A1;
    --accent: #2196F3;
    --bg-light: #F5F9FF;
    --text: #1A237E;
    --danger: #D32F2F;
    --gold: #FFC107;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    color: var(--text);
    margin: 0; min-height: 100vh;
    display: flex; justify-content: center; align-items: center;
}

.container {
    width: 90%; max-width: 850px;
    background: #fff; padding: 40px;
    border-radius: 30px; box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    text-align: center;
}

.hidden { display: none !important; }

/* Difficulty Slider */
.difficulty-selector { margin: 30px auto; width: 80%; }
.slider-labels { display: flex; justify-content: space-between; margin-top: 10px; font-weight: bold; color: var(--primary); }
input[type="range"] { width: 100%; -webkit-appearance: none; height: 10px; background: #E3F2FD; border-radius: 5px; outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 25px; height: 25px; background: var(--primary); border-radius: 50%; cursor: pointer; }

/* Form & Buttons */
input[type="text"], input[type="email"] { width: 80%; padding: 15px; margin: 10px 0; border: 2px solid #eee; border-radius: 50px; font-size: 1.1rem; }
.btn-main { background: var(--primary); color: #fff; border: none; padding: 18px 50px; border-radius: 50px; cursor: pointer; font-weight: bold; font-size: 1.2rem; transition: 0.2s; }
.btn-main:hover { transform: scale(1.05); background: #1565C0; }

/* Quiz UI */
.quiz-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; padding: 15px; background: var(--bg-light); border-radius: 20px; }
.timer-box { color: var(--danger); font-size: 1.4rem; font-weight: bold; }
.joker-box { display: flex; align-items: center; gap: 8px; cursor: pointer; background: #fff; padding: 8px 15px; border-radius: 50px; border: 2px solid var(--accent); transition: 0.2s; }
.joker-box.disabled-visual { opacity: 0.3; cursor: not-allowed; filter: grayscale(1); }

#question-text { font-size: 1.7rem; margin-bottom: 40px; color: var(--primary); line-height: 1.4; }
.answers-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.answer-btn { position: relative; background: #fff; border: 2px solid #E3F2FD; padding: 25px 25px 25px 70px; border-radius: 20px; text-align: left; font-size: 1.15rem; font-weight: 600; cursor: pointer; transition: 0.2s; display: flex; align-items: center; }
.answer-btn::before { content: attr(data-letter); position: absolute; left: 18px; width: 40px; height: 40px; background: var(--bg-light); color: var(--primary); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: bold; }
.answer-btn:hover { background: var(--bg-light); border-color: var(--accent); transform: translateX(5px); }
.answer-btn.disabled-joker { opacity: 0.1; pointer-events: none; }

/* Transitions */
#p-transition { padding: 50px; animation: fadeIn 0.5s; }
.loader-bar-container { width: 100%; height: 10px; background: #eee; margin-top: 30px; border-radius: 5px; overflow: hidden; }
.loader-bar { height: 100%; background: var(--accent); width: 0%; animation: load 1.5s linear forwards; }
@keyframes load { to { width: 100%; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Ranking */
.ranking-table { width: 100%; border-collapse: collapse; margin-top: 30px; }
.ranking-table th, .ranking-table td { padding: 15px; border-bottom: 1px solid #eee; text-align: left; }
.level-badge { padding: 4px 10px; border-radius: 50px; font-size: 0.75rem; font-weight: bold; text-transform: uppercase; }
.badge-easy { background: #C8E6C9; color: #2E7D32; }
.badge-normal { background: #BBDEFB; color: #1565C0; }
.badge-hard { background: #D1C4E9; color: #4527A0; }