/* 全体背景と中央配置 */
body {
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Arial Rounded MT Bold', sans-serif;
  background: linear-gradient(to bottom, #a0e9f5, #f0ffff);
  position: relative;
  box-sizing: border-box;
}

/* 波のゆらめき */
body::before {
  content: "";
  position: absolute;
  top: -100px;
  left: 0;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.15), transparent 70%);
  animation: wave 8s ease-in-out infinite alternate;
  transform: rotate(0deg);
  z-index: 0;
}

@keyframes wave {
  0% { transform: rotate(0deg) scale(1.05); }
  100% { transform: rotate(3deg) scale(1); }
}

/* 電卓本体 */
.calculator {
  background: #ffffffee;
  border-radius: 20px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
  padding: 32px;
  width: 90vw;
  max-width: 600px;
  z-index: 1;
  box-sizing: border-box;
}

h1 {
  color: #0077b6;
  margin-bottom: 18px;
  text-align: center;
}

/* 表示部 */
#display {
  width: 100%;
  padding: 20px;
  font-size: 40px;
  font-weight: bold;
  border-radius: 12px;
  border: none;
  text-align: right;
  margin-bottom: 24px;
  background: #e0f7fa;
  color: #006080;
  box-sizing: border-box;
}

/* ボタン配置 */
.buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

/* 通常ボタン */
.btn {
  padding: 24px;
  font-size: 24px;
  border: none;
  border-radius: 12px;
  background: #bde0fe;
  color: #03435f;
  transition: 0.2s;
  cursor: pointer;
}

.btn:hover {
  background: #90dbf4;
}

/* 演算子 */
.op {
  background: #00b4d8;
  color: white;
}

.op:hover {
  background: #0096c7;
}

/* クリアボタン */
.clear {
  grid-column: span 4;
  background: #ff6b6b;
  color: white;
  font-size: 22px;
  padding: 18px;
  font-weight: bold;
}

.clear:hover {
  background: #fa5252;
}
