*{
margin:0;
padding:0;
box-sizing:border-box;
font-family:Segoe UI,sans-serif;
}

body{
height:100vh;
display:flex;
justify-content:center;
align-items:center;
background:linear-gradient(
135deg,
#ffd6e8,
#e0c3fc,
#c3f0ff
);
overflow:hidden;
transition:.3s;
}

.background::before,
.background::after{
content:"";
position:absolute;
border-radius:50%;
filter:blur(80px);
}

.background::before{
width:300px;
height:300px;
background:#ffb7d5;
top:-50px;
left:-50px;
}

.background::after{
width:300px;
height:300px;
background:#c6f7ff;
bottom:-50px;
right:-50px;
}

.calculator{
width:370px;
backdrop-filter:blur(18px);
background:rgba(255,255,255,.25);
border:1px solid rgba(255,255,255,.3);
border-radius:30px;
padding:25px;
box-shadow:
0 8px 32px rgba(0,0,0,.15);
}

.top-bar{
display:flex;
justify-content:space-between;
align-items:center;
margin-bottom:15px;
}

h1{
font-size:1.2rem;
}

#themeBtn{
border:none;
background:white;
padding:8px 12px;
border-radius:50%;
cursor:pointer;
}

.history{
height:40px;
overflow:hidden;
color:#555;
font-size:.9rem;
text-align:right;
}

#display{
width:100%;
height:70px;
border:none;
outline:none;
border-radius:15px;
padding:15px;
font-size:2rem;
text-align:right;
background:rgba(255,255,255,.6);
margin-bottom:20px;
}

.buttons{
display:grid;
grid-template-columns:repeat(4,1fr);
gap:12px;
}

button{
height:65px;
border:none;
border-radius:18px;
font-size:1.2rem;
cursor:pointer;
transition:.2s;
background:rgba(255,255,255,.7);
}

button:hover{
transform:translateY(-3px);
}

.operator{
background:#ffc7df;
}

#equals{
background:#a5e7ff;
}

.dark{
background:#14141d;
}

.dark .calculator{
background:rgba(20,20,30,.5);
color:white;
}

.dark #display{
background:rgba(255,255,255,.1);
color:white;
}

.dark button{
background:rgba(255,255,255,.1);
color:white;
}