/* GAME-SPECIFIC STYLES: history-quiz.css */
.game-wrapper {
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    width: 100%;
    max-width: 800px;
    margin: 20px auto; /* Centers the card */
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.game-banner {
    padding: 20px 40px 0;
    line-height: 0; /* Removes extra space below the image */
    text-align: center;
}
.game-banner-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

#mode-selection-container { padding: 30px 40px 40px; text-align: center; }
#mode-selection-container h2 { margin-top: 0; margin-bottom: 30px; font-size: 26px; color: var(--primary-color); }
.mode-btn { font-family: var(--body-font); display: block; width: 80%; max-width: 350px; margin: 15px auto; padding: 15px; font-size: 18px; font-weight: bold; cursor: pointer; border-radius: 12px; border: none; color: white; background-color: var(--info-color); transition: background-color 0.3s, transform 0.2s; }
.mode-btn:hover { background-color: #0056b3; transform: translateY(-2px); }

.quiz-header { background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); color: white; padding: 20px 30px; text-align: center; }
.quiz-header h1 { margin: 0; font-size: 24px; }
.quiz-body { padding: 30px; }

#question-container { margin-bottom: 20px; animation: fadeIn 0.5s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-15px); } to { opacity: 1; transform: translateY(0); } }
.question-text { font-size: 20px; font-weight: bold; margin-bottom: 25px; line-height: 1.5; }
.difficulty-badge { display: inline-block; padding: 4px 10px; font-size: 12px; font-weight: bold; color: white; border-radius: 12px; margin-top: 10px; text-transform: capitalize; }
.difficulty-easy { background-color: var(--success-color); }
.difficulty-medium { background-color: var(--warning-color); color: #333; }
.difficulty-hard { background-color: var(--primary-color); }

#answer-buttons { display: grid; grid-template-columns: 1fr; gap: 10px; }
.btn { font-family: var(--body-font); background-color: #e9ecef; border: 2px solid #ced4da; border-radius: 8px; padding: 15px; font-size: 16px; color: var(--text-color); cursor: pointer; text-align: left; transition: background-color 0.3s, border-color 0.3s, transform 0.1s; }
.btn:hover:not([disabled]) { background-color: #dde2e6; border-color: #adb5bd; }
.btn:active:not([disabled]) { transform: scale(0.98); }
.btn.correct { background-color: var(--success-color); color: white; border-color: var(--success-color); }
.btn.wrong { background-color: var(--primary-color); color: white; border-color: var(--primary-color); }
.btn:disabled { cursor: not-allowed; opacity: 0.9; }

.controls { display: flex; justify-content: space-between; align-items: center; padding: 20px 30px; background-color: #f8f9fa; border-top: 1px solid #dee2e6; flex-wrap: wrap; gap: 15px; }
#timer-container, #score-container { font-size: 16px; font-weight: bold; }
#timer-container { color: var(--info-color); }

#next-btn, #restart-btn {
    background-color: var(--info-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}
#next-btn:hover, #restart-btn:hover {
    background-color: #0056b3;
}

#results-container { padding: 20px; text-align: center; }
#results-container h2 { font-size: 28px; color: var(--primary-color); }
#results-container p { font-size: 20px; line-height: 1.6; }
#results-message { font-style: italic; color: #555; font-size: 18px; margin-top: 15px; }
#results-container #restart-btn { margin-top: 20px; }

.progress-bar-container { width: 100%; background-color: #e9ecef; padding: 4px; box-sizing: border-box; }
#progress-bar { height: 8px; width: 100%; background: linear-gradient(90deg, var(--primary-color), var(--secondary-color)); border-radius: 4px; transition: width 20s linear; }

.hide { display: none; }

@media (max-width: 768px) {
    .game-wrapper { margin: 10px; width: auto; }
    .game-banner { padding: 15px 15px 0; }
    .quiz-body { padding: 20px 15px; }
    #mode-selection-container { padding: 20px 15px 30px; }
    .question-text { font-size: 18px; }
    .btn { font-size: 14px; padding: 12px; }
    #mode-selection-container h2 { font-size: 22px; }
    .mode-btn { font-size: 16px; width: 95%; }
    .controls { justify-content: center; }
}