* {
    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;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
}

.game-grid h2 {
    color: white;
    text-align: center;
    margin: 30px 0 20px 0;
    font-size: 1.8em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.games-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.game-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.2);
    border-color: #667eea;
}

.game-card h3 {
    color: #667eea;
    font-size: 1.3em;
    margin-bottom: 10px;
}

.game-card p {
    color: #666;
    line-height: 1.5;
}

.score-display {
    background: rgba(255,255,255,0.2);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    margin-top: 30px;
    backdrop-filter: blur(10px);
}

.score-display h3 {
    color: white;
    font-size: 1.5em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Game Page Styles */
.game-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin: 20px auto;
    max-width: 800px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.game-header {
    text-align: center;
    margin-bottom: 30px;
}

.game-header h1 {
    color: #667eea;
    margin-bottom: 10px;
}

.difficulty-selector {
    margin-bottom: 30px;
    text-align: center;
}

.difficulty-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 25px;
    margin: 0 10px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
}

.difficulty-btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.difficulty-btn.active {
    background: #4CAF50;
}

.question-container {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    border-left: 5px solid #667eea;
}

.question h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.2em;
}

.options {
    display: grid;
    gap: 10px;
}

.option {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.option:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.option.selected {
    border-color: #667eea;
    background: #e3f2fd;
}

.option.correct {
    border-color: #4CAF50;
    background: #e8f5e8;
}

.option.incorrect {
    border-color: #f44336;
    background: #ffeaea;
}

.game-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
}

.btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.btn.secondary {
    background: #6c757d;
}

.btn.secondary:hover {
    background: #5a6268;
}

.score-info {
    text-align: center;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.score-info h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.progress-bar {
    background: #e0e0e0;
    border-radius: 10px;
    height: 20px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, #4CAF50, #45a049);
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.result-container {
    text-align: center;
    padding: 30px;
}

.result-container h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 2em;
}

.final-score {
    font-size: 1.5em;
    color: #4CAF50;
    margin: 20px 0;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .games-section {
        grid-template-columns: 1fr;
    }
    
    .game-container {
        margin: 10px;
        padding: 20px;
    }
    
    .game-controls {
        flex-direction: column;
        gap: 15px;
    }
}