*{
  box-sizing:border-box;
  margin:0;
  padding:0;
}

body{
  font-family:sans-serif;
  display:flex;
  justify-content:center;
  align-items:center;
  height:100vh;
  overflow:hidden;

  background:url("./download (2).jpg") no-repeat center center/cover;

  --calc-bg: rgba(255,255,255,0.85);
  --text:#111;
  --btn-bg: rgba(0,0,0,0.08);
  --btn-hover:#4a90e2;
  --display-bg: rgba(0,0,0,0.05);
}

/* DARK MODE */
body.dark{
  background:url("./download (1).jpg") no-repeat center center/cover;

  --calc-bg: rgba(20,20,20,0.8);
  --text:#00ffcc;
  --btn-bg: rgba(255,255,255,0.08);
  --btn-hover:#00ffcc;
  --display-bg: rgba(0,0,0,0.6);
}

.overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.4);
  z-index:-1;
}

.calculator{
  width:340px;
  padding:20px;
  border-radius:20px;
  backdrop-filter:blur(15px);
  background:var(--calc-bg);
  box-shadow:0 10px 40px rgba(0,0,0,0.4);
}

#display{
  width:100%;
  height:55px;
  font-size:20px;
  margin-bottom:12px;
  text-align:right;
  padding:10px;

  border:none;
  border-radius:10px;
  background:var(--display-bg);
  color:var(--text);
}

.buttons{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:10px;
}

button{
  padding:14px;
  border:none;
  border-radius:10px;
  cursor:pointer;

  background:var(--btn-bg);
  color:var(--text);
  transition:0.2s;
}

button:hover{
  background:var(--btn-hover);
  color:black;
  transform:scale(1.05);
}

.top-bar{
  display:flex;
  justify-content:space-between;
  margin-bottom:10px;
}

.history{
  margin-top:10px;
  font-size:12px;
  max-height:80px;
  overflow:auto;
  color:var(--text);
  opacity:0.8;
}