/* calc.css */

/* 共通ベーススタイル（index.cssベース） */
html {
  scroll-behavior: smooth;
}

body {
  font-family: "Arial", sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 20px;
  background-color: #f9f9f9;
  color: #333;
  box-sizing: border-box;
  text-align: center;
}

h1 {
  font-size: 2rem;
  border-bottom: 2px solid #3498db;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  color: #2c3e50;
}

a {
  color: #3498db;
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: #1e70bf;
  text-decoration: underline;
}

p {
  margin: 0.5rem 0;
}

/* 電卓本体 */
.calculator {
  max-width: 320px;
  margin: 2rem auto;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* 入力欄 */
#display {
  width: 100%;
  box-sizing: border-box;
  padding: 14px;
  font-size: 1.8rem;
  font-weight: bold;
  border: 2px solid #ccc;
  border-radius: 6px;
  margin-bottom: 15px;
  text-align: right;
  background-color: #ffffff;
  color: #2c3e50;
}

/* ボタン配置 */
.buttons, .extra-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

/* ボタンスタイル（locate.css準拠＋微調整） */
.button {
  padding: 12px 0;
  font-size: 1.2rem;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.button:hover {
  background-color: #0056b3;
}

/* レスポンシブ対応 */
@media (max-width: 600px) {
  body {
    padding: 10px;
  }

  h1 {
    font-size: 1.5rem;
  }

  .calculator {
    width: 100%;
    padding: 15px;
  }

  #display {
    font-size: 1.2rem;
  }

  .button {
    font-size: 1rem;
    padding: 10px 0;
  }
}