.game-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    transition: background-color 0.3s, color 0.3s;
}

/* Стили для светлой темы */
body:not(.dark-bg) .game-container {
    background-color: white;
    color: #333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body:not(.dark-bg) h1 {
    color: #2c3e50;
}

body:not(.dark-bg) .score-box {
    background-color: #f1f1f1;
}

body:not(.dark-bg) .score-box span:first-child {
    color: #7f8c8d;
}

body:not(.dark-bg) .score-box span:last-child {
    color: #2c3e50;
}

body:not(.dark-bg) .task-block {
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
}

body:not(.dark-bg) .task-type span {
    color: #2c3e50;
}

body:not(.dark-bg) .question .math-label {
    color: #333;
}

body:not(.dark-bg) math-field {
    background-color: white;
    border: 1px solid #ddd;
    color: #333;
}

/* Стили для темной темы */
body.dark-bg .game-container {
    background-color: #2c3034;
    color: #f8f9fa;
}

body.dark-bg h1 {
    color: #fff;
}

body.dark-bg .score-box {
    background-color: #343a40;
}

body.dark-bg .score-box span:first-child {
    color: #adb5bd;
}

body.dark-bg .score-box span:last-child {
    color: #f8f9fa;
}

body.dark-bg .task-block {
    background-color: #343a40;
    border: 1px solid #495057;
}

body.dark-bg .task-type span {
    color: #f8f9fa;
}

body.dark-bg .question .math-label {
    color: #f8f9fa;
}

body.dark-bg math-field {
    background-color: #495057;
    border: 1px solid #6c757d;
    color: #f8f9fa;
}

/* Общие стили */
h1 {
    text-align: center;
    margin-bottom: 30px;
}

.timer-settings {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 16px;
}

.timer-settings input[type="number"] {
    width: 60px;
    padding: 5px;
    border-radius: 5px;
}

#timer-settings-box {
    display: flex;
    align-items: center;
    gap: 5px;
}

.score {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.score-box {
    padding: 10px 20px;
    border-radius: 5px;
    text-align: center;
    min-width: 100px;
}

.score-box span:first-child {
    display: block;
    font-size: 14px;
}

.score-box span:last-child {
    font-size: 24px;
    font-weight: bold;
}

.game-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#chart-container {
    width: 100%;
    max-width: 800px;
    border-radius: 5px;
}

.quiz-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.task-block {
    margin-bottom: 30px;
    padding: 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.task-block.completed {
    background-color: #e8f5e9;
    border-left: 4px solid #2ecc71;
}

body.dark-bg .task-block.completed {
    background-color: #28a74520;
    border-left-color: #28a745;
}

.task-type {
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
}

.question {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.math-label {
    display: inline-block;
    min-width: 150px;
    text-align: right;
    margin-right: 10px;
}

math-field {
    border-radius: 5px;
    padding: 10px;
    font-size: 16px;
    flex-grow: 1;
}

math-field:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

math-field[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

body.dark-bg math-field[readonly] {
    background-color: #343a40;
}

.hidden {
    display: none;
}

.task-block button {
    margin-top: 20px;
}

.js-plotly-plot .plotly .modebar {
    display: none !important;
}

.center_me_please {
    display: flex;
    justify-content: center; 
}