/* Reset + Layout */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #1e1e2f;
    margin: 0;
}

/* Calculator Container */
.calculator {
    background-color: #2b2b3c;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    width: 320px;
    max-width: 90vw;
}

/* Display */
#display {
    width: 100%;
    height: 60px;
    font-size: 2rem;
    padding: 10px;
    margin-bottom: 20px;
    text-align: right;
    border: none;
    border-radius: 10px;
    background-color: #12121c;
    color: #ff9900;
}

/* Button Grid */
.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

/* Buttons */
button {
    font-size: 1.5rem;
    padding: 20px;
    border: none;
    border-radius: 12px;
    background-color: #3c3c50;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

/* Hover and Press Effects */
button:hover {
    background-color: #ff9900;
    color: #1e1e2f;
    transform: scale(1.05);
}

button:active {
    transform: scale(0.95);
    background-color: #ff7300;
}

/* Equals Button Animation */
button.equals-animate {
    animation: pulse 0.4s ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        background-color: #ffaa33;
    }
    50% {
        transform: scale(1.15);
        background-color: #ff9900;
    }
    100% {
        transform: scale(1);
        background-color: #ffaa33;
    }
}

/* Control Buttons: Clear and Delete */
.control {
    grid-column: span 2;
    background-color: #ff4d4d;
}

.control:hover {
    background-color: #ff3333;
    color: #fff;
}
