/* 容器 */
.calculator {
  width: 260px;
  margin: 40px auto;
  padding: 10px;
  border: 1px solid #ddd;
  background: #fff;
  box-shadow: 1px 1px 5px #ccc;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* 顯示欄 */
.display {
  width: 100%;
  height: 40px;
  font-size: 1.5em;
  text-align: right;
  padding: 0 10px;
  margin-bottom: 12px;
  border: 1px solid #ddd;
  border-radius: 2px;
  box-sizing: border-box;
}

/* 按鈕區 */
.buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 8px;
}

button {
  background: #eee;
  border: none;
  height: 40px;
  font-size: 1.2em;
  cursor: pointer;
  border-radius: 2px;
  box-shadow: inset 0 -2px #ccc;
  transition: background-color 0.15s ease;
}

button:hover {
  background: #ddd;
}

/* 運算符按鈕 */
button.operator {
  background: #bbb;
  font-weight: 600;
  box-shadow: inset 0 -2px #999;
}

button.operator:hover {
  background: #aaa;
}

/* 等號按鈕 */
button.equal {
  grid-row: span 4;
  background: #bbb;
  font-weight: 600;
  box-shadow: inset 0 -2px #999;
}

button.equal:hover {
  background: #aaa;
}

/* C 按鈕 */
button.clear {
  background: #ddd;
}
