/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: #f0f2f5; /* Light grayish blue */
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align to top for scrollability */
    min-height: 100vh;
    padding: 20px;
}

.app-container {
    background-color: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    width: 100%;
    max-width: 480px;
    text-align: center;
}

header h1 {
    color: #1d3557; /* Dark blue */
    margin-bottom: 25px;
    font-size: 2em;
}

main {
    margin-bottom: 25px;
}

#start-screen p {
    margin-bottom: 18px;
    font-size: 1.1em;
    color: #4a4a4a; /* Slightly darker text for readability */
    line-height: 1.5;
}

#question-screen h2 {
    margin-bottom: 20px;
    font-size: 1.9em; /* Larger question font */
    color: #1d3557;
    min-height: 2.5em; /* Reserve space to prevent jump when text changes */
    display: flex;
    align-items: center;
    justify-content: center;
}

#progress-text {
    font-size: 0.95em;
    color: #6c757d; /* Gray */
    margin-bottom: 12px;
}

#answer-input {
    width: calc(100% - 24px);
    padding: 12px;
    margin-bottom: 18px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 1.2em;
    text-align: center;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.btn {
    background-color: #d90429; /* A strong red */
    color: white;
    border: none;
    padding: 14px 22px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 1.05em;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease;
    width: 100%;
    max-width: 220px;
    margin-top: 12px;
}

.btn:hover {
    background-color: #b2001f; /* Darker red */
}
.btn:active {
    transform: translateY(1px);
}

#feedback-text {
    margin-top: 15px;
    font-weight: bold;
    min-height: 1.4em;
    font-size: 1.1em;
}

.feedback-correct {
    color: #2a9d8f; /* Teal */
}

.feedback-incorrect {
    color: #c00000; /* Darker error red */
}

#results-screen h2 {
    margin-bottom: 18px;
    color: #1d3557;
    font-size: 1.7em;
}

#results-screen p {
    font-size: 1.15em;
    margin-bottom: 12px;
    color: #343a40;
}

#results-screen span {
    font-weight: bold;
    color: #1d3557;
}

footer {
    font-size: 0.85em;
    color: #6c757d;
    margin-top: 25px;
    border-top: 1px solid #dee2e6;
    padding-top: 15px;
}

.hidden {
    display: none;
}