body {
    font-family: Arial, sans-serif;
    background-color: #f0f8ff;
    text-align: center;
}

h1 {
    color: #4a90e2;
    font-size: 48px; /* 放大字體 */
}

p {
    font-size: 32px; /* 放大字體 */
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 20px auto;
    max-width: 300px;
    border: 4px dashed blue;
}

.grid-container {
    display: flex;
    justify-content: center;
    align-items: center; /* 垂直居中 */
    margin: 20px 0;
}

.total-number {
    font-size: 48px; /* 放大字體 */
    margin: 0 20px; /* 左右間距 */
    color: #4a90e2; /* 顏色 */
}

.grid button {
    padding: 30px; /* 放大按鈕 */
    font-size: 28px; /* 放大字體 */
    background-color: #e7e7e7;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.grid button.selected {
    background-color: #4caf50;
    color: white;
}

#confirmNumberBtn, #confirmBtn, #restartBtn, #instructionsBtn, #backToStartBtn {
    padding: 15px 30px; /* 放大按鈕 */
    font-size: 28px; /* 放大字體 */
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
}

#message {
    margin-top: 20px;
    font-weight: bold;
    font-size: 36px; /* 放大字體 */
    color: #d32f2f;
    display: none; /* 初始隱藏 */
}

.correct {
    color: green;
    animation: fadeIn 1s;
}

.error {
    color: red;
    animation: shake 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes shake {
    0% { transform: translate(0); }
    25% { transform: translate(-5px); }
    50% { transform: translate(5px); }
    75% { transform: translate(-5px); }
    100% { transform: translate(0); }
}

#endMessage {
    font-size: 36px; /* 放大字體 */
}
