body {
  background: #f3f3f3;
  color: #222;
  font-family: 'Orbitron', sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
}
.header {
  margin-bottom: 24px;
}
.header-title {
  font-size: 1.6em;
  font-weight: bold;
  letter-spacing: 1px;
}
.calculator {
  background: #fff;
  padding: 20px 16px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  max-width: 600px;
  width: 90vw;
  box-sizing: border-box;
  margin: 0 auto 30px;
}
#display {
  width: 100%;
  height: 60px;
  background: #eee;
  color: #222;
  font-size: 4vw;
  padding: 0 12px;
  border: none;
  border-radius: 8px;
  margin-bottom: 16px;
  text-align: right;
  box-sizing: border-box;
  min-height: 48px;
  min-font-size: 16px;
  max-font-size: 36px;
  user-select: none;
}
.buttons {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  width: 100%;
}
button {
  height: 60px;
  font-size: 3vw;
  min-height: 40px;
  min-font-size: 14px;
  max-font-size: 26px;
  border: none;
  border-radius: 6px;
  background: #ddd;
  color: #222;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
  user-select: none;
}
button:hover {
  background: #ccc;
}
.equal {
  grid-column: span 2;
  background: #ff4c4c;
  color: #fff;
}
.equal:hover {
  background: #ff6b6b;
}
@media (prefers-color-scheme: dark) {
  body {
    background: #121212;
    color: #ddd;
  }
  .calculator {
    background: #1e1e1e;
    box-shadow: 0 5px 15px rgba(0,0,0,0.8);
  }
  #display {
    background: #000;
    color: #0f0;
  }
  button {
    background: #333;
    color: #eee;
  }
  button:hover {
    background: #555;
  }
  .equal {
    background: #ff5252;
    color: #fff;
  }
  .equal:hover {
    background: #ff7979;
  }
}
@media (max-width: 480px) {
  .calculator {
    padding: 16px 4vw;
    max-width: 100%;
    width: 95vw;
  }
  #display {
    height: 48px;
    font-size: 5vw;
  }
  button {
    height: 48px;
    font-size: 4vw;
  }
  .header-title {
    font-size: 1.2em;
  }
}