body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  font-family: Arial;
}

body.light {
  background: #f1f5f9;
}

.calculator {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);

  padding: 20px;
  border-radius: 20px;

  width: 100%;
  max-width: 350px;
  margin: auto;

  color: white;

  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 0 30px rgba(0,0,0,0.3);
}

body.light .calculator {
  background: white;
  color: black;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#display {
  width: 100%;
  height: 60px;
  margin: 15px 0;
  font-size: 24px;
  text-align: right;
  border: none;
  border-radius: 10px;
  padding: 10px;

  background: rgba(0,0,0,0.3);
  color: white;

  box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

body.light #display {
  background: #e2e8f0;
  color: black;
}

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

button {
  padding: 15px;
  border: none;
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  color: white;
  cursor: pointer;

  transition: 0.2s;

  box-shadow: 0 0 5px rgba(0,255,255,0.2);
}

button:active {
  transform: scale(0.95);
}

button:hover {
  background: rgba(0,255,255,0.2);
  box-shadow: 0 0 15px cyan;
}

.equal {
  background: hwb(0 0% 100%);
  grid-row: span 2;
  box-shadow: 0 0 15px hsl(0, 0%, 0%);
}

.history {
  margin-top: 15px;
  max-height: 100px;
  overflow-y: auto;
}

.history li {
  font-size: 14px;
}
/* Light mode buttons fix */
body.light button {
  background: #e2e8f0;
  color: #111;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
body.light button:hover {
  background: #cbd5e1;
}

body.light .equal {
  background: hsl(0, 0%, 0%);
  color: white;
  box-shadow: 0 0 10px hsl(0, 0%, 0%);
}

body.light #display {
  background: #f1f5f9;
  color: black;
}

.visitor-box {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}
.visitor-box img {
  border-radius: 6px;
  opacity: 0.8;
}

.visitor-box img:hover {
  opacity: 1;
  transition: 0.3s;
}

footer {
  text-align: center;
  padding: 20px;
  margin-top: auto;
  font-size: 13px;
  color: hsl(0, 0%, 0%);
  border-top: 1px solid #eee;
  opacity: 0.8;
}
footer:hover {
  opacity: 1;
  transition: 0.3s;
}