* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    direction: rtl;
}

.container {
    width: 100%;
    max-width: 800px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

.screen {
    display: none;
    padding: 40px;
    animation: fadeIn 0.5s ease-in;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-card {
    text-align: center;
    padding: 40px;
}

.menu-subtitle {
    font-size: 1.3em;
    color: #555;
    margin-bottom: 40px;
}

.game-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    justify-content: center;
    margin-top: 40px;
}

.game-option {
    min-width: 300px;
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    border: 3px solid #e0e0e0;
    transition: all 0.3s ease;
}

.game-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-color: #667eea;
}

.game-option h3 {
    color: #2c3e50;
    font-size: 1.8em;
    margin-bottom: 15px;
}

.game-option > p {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.game-option .rules {
    text-align: right;
    margin: 20px 0;
}

.game-option .rules li {
    font-size: 1em;
    padding: 8px;
}

.intro-card, .results-card {
    text-align: center;
    padding: 20px;
}

.intro-card h2, .results-card h2 {
    color: #2c3e50;
    font-size: 2em;
    margin-bottom: 20px;
}

.intro-card p {
    font-size: 1.2em;
    color: #555;
    margin-bottom: 30px;
    line-height: 1.8;
}

.rules {
    text-align: right;
    list-style: none;
    margin: 30px 0;
    padding: 0;
}

.rules li {
    padding: 15px;
    margin: 10px 0;
    background: #f8f9fa;
    border-right: 4px solid #667eea;
    border-radius: 8px;
    font-size: 1.1em;
    color: #333;
}

.btn {
    padding: 15px 40px;
    font-size: 1.2em;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    margin-top: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: rgba(102, 126, 234, 0.2);
}

.game-header {
    margin-bottom: 30px;
}

.score {
    font-size: 1.5em;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 20px;
    text-align: center;
}

.progress {
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease;
    width: 0%;
}

.question-counter {
    text-align: center;
    color: #666;
    font-size: 1.1em;
}

.question-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    border: 2px solid #e0e0e0;
}

#question-text {
    font-size: 1.8em;
    color: #2c3e50;
    margin-bottom: 30px;
    line-height: 1.6;
    text-align: right;
}

.answers {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.answer-btn {
    padding: 20px;
    font-size: 1.2em;
    border: 3px solid #ddd;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: right;
    color: #333;
}

.answer-btn:hover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: translateX(-5px);
}

.answer-btn.correct {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.answer-btn.incorrect {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.answer-btn:disabled {
    cursor: not-allowed;
}

.explanation {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    font-size: 1.1em;
    line-height: 1.8;
    color: #856404;
    text-align: right;
}

.explanation.hidden {
    display: none;
}

.hidden {
    display: none;
}

.results-card {
    padding: 40px 20px;
}

.final-score {
    margin: 40px 0;
}

.score-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.score-circle span:first-child {
    font-size: 3.5em;
    font-weight: bold;
}

.score-label {
    font-size: 1.2em;
    margin-top: 5px;
}

.score-percentage {
    font-size: 2.5em;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 30px;
}

.results-message {
    font-size: 1.3em;
    color: #555;
    line-height: 1.8;
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

@media (max-width: 600px) {
    header h1 {
        font-size: 2em;
    }
    
    #question-text {
        font-size: 1.4em;
    }
    
    .answer-btn {
        font-size: 1em;
        padding: 15px;
    }
    
    .score-circle {
        width: 150px;
        height: 150px;
    }
    
    .score-circle span:first-child {
        font-size: 2.5em;
    }
}

