body {
  font-family: Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: rgba(82, 26, 26, 0.918);
  margin: 0;
}
.calculator {
  width: 400px;
  background-color: #fff;
  border-radius: 15px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  padding: 20px;
}
.display {
  width: 100%;
  height: 50px;
  text-align: right;
  font-size: 1.5rem;
  padding: 10px;
  margin-bottom: 20px;
  border: none;
  background-color: #cc7f0c;
  border-radius: 8px;
  color: #333;
}
.buttons {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.button {
  background-color: #03a9f4;
  border: none;
  font-size: 1.2rem;
  padding: 15px 8px;
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.3s, transform 0.2s;
  color: white;
  font-weight: bold;
}
.button:hover {
  background-color: #0288d1;
  transform: scale(1.05);
}
.button:active {
  transform: scale(0.95);
}
.button.clear {
  background-color: #ff5722;
}
.button.clear:hover {
  background-color: #e64a19;
}
.button.equal {
  background-color: #8bc34a;
}
.button.equal:hover {
  background-color: #689f38;
}
.button.operator {
  background-color: #ff9800;
}
.button.operator:hover {
  background-color: #f57c00;
}
.button.advanced {
  background-color: #9c27b0;
  font-size: 1rem;
}
.button.advanced:hover {
  background-color: #7b1fa2;
}
.button.history {
  background-color: #607d8b;
  font-size: 0.9rem;
}
.button.history:hover {
  background-color: #455a64;
}
.history-panel {
  margin-top: 15px;
  padding: 10px;
  background-color: #f5f5f5;
  border-radius: 8px;
  max-height: 150px;
  overflow-y: auto;
}
.history-item {
  padding: 5px;
  margin: 2px 0;
  background-color: #e0e0e0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}
.history-item:hover {
  background-color: #d0d0d0;
}
.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-weight: bold;
  color: #333;
}
.clear-history {
  background-color: #f44336;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
}
.clear-history:hover {
  background-color: #d32f2f;
}
