/* ===== 全体基本スタイル ===== */
body {
  margin: 0;
  padding: 0;
  font-family: 'Yu Gothic', 'Hiragino Kaku Gothic ProN', sans-serif;
  background-color: #f4f1ec;
  color: #1e1e1e;
  line-height: 1.8;
}

main {
  padding: 2rem;
}

h1, h2 {
  color: #333;
  margin-top: 2rem;
}

ul {
  padding-left: 1.5rem;
}

a {
  text-decoration: none;
}

/* ===== ヘッダー ===== */
header {
  background-color: #000;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: #ffe082;
}

.nav-desktop ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-desktop ul li {
  margin: 0 1rem;
}

.nav-desktop ul li a {
  color: #f0f0f0;
  font-weight: bold;
}

.nav-desktop ul li a:hover {
  color: #ffe082;
}

.nav-toggle {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  color: #f0f0f0;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-desktop {
    display: none;
    flex-direction: column;
    background-color: #000;
    position: absolute;
    top: 60px;
    right: 0;
    width: 100%;
  }
  .nav-desktop.open { display: flex; }
  .nav-desktop ul { flex-direction: column; align-items: center; }
  .nav-desktop ul li { margin: 1rem 0; }
}

/* ===== フッター ===== */
footer {
  background-color: #000;
  color: #f0f0f0;
  text-align: center;
  padding: 1.5rem;
  margin-top: 3rem;
}

footer ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

footer ul li { margin: 0 1rem; }
footer ul li a { color: #f0f0f0; }
footer ul li a:hover { color: #ffe082; }
footer p { color: #888; font-size: 0.8rem; }

/* ===== クイズ問題 ===== */
.quiz-question {
  padding: 0.5rem 0;
  margin-bottom: 1rem;
}
.quiz-question p { margin: 0.3rem 0; }
.quiz-buttons { margin-top: 0.5rem; }

/* 角丸四角の〇×ボタン */
.btn-choice {
  width: 60px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  color: #fff;
  background-color: #ff8c42;
  margin: 0.5rem;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
}
.btn-choice:hover {
  background-color: #e57b2e;
  transform: translateY(-2px);
}
.btn-choice:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

/* 回答フィードバック */
.feedback {
  font-weight: bold;
  margin-top: 0.3rem;
}

#score {
  font-size: 1.1rem;
  font-weight: bold;
  margin-top: 1rem;
}

/* 同じ・違うボタン */
.quiz-controls { text-align: center; margin-top: 1rem; }
.btn-control {
  padding: 0.5rem 1rem;
  margin: 0.5rem;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  color: #fff;
}
#same-btn { background-color: #6c757d; }
#new-btn { background-color: #28a745; }
#same-btn:hover { background-color: #5a6268; }
#new-btn:hover { background-color: #218838; }

/* ===== 自分の回答に色を付ける ===== */
.btn-choice.btn-user-correct {
  background-color: #d4edda;
  color: #155724;
}
.btn-choice.btn-user-wrong {
  background-color: #f8d7da;
  color: #721c24;
}

/* ===== ナビゲーションリンク ===== */
.nav-links { text-align: center; margin: 3rem 0 2rem; }
.nav-buttons { display: inline-flex; gap: 2rem; flex-wrap: wrap; justify-content: center; }
.nav-btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background-color: #5ec8e5;
  color: white;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s;
}
.nav-btn:hover { background-color: #2ea9df; }