/* common.css */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: #f7f9f0; /* 柔和的奶油黄背景 */
    padding: 20px;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#header {
    padding: 15px;
    background: #ffffff;
    border: 2px solid #f5e7af; /* 阳光黄边框 */
    display: flex;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

#timer {
    font-size: 24px;
    color: #ff4444;
}

#score {
    font-size: 24px;
    color: #00c851;
}

#problems-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: none; /* 初始隐藏题目 */
}

.problem {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    margin: 15px auto;
    background: #fff;
    border: 2px solid #f5e7af; /* 阳光黄边框 */
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 32px;
    width: 90%;
    min-height: 100px;
    transition: transform 0.3s ease;
}

input {
    width: 150px;
    padding: 15px;
    font-size: 32px;
    border: 2px solid #ccc;
    border-radius: 12px;
    text-align: center;
    caret-color: #2196F3;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: none; 
}

input:focus {
    border-color: #2196F3;
    outline: none;
    box-shadow: 0 0 5px rgba(33, 150, 243, 0.3);
}

.correct {
    background-color: #e8f5e9 !important;
    border-color: #00c851 !important;
}

@media (max-width: 768px) {
    .problem {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
        width: 95%;
    }

    input {
        width: 100%;
        max-width: 200px;
        font-size: 28px;
        padding: 12px;
    }
}

/* 自定义模态框样式 */
#result-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 200;
}

#result-modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

#result-modal-content p {
    font-size: 24px;
    margin-bottom: 20px;
}

#result-modal-content button {
    padding: 10px 20px;
    font-size: 18px;
    border: none;
    border-radius: 6px;
    background-color: #2196F3;
    color: white;
    cursor: pointer;
}

/* 开始按钮样式 */
#start-button {
    padding: 10px 20px;
    font-size: 18px;
    border: none;
    border-radius: 6px;
    background-color: #2196F3;
    color: white;
    cursor: pointer;
    margin: 20px auto;
    display: block;
}
