* {
    box-sizing: border-box;
}

body {
    margin: 0;
    height: 100vh;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Segoe UI", sans-serif;
}

.calculator {
    background: #ffffff;
    padding: 25px;
    width: 300px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
    animation: fadeIn 0.6s ease;
}

#display {
    width: 100%;
    height: 55px;
    font-size: 24px;
    padding: 10px;
    text-align: right;
    border: none;
    background: #f1f3f6;
    border-radius: 10px;
    margin-bottom: 20px;
}

.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

button {
    padding: 16px;
    font-size: 18px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    background: #e0e7ff;
    transition: transform 0.15s ease, background 0.15s ease;
}

button:hover {
    background: #c7d2fe;
    transform: scale(1.05);
}

.equal {
    background: #667eea;
    color: white;
    font-weight: bold;
}

.equal:hover {
    background: #5a67d8;
}

.zero {
    grid-column: span 2;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
