/* 全局样式与字体 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #f0f8ff;
    color: #333;
}

.container {
    text-align: center;
    background-color: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 500px;
}

h1 {
    color: #007bff;
    font-size: 2.5em;
}

p {
    margin-bottom: 20px;
}

button {
    border: none;
    border-radius: 10px;
    padding: 15px 30px;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px 5px;
    font-family: inherit;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-level {
    background-color: #28a745;
    color: white;
    width: 90%;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.btn-level.btn-back {
    background-color: #6c757d;
    margin-top: 30px;
    display: block;
    width: 90%;
    text-decoration: none;
}

#check-btn {
    background-color: #007bff;
    color: white;
}

#next-btn {
    background-color: #ffc107;
    color: #333;
}

#back-btn {
    background-color: #6c757d;
    color: white;
    margin-top: 20px;
    font-size: 1em;
    padding: 10px 20px;
}

.hidden {
    display: none !important;
}

#question-area {
    font-size: 4em;
    font-weight: bold;
    margin: 30px 0;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.2em;
    flex-wrap: wrap;
}

.question-mark {
    color: #dc3545;
}

#answer-area {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

#answer-input {
    width: 60%;
    padding: 15px;
    font-size: 2em;
    text-align: center;
    border: 2px solid #ccc;
    border-radius: 10px;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance: textfield;
}

#feedback-area {
    font-size: 1.5em;
    margin-top: 20px;
    height: 40px;
    font-weight: bold;
}

.feedback-correct {
    color: #28a745;
    animation: bounce 0.5s ease;
}

.feedback-incorrect {
    color: #ff7f50;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* --- 提示功能样式 --- */
#hint-btn {
    font-size: 2em;
    padding: 10px;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    background-color: #ffc107;
    color: white;
    line-height: 1;
    flex-shrink: 0;
}

#hint-area {
    background-color: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    text-align: left;
    font-size: 1.1em;
    line-height: 1.6;
}
#hint-area p {
    margin: 0.5em 0;
}
#hint-area strong {
    color: #d9534f;
}
#hint-area .read-aloud-btn {
    background: none;
    border: none;
    font-size: 1.3em;
    cursor: pointer;
    margin-left: 5px;
    padding: 5px;
    vertical-align: middle;
}