/* Basic styles for the page - default light mode */
body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #f0f0f0;
    color: #333;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    width: 80%;
    max-width: 400px;
    transition: background-color 0.3s;
}

.selection,
.question,
.options,
.result,
.progress-bar {
    margin-bottom: 20px;
}

.option,
.number-range,
.operation-button {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 15px;
    margin: 10px 5px;
    font-size: 18px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s;
}

.option:hover,
.number-range:hover,
.operation-button:hover {
    background: #0056b3;
}

.option:active,
.number-range:active,
.operation-button:active {
    background: #004494;
}

.result {
    font-size: 1.2em;
    font-weight: bold;
}

.correct {
    color: green;
}

.incorrect {
    color: red;
}

/* Modal styling */
.modal {
    display: none;
    position: fixed;
    z-index: 10; /* higher z-index for iOS */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    text-align: center;
    font-size: 1.3em;
}

/* Progress circles */
.progress-bar {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.progress-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: gray;
    display: inline-block;
    transition: background-color 0.3s;
}

.progress-circle.correct {
    background-color: green;
}

.progress-circle.incorrect {
    background-color: red;
}

.question {
    font-size: 1.5em; /* bigger font for the question */
}

/* Dark mode styles */
body.dark-mode {
    background-color: #333;
    color: #f0f0f0;
}

.container.dark-mode {
    background-color: #444;
}

.option.dark-mode,
.number-range.dark-mode,
.operation-button.dark-mode {
    background: #666;
}

.progress-circle.dark-mode {
    background-color: #777; /* circle color for dark mode */
}

.modal-content.dark-mode {
    background-color: #444;
    color: #f0f0f0;
}

/* Game over modal */
#gameOverModal {
    display: none;
    position: fixed;
    z-index: 11;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.gameOver-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    text-align: center;
    font-size: 1.3em;
}

.gameOver-content.dark-mode {
    background-color: #444;
    color: #f0f0f0;
}

#versionDisplay {
    position: fixed;
    bottom: 10px;
    right: 10px;
    font-size: 0.8em;
    color: #888;
}

body.dark-mode #versionDisplay {
    color: #aaa;
}
