body {
  font-family: Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 30px;
  margin-top: 50px;
  background: #f4f4f9;
}

.calculator {
  width: 260px;
  background: #222;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(7, 233, 97, 0.3);
  overflow: hidden;
}

.display input {
  width: 100%;
  font-size: 2rem;
  padding: 15px;
  text-align: right;
  border: none;
  background: #333;
  color: #fff;
  box-sizing: border-box;
  border-radius: 10px;
}


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

.btn {
  padding: 20px;
  font-size: 1.2rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

.num { background: #444; color: white; }
.op { background: #f0ad4e; color: white; }
.eq { background: #5cb85c; color: white; }
.zero { grid-column: span 3; }

.history {
  background: #fff;
  padding: 15px;
  border-radius: 10px;
  width: 200px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

#history-list {
  list-style: none;
  padding: 0;
  margin: 10px 0;
  max-height: 250px;
  overflow-y: auto;
}

#history-list li {
  padding: 5px;
  cursor: pointer;
  border-bottom: 1px solid #ddd;
}

#history-list li:hover {
  background: #eee;
}

#calc-expression {
  width: 100%;
  min-height: 20px;
  padding: 5px 10px;
  font-size: 1rem;
  color: #bbb;
  text-align: right;
  overflow-x: auto;
  white-space: nowrap;
  box-sizing: border-box;
}

