/* Game-specific styles */
.game-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-top: 30px;
}

.game-screen {
    padding: 30px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.game-screen.hidden {
    display: none;
}

.back-button {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 16px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: #764ba2;
    transform: translateY(-1px);
}

/* Start Screen */
.game-intro {
    text-align: center;
    max-width: 500px;
}

.game-intro h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 2.2em;
}

.game-intro p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.start-button {
    margin-top: 30px;
    padding: 15px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.start-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Mode Selection Buttons */
.mode-buttons {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

.mode-button {
    padding: 25px 40px;
    font-size: 1.3em;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    min-width: 200px;
    text-align: center;
    line-height: 1.4;
    font-weight: 600;
}

.mode-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.mode-description {
    display: block;
    font-size: 0.75em;
    opacity: 0.9;
    margin-top: 5px;
}

/* Game Play Screen */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 30px;
    padding: 0 20px;
}

.timer-container {
    flex: 1;
    max-width: 300px;
}

.timer-bar {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 5px;
}

.timer-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50 0%, #FFC107 50%, #F44336 100%);
    width: 100%;
    transition: width 0.1s linear;
}

.timer-text {
    text-align: center;
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
}

.score-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.score-label {
    font-weight: 600;
    color: #555;
}

.score {
    font-size: 1.8em;
    font-weight: bold;
    color: #667eea;
}

.question-container {
    text-align: center;
    margin-bottom: 30px;
}

.question {
    font-size: 1.4em;
    color: #333;
    margin-bottom: 25px;
    line-height: 1.4;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

.option-button {
    padding: 15px 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.option-button:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateY(-2px);
}

.option-button.correct {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.option-button.incorrect {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

/* Feedback */
.feedback {
    margin-top: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
    font-size: 1.1em;
}

.feedback.correct {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.feedback.incorrect {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Game Over Screen */
.game-results {
    text-align: center;
    width: 100%;
}

.game-results h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5em;
}

.final-score {
    margin-bottom: 30px;
}

.final-score-label {
    font-size: 1.2em;
    color: #666;
    margin-right: 10px;
}

.final-score-number {
    font-size: 3em;
    font-weight: bold;
    color: #667eea;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
}

.game-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.play-again-button {
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-again-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.back-to-main {
    padding: 15px 30px;
    background: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

.back-to-main:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .game-header {
        flex-direction: column;
        gap: 20px;
    }

    .timer-container {
        max-width: 100%;
    }

    .options {
        grid-template-columns: 1fr;
    }

    .game-actions {
        flex-direction: column;
        align-items: center;
    }
}