/* ======== ベーススタイル ======== */
body {
  font-family: 'Segoe UI', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
  background: linear-gradient(135deg, #a8edea, #fed6e3);
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

h1, h2, h3 {
  text-align: center;
  color: #333;
}

#quiz-container {
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  width: 90%;
  max-width: 600px;
  padding: 30px 40px;
  text-align: center;
    transition: all 0.3s ease;
  min-height: 480px;
}

#quiz-container:hover {
  transform: translateY(-3px);
}

#quiz-number {
  font-size: 18px;
  color: #777;
  margin-bottom: 10px;
}

#quiz-question {
  font-size: 22px;
  font-weight: bold;
  margin: 15px 0 25px 0;
  color: #444;
}

.choice-btn {
  display: block;
  width: 100%;
  background: #f0f0f0;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 18px;
  margin: 8px 0;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.choice-btn:hover {
  background: #e6f7ff;
  transform: scale(1.02);
}

.choice-btn.correct {
  background: #c8f7c5;
  color: #2e7d32;
  border: 2px solid #4caf50;
}

.choice-btn.wrong {
  background: #ffcdd2;
  color: #c62828;
  border: 2px solid #e53935;
}

#result-mark {
  font-size: 40px;
  margin-top: 10px;
}

#quiz-result {
  margin-top: 20px;
  font-size: 18px;
  line-height: 1.6;
}
/* ======== クイズフッター（ボタンエリア） ======== */
#quiz-footer {
  display: flex;
  justify-content: space-between; /* 左右にボタンを配置 */
  align-items: center;
  flex-wrap: wrap; /* 画面幅が狭いときに折り返し */
  gap: 10px;
  margin-top: 20px;
  padding: 10px 0;
  border-top: 1px solid #ddd;
}

/* 左側ボタンをまとめるグループ */
.footer-left {
  display: flex;
  gap: 10px;
}

/* 右側（次へボタン） */
.footer-right {
  display: flex;
  justify-content: flex-end;
}

/* ボタン全体の統一デザイン */
#quiz-footer button {
  background: #2196f3;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  white-space: nowrap;
}

#quiz-footer button:hover {
  background: #1976d2;
  transform: translateY(-2px);
}

/* 「次へ」ボタンだけ目立たせる（右端青強調） */
#btn-next {
  background: #4caf50;
}

#btn-next:hover {
  background: #388e3c;
}

/* スマホ向け：折り返したとき中央寄せ */
@media (max-width: 480px) {
  #quiz-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .footer-left, .footer-right {
    justify-content: center;
    width: 100%;
  }
  #quiz-footer button {
    width: 100%;
  }
}


/* ======== モーダル ======== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
}

.modal-content {
  background: #fff;
  margin: 10% auto;
  padding: 30px;
  border-radius: 12px;
  width: 80%;
  max-width: 600px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
  text-align: center;
  animation: fadeIn 0.4s ease;
}

.modal-content ul {
  text-align: left;
  padding-left: 20px;
}

.close {
  float: right;
  font-size: 24px;
  color: #888;
  cursor: pointer;
}

.close:hover {
  color: #000;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}



/* ===== タイマーバー ===== */
#timer {
  width: 100%;
  background: #eee;
  border-radius: 8px;
  height: 14px;
  margin-top: 15px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

#timer-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #4caf50, #81c784);
  transition: width 1s linear;
}

/* 大きな○×マーク */
#big-mark {
  position: absolute;
  top: 45%; /* 中央やや上 */
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 240px;
  font-weight: normal;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.3s ease;
}

#big-mark.show {
  opacity: 1;
}

#after-message {
  color: #333;
  background: #f8f8f8;
  border-radius: 8px;
  padding: 10px 20px;
  display: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ======== ファンタジック水泡アニメーション ======== */
#bubble-area {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%; /* quiz-containerの下半分に表示 */
  overflow: hidden;
  pointer-events: none;
  z-index: 10;
}

.bubble {
  position: absolute;
  bottom: -60px;
  border-radius: 50%;
  opacity: 0.8;
  animation: floatUp var(--duration) ease-in forwards;
  filter: blur(1px);
}

/* 浮上アニメーション */
@keyframes floatUp {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0.9;
  }
  70% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-450%) scale(0.6);
    opacity: 0;
  }
}

#quiz-container {
  position: relative; /* ←これを追加！ */
}


