*{
margin:0;
padding:0;
box-sizing:border-box;
font-family:Arial;
}

body{
background:#0f172a;
display:flex;
justify-content:center;
align-items:center;
height:100vh;
}

/* Calculator box */

.calculator{
background:#1e293b;
padding:25px;
border-radius:15px;
width:320px;
box-shadow:0 10px 25px rgba(0,0,0,0.5);
}

/* Heading */

.calculator h2{
text-align:center;
color:white;
margin-bottom:15px;
}

/* Display */

#display{
width:100%;
height:60px;
font-size:28px;
text-align:right;
padding:10px;
border:none;
border-radius:8px;
margin-bottom:15px;
background:#020617;
color:white;
}

/* Buttons grid */

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

/* Button style */

button{
padding:18px;
font-size:18px;
border:none;
border-radius:8px;
background:#334155;
color:white;
cursor:pointer;
transition:0.2s;
}

button:hover{
background:#475569;
}

/* Operators */

.operator{
background:#2563eb;
}

.operator:hover{
background:#1d4ed8;
}

/* Equal */

.equal{
grid-column:span 2;
background:#22c55e;
}

.equal:hover{
background:#16a34a;
}

/* Clear */

.clear{
grid-column:span 2;
background:#ef4444;
}

.clear:hover{
background:#dc2626;
}

/* Tablet */

@media(max-width:768px){

.calculator{
width:280px;
padding:20px;
}

#display{
height:55px;
font-size:24px;
}

button{
padding:16px;
font-size:17px;
}

}

/* Mobile */

@media(max-width:480px){

.calculator{
width:90%;
padding:18px;
}

#display{
height:50px;
font-size:22px;
}

button{
padding:14px;
font-size:16px;
}

}