/* 基础样式设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif;
}

body {
    background-color: #f0f4f8;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* 计算器容器 */
.calculator-container {
    width: 100%;
    max-width: 400px;
}

.calculator {
    background-color: #1e293b;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* 显示区域样式 */
.display {
    background-color: #0f172a;
    color: white;
    padding: 25px 20px;
    text-align: right;
    position: relative;
}

.history {
    color: #94a3b8;
    font-size: 1.2rem;
    height: 24px;
    margin-bottom: 10px;
    overflow: hidden;
}

.result {
    font-size: 2.5rem;
    font-weight: 300;
    min-height: 60px;
}

/* 按钮区域样式 */
.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 20px;
}

.btn {
    width: 100%;
    height: 70px;
    border: none;
    border-radius: 15px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: scale(1.05);
}

.btn:active {
    transform: scale(0.98);
}

/* 数字按钮样式 */
.number {
    background-color: #334155;
    color: white;
}

.number:hover {
    background-color: #475569;
}

.zero {
    grid-column: span 2;
}

/* 运算符按钮样式 */
.operator {
    background-color: #f97316;
    color: white;
    font-weight: 500;
}

.operator:hover {
    background-color: #ea580c;
}

/* 等号按钮特殊样式 */
.equals {
    background-color: #22c55e;
}

.equals:hover {
    background-color: #16a34a;
}

/* 响应式调整 */
@media (max-width: 360px) {
    .btn {
        height: 60px;
        font-size: 1rem;
    }
    
    .result {
        font-size: 2rem;
    }
}
    