/* Basic reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body styling */
body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(to right, #0072ff, #00c6ff); /* Gradient background */
    font-family: 'Roboto', sans-serif;
}

/* Calculator container */
.calculator {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    width: 350px;
}

/* Calculator display */
input {
    width: 100%;
    font-size: 2.2rem;
    padding: 15px;
    border: none;
    background-color: #f7f7f7;
    text-align: right;
    margin-bottom: 20px;
    border-radius: 10px;
    color: #333;
    font-weight: bold;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Buttons container */
.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

/* Button styling */
button {
    font-size: 1.6rem;
    padding: 15px;
    background-color: #eef1f7;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.3s;
    color: #444;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

button:active {
    transform: scale(0.95); /* Scale button on click */
}

/* Operators */
button:nth-child(-n+4) {
    background-color: #ffd166; /* Yellow for operators */
    color: #333;
    font-weight: bold;
}

button:nth-child(-n+4):hover {
    background-color: #ffaa00; /* Darker yellow on hover */
}

/* Clear button */
.clear {
    background-color: #f55c47; /* Bright red for clear */
    color: white;
    font-weight: bold;
}

.clear:hover {
    background-color: #d43d2f; /* Darker red on hover */
}

/* Equal button */
.equal {
    background-color: #06d6a0; /* Green for equal button */
    color: white;
    font-weight: bold;
    grid-column: span 2; /* Make "=" button span two columns */
}

.equal:hover {
    background-color: #04a67e; /* Darker green on hover */
}

/* Number buttons */
button:not(.clear):not(.equal):not(:nth-child(-n+4)) {
    background-color: #bbdefb; /* Light blue for numbers */
    color: #000;
}

button:not(.clear):not(.equal):not(:nth-child(-n+4)):hover {
    background-color: #90caf9; /* Darker blue on hover */
}
