@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;500;700&display=swap');

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Poppins',sans-serif;
}

body{
    display:flex;
    justify-content:center;
    align-items:center;
    height:100vh;
    background:linear-gradient(135deg,#0f0c29,#302b63,#24243e);
}

.calculator{
    width:380px;
    padding:25px;
    border-radius:30px;
    background:rgba(255,255,255,0.08);

    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);

    box-shadow:
    0 0 30px rgba(155,89,255,.35),
    0 20px 40px rgba(0,0,0,.5);
}

#display{
    width:100%;
    height:85px;
    border:none;
    outline:none;
    border-radius:20px;
    background:#111827;
    color:#fff;
    font-size:34px;
    text-align:right;
    padding:20px;
    margin-bottom:20px;
    box-shadow:inset 0 0 10px rgba(255,255,255,.08);
}

#display::placeholder{
    color:#aaa;
}

.buttons{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:15px;
}

button{
    height:70px;
    border:none;
    border-radius:18px;
    background:#1f2937;
    color:white;
    font-size:24px;
    cursor:pointer;
    transition:.3s;
    box-shadow:0 5px 12px rgba(0,0,0,.4);
}

button:hover{
    transform:translateY(-5px) scale(1.05);
    background:#374151;
    box-shadow:0 0 15px #8b5cf6;
}

button:active{
    transform:scale(.95);
}

/* C Button */
button:first-child{
    background:#ef4444;
}

/* Delete */
button:nth-child(2){
    background:#8b5cf6;
}

/* Operators */
button:nth-child(4),
button:nth-child(8),
button:nth-child(12),
button:nth-child(16){
    background:#f59e0b;
}

/* = Button */
button:last-child{
    background:#10b981;
}

button:first-child:hover{
    box-shadow:0 0 20px #ef4444;
}

button:nth-child(2):hover{
    box-shadow:0 0 20px #8b5cf6;
}

button:nth-child(4):hover,
button:nth-child(8):hover,
button:nth-child(12):hover,
button:nth-child(16):hover{
    box-shadow:0 0 20px #f59e0b;
}

button:last-child:hover{
    box-shadow:0 0 20px #10b981;
}

@media(max-width:450px){

.calculator{
    width:95%;
}

button{
    height:65px;
    font-size:22px;
}

#display{
    font-size:30px;
}

}