body {
  margin: 0;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: background 0.5s, color 0.5s;
}

/* Fixed theme buttons at top */
#themeButtons {
  position: fixed;
  top: 10px;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 10px;
  z-index: 999;
}
#themeButtons button {
  padding: 8px 12px;
  border: none;
  border-radius: 5px;
  background: #888;
  color: #fff;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}
#themeButtons button:hover {
  background: #555;
}

/* Header with Exit button */
header {
  width: 100%;
  padding: 10px 20px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 60px;
  position: relative;
}
#exitBtn {
  position: absolute;
  left: 20px;
  background: #ff4d4d;
  border: none;
  padding: 8px 12px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  color: #fff;
}
#exitBtn:hover {
  background: #ff1a1a;
}
h1 {
  margin: 0;
  font-size: 1.8em;
  letter-spacing: 2px;
}

/* Centered calculator container */
.container {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  width: 100%;
}
#calculator {
  background: rgba(255,255,255,0.9);
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
#display {
  width: 100%;
  height: 50px;
  font-size: 1.4em;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  text-align: right;
  background: #fff;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 15px;
}
/* Buttons grid */
.buttons-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
}
button {
  padding: 15px;
  font-size: 1em;
  border: none;
  border-radius: 8px;
  background: #4CAF50;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s;
}
button:hover {
  background: #45a049;
}

/* Exit link styling */
.exit-container {
  position: fixed;
  bottom: 10px;
  right: 10px;
  z-index: 999;
}
.exit-link {
  background: #444;
  color: #fff;
  padding: 8px 12px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s;
}
.exit-link:hover {
  background: #222;
}