* {
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

body {
  background: #1a1a1a;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
}

.calculator {
  background: #262626;
  border-radius: 20px;
  padding: 20px;
  width: 300px;
  box-shadow: 0 0 15px rgba(0,0,0,0.6);
}

.theme-toggle {
  display: flex;
  justify-content: flex-end;
}

#themeBtn {
  background: #00c6ff;
  color: #fff;
  border: none;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 1.2rem;
  cursor: pointer;
}

.display {
  background: #111;
  color: #0ff;
  font-size: 2rem;
  text-align: right;
  padding: 20px;
  margin: 15px 0;
  border-radius: 10px;
  overflow-x: auto;
}

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

.btn {
  padding: 20px;
  font-size: 1.2rem;
  border: none;
  border-radius: 12px;
  background: #333;
  color: #fff;
  cursor: pointer;
  transition: 0.2s;
}

.btn:hover {
  background: #555;
}

.operator {
  background: #ff9500;
}

.operator:hover {
  background: #e08000;
}

.equal {
  background: #00cc66;
  grid-column: span 1;
}

.equal:hover {
  background: #00b35a;
}

.zero {
  grid-column: span 2;
}

body.light {
  background: #f2f2f2;
}

body.light .calculator {
  background: #fff;
  box-shadow: 0 0 15px rgba(0,0,0,0.3);
}

body.light .display {
  background: #eee;
  color: #000;
}

body.light .btn {
  background: #ddd;
  color: #000;
}

body.light .btn:hover {
  background: #ccc;
}

body.light .operator {
  background: #ffa500;
  color: #fff;
}

body.light .operator:hover {
  background: #e69500;
}

body.light .equal {
  background: #00cc66;
  color: #fff;
}

body.light .equal:hover {
  background: #00b35a;
}

body.light #themeBtn {
  background: #333;
  color: #fff;
}
