body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f0f2f5;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.timer {
    text-align: center;
    font-size: 1.5em;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: bold;
}

h1 {
    color: #2c3e50;
    text-align: center;
}

.numbers-box {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
    justify-content: center;
}

.numbers-box span {
    background: #3498db;
    color: white;
    padding: 12px 20px;
    border-radius: 5px;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.numbers-box span:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

/* 已使用数字的样式 */
.numbers-box span.used {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    opacity: 0.7;
}

.numbers-box span.used:hover {
    background: #bdc3c7;
    transform: none;
}

.input-area {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-direction: column;
}

#expression {
    padding: 12px;
    border: 2px solid #3498db;
    border-radius: 5px;
    font-size: 16px;
}

.expression-display {
    min-height: 40px;
    padding: 12px;
    border: 2px solid #3498db;
    border-radius: 5px;
    font-size: 16px;
    margin-bottom: 10px;
    background-color: #f8f9fa;
}

.operators {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

/* 运算符按钮样式 */
.operators button {
    min-width: 50px;
    padding: 12px;
    background: #e67e22;
}

.operators button:hover {
    background: #d35400;
}

/* 清除按钮样式 */
.operators button:last-child {
    background: #e74c3c;
}

.operators button:last-child:hover {
    background: #c0392b;
}

/* 功能按钮样式（提交、提示、重新开始） */
.input-area > button:nth-child(3) {
    background: #2ecc71;
    font-weight: bold;
}

.input-area > button:nth-child(3):hover {
    background: #27ae60;
}

.input-area > button:nth-child(4) {
    background: #2ecc71;
    font-weight: bold;
}

.input-area > button:nth-child(4):hover {
    background: #27ae60;
}

.input-area > button:nth-child(5) {
    background: #3498db;
}

.input-area > button:nth-child(5):hover {
    background: #2980b9;
}

.input-area > button:last-child {
    background: #9b59b6;
}

.input-area > button:last-child:hover {
    background: #8e44ad;
}

button {
    padding: 12px 24px;
    border: none;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s, transform 0.2s;
}

button:hover {
    transform: translateY(-1px);
}

.result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    transition: background-color 0.3s;
}