/* ============================================= */
/*     СТИЛИ СТРАНИЦЫ "ПРОВЕРКА УМНОЖЕНИЯ"      */
/* ============================================= */

/* --- Общие стили страницы --- */
main.quiz-page {
    padding-top: 70px;
    padding-bottom: 40px;
}
.page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}
.page-title-section {
    text-align: center;
    margin-bottom: 30px;
}
.page-title-section h1 { font-size: 2.8rem; font-weight: 700; }
.page-title-section p { font-size: 1.1rem; color: #6c757d; }

/* --- Обертка викторины --- */
.quiz-wrapper {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.07);
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.quiz-screen { width: 100%; }

/* --- Стартовый экран --- */
.start-content { text-align: center; }
.start-icon { font-size: 4rem; color: #0d6efd; margin-bottom: 20px; }
.start-content h2 { font-size: 2rem; margin-bottom: 10px; }
.start-content p { color: #6c757d; max-width: 450px; margin: 0 auto 30px; }

/* --- Игровой экран --- */
.quiz-header { margin-bottom: 30px; }
.progress-bar {
    height: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}
.progress-bar-fill {
    width: 0%;
    height: 100%;
    background-color: #0d6efd;
    transition: width 0.3s ease;
}
.quiz-stats { display: flex; justify-content: space-between; color: #6c757d; }
.question-container { text-align: center; margin-bottom: 20px; }
#questionText { font-size: 3rem; font-weight: 700; }
.answer-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

#answerInput {
    flex-grow: 1;
    min-width: 0;
    padding: 15px;
    font-size: 1.5rem;
    text-align: center;
    border: 2px solid #ced4da;
    border-radius: 8px;
}

.quiz-btn.submit {
    flex-shrink: 0;
    background-color: #28a745;
}
#answerInput {
    flex-grow: 1;
    padding: 15px;
    font-size: 1.5rem;
    text-align: center;
    border: 2px solid #ced4da;
    border-radius: 8px;
}
#answerInput:focus {
    outline: none;
    border-color: #0d6efd;
}
.feedback {
    text-align: center;
    height: 24px;
    margin-top: 15px;
    font-weight: 600;
}
.feedback.correct { color: #28a745; }
.feedback.incorrect { color: #dc3545; }

/* --- Экран результатов --- */
.result-content { text-align: center; }
#resultTitle { font-size: 2.2rem; margin-bottom: 10px; }
#resultSummary { color: #6c757d; font-size: 1.1rem; margin-bottom: 30px; }
.result-details {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}
.detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
.detail-item i { font-size: 1.5rem; color: #0d6efd; }
.detail-item span { color: #6c757d; }
.detail-item strong { font-size: 1.2rem; }
.mistakes-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
    text-align: left;
    max-width: 300px;
    margin: 20px auto 0;
}
.mistakes-list li {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 8px;
}

/* --- Общие стили для кнопок --- */
.quiz-btn {
    padding: 15px 30px;
    border-radius: 8px;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
}
.quiz-btn.start, .quiz-btn.restart { background-color: #0d6efd; }
.quiz-btn.start:hover, .quiz-btn.restart:hover { background-color: #0b5ed7; }
.quiz-btn.submit { background-color: #28a745; }
.quiz-btn.submit:hover { background-color: #218838; }
.quiz-btn:active { transform: scale(0.98); }


/* ============================================= */
/*          АДАПТАЦИЯ ДЛЯ ТЕМНОЙ ТЕМЫ            */
/* ============================================= */
.dark-theme .page-title-section p { color: #a0a0a0; }
.dark-theme .quiz-wrapper { background-color: #2c2c2e; border-color: #444; }
.dark-theme .start-content p, .dark-theme .quiz-stats { color: #a0a0a0; }
.dark-theme .start-icon { color: #58a6ff; }
.dark-theme .progress-bar { background-color: #444; }
.dark-theme .progress-bar-fill { background-color: #58a6ff; }
.dark-theme #answerInput {
    background-color: #1c1c1e;
    border-color: #555;
    color: #fff;
}
.dark-theme #answerInput:focus { border-color: #58a6ff; }
.dark-theme #resultSummary, .dark-theme .detail-item span { color: #a0a0a0; }
.dark-theme .detail-item i { color: #58a6ff; }
.dark-theme .mistakes-list li { background-color: #49282b; color: #f8d7da; }