/* style.css */
:root {
  --primary: #007bff; /* メインカラー */
  --accent: #28a745; /* 正解・次へボタン */
  --bg: #f4f7f6; /* 背景色 */
  --card: #ffffff; /* カード背景 */
  --text: #333333; /* 文字色 */
}

html {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Yu Gothic",
    sans-serif;
  background-color: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 20px;
  line-height: 1.6;
  height: 100%;
}

/* スマホで見やすい幅に制限するコンテナ */
.container {
  max-width: 600px;
  margin: 0 auto;
  background: var(--card);
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  height: 100%;
}

h1,
h2 {
  text-align: center;
  color: var(--primary);
  margin-top: 0;
}

/* リンクやボタンのデザイン */
a {
  text-decoration: none;
  color: inherit;
}

.btn,
button,
input[type="submit"] {
  display: block;
  width: 100%;
  padding: 14px;
  margin: 10px 0;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  color: white;
  background-color: var(--primary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-sizing: border-box;
  transition: opacity 0.2s;
  position: absolute;
  bottom: 40px;
  left: 0;
}

.btn:active,
button:active {
  opacity: 0.8;
  transform: scale(0.98);
}

/* 色違いボタン */
.btn-next {
  background-color: var(--accent);
}
.btn-back {
  background-color: #6c757d;
}

/* 入力フォーム */
input[type="text"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 16px; /* スマホでズーム防止 */
  box-sizing: border-box;
}

/* リスト（カテゴリー一覧など） */
ul.category-list {
  list-style: none;
  padding: 0;
}
ul.category-list li a {
  display: block;
  padding: 15px;
  background: #eef2f5;
  margin-bottom: 10px;
  border-radius: 8px;
  color: #333;
  font-weight: bold;
  text-align: center;
  border: 1px solid #dee2e6;
}
ul.category-list li a:hover {
  background: #e2e6ea;
}

/* 解答エリア */
#answer {
  background-color: #d4edda;
  color: #155724;
  padding: 15px;
  border-radius: 8px;
  margin-top: 20px;
  border: 1px solid #c3e6cb;
}
