:root {
    --primary: #6c5ce7;
    --bg: #f0f3f7;
    --card: #ffffff;
    --text: #2d3436;
    --shadow: rgba(0,0,0,0.1);
}

.dark-mode {
    --bg: #1a1a2e;
    --card: #16213e;
    --text: #e9ecef;
    --shadow: rgba(0,0,0,0.4);
}

* { box-sizing: border-box; font-family: 'Cairo', sans-serif; }

body {
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    transition: 0.3s;
    overflow: hidden;
}

.game-container {
    background: var(--card);
    padding: 2rem;
    border-radius: 25px;
    box-shadow: 0 10px 30px var(--shadow);
    width: 95%;
    max-width: 500px;
    text-align: center;
    position: relative;
}

#theme-toggle {
    position: absolute;
    top: 15px;
    left: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary);
}

.main-icon { font-size: 4rem; margin-bottom: 1rem; }
.color-primary { color: var(--primary); }
.color-gold { color: #f1c40f; }
.color-blue { color: #3498db; }

.mode-grid, .category-grid, .options-grid {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.mode-btn, .cat-btn, .option-btn {
    background: var(--card);
    border: 2px solid #e0e0e0;
    padding: 12px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    color: var(--text);
}

.mode-btn:hover { border-color: var(--primary); transform: translateY(-3px); }

/* شريط التقدم */
.progress-container, .multi-timer-bar {
    flex-grow: 1;
    height: 10px;
    background: #eee;
    margin: 0 10px;
    border-radius: 10px;
    overflow: hidden;
}

#progress-bar, #multi-progress {
    width: 100%;
    height: 100%;
    background: var(--primary);
    transition: width 0.1s linear;
}

.top-bar, .multi-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }

/* أزرار التحدي 1 ضد 1 */
.multi-controls {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.player-trigger {
    flex: 1;
    padding: 30px 10px;
    border-radius: 15px;
    border: none;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
}

.p1 { background: #ff7675; box-shadow: 0 5px #d63031; }
.p2 { background: #74b9ff; box-shadow: 0 5px #0984e3; }
.player-trigger:active { transform: translateY(4px); box-shadow: none; }

.hidden { display: none; }
.correct { background: #2ecc71 !important; color: white; border-color: #2ecc71 !important; }
.wrong { background: #e74c3c !important; color: white; border-color: #e74c3c !important; }

.high-score-tag { margin-top: 15px; font-weight: bold; color: #f1c40f; }
.back-btn { margin-top: 15px; background: none; border: none; color: #888; cursor: pointer; text-decoration: underline; }

.main-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 20px;
}
