* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background: linear-gradient(to right, #00416A, #E4E5E6);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.calculator {
    background-color: #2d3436;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 95%;
}

.display {
    background-color: #1e272e;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: right;
    word-wrap: break-word;
    word-break: break-all;
}

.previous-operand {
    min-height: 25px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.2rem;
}

.current-operand {
    color: white;
    font-size: 2.5rem;
    margin-top: 5px;
}

.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

button {
    padding: 20px;
    font-size: 1.5rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    background-color: #34495e;
    color: white;
    transition: 0.3s;
}

button:hover {
    background-color: #2c3e50;
    transform: scale(0.98);
}

button:active {
    transform: scale(0.95);
}

.span-two {
    grid-column: span 2;
}

.operator {
    background-color: #e67e22;
}

.operator:hover {
    background-color: #d35400;
}

.equals {
    background-color: #2ecc71;
}

.equals:hover {
    background-color: #27ae60;
}

.clear, .delete {
    background-color: #e74c3c;
}

.clear:hover, .delete:hover {
    background-color: #c0392b;
}

/* Media query for smaller screens */
@media (max-width: 400px) {
    .calculator {
        width: 100%;
        border-radius: 0;
    }

    button {
        padding: 15px;
        font-size: 1.2rem;
    }

    .current-operand {
        font-size: 2rem;
    }
}