/* === 共通フォントと背景 === */
body {
  font-family: 'Helvetica Neue', sans-serif;
  background-color: #f8f9fc;
  margin: 0;
  padding: 0;
  color: #333;
}

.level {
  font-size: 1.2em;
}

.completion-status {
  font-size: 0.95em;
  margin-top: 0.5em;
}

.silver {
  color: #999;
}

.gold {
  color: #d4af37;
}

/* === ヘッダーのスタイル === */
header {
  padding: 1em;
  text-align: center;
}

/* アコーディオン全体 */
.accordion {
  margin: 20px;
}

/* アコーディオンボタンの共通部分 */
.accordion-button {
  color: white;
  cursor: pointer;
  padding: 1em;
  width: 100%;
  text-align: left;
  border: none;
  outline: none;
  transition: background 0.3s ease;
  font-size: 1.1em;
  border-radius: 4px;
  margin-bottom: 5px;
}

/* ✅ 完了授業に色を付ける */
.accordion-item.completed .accordion-button {
  background-color: #5cb85c;
  color: white;
}

/* アコーディオン中身 */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  padding: 0 1em;
  border: 1px solid transparent;
  background: #f9f9f9;
  margin-top: 5px;
  transition: max-height 0.35s ease, padding 0.35s ease, border-color 0.35s ease;
  border-radius: 0 0 4px 4px;
}

.accordion-content.active {
  border-color: #ccc;
  padding: 1em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* 埋め込み動画 */
.accordion-content iframe {
  margin: 10px 0;
  max-width: 100%;
  height: auto;
}

/* テスト未実装用の仮ブロック */
.quiz-placeholder {
  margin-top: 10px;
  padding: 1em;
  background: #fff9e5;
  border-left: 5px solid #ffc107;
}

/* 過去問解説など、問題ごとの解説動画リンクを並べるボックス */
.lesson-box {
  display: inline-block;
  min-width: 110px;
  margin: 0 8px 8px 0;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  text-align: center;
}

.lesson-box h4 {
  margin: 0 0 6px;
  font-size: 0.9em;
  color: #333;
  white-space: nowrap;
}

.lesson-box a {
  font-size: 0.85em;
  font-weight: bold;
  color: #3e7cd8;
  text-decoration: none;
}

.lesson-box a:hover {
  text-decoration: underline;
}

/* 問題ブロック */
.question {
  margin-bottom: 30px;
}

/* 選択肢画像 */
.option-image {
  width: 150px;
  height: auto;
  margin: 5px;
  display: inline-block;
}

/* 共通ボタンスタイル（登録・クイズなど） */
.quiz-button {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 0.6em 1.2em;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1em;
  transition: background-color 0.3s ease;
  margin-top: 10px;
}

.quiz-button:hover {
  background-color: #1e7e34;
}

/* ✅ チェックボックスの拡大表示 */
.lesson-check {
  transform: scale(1.2);
  margin-right: 6px;
}

/* 進捗表示エリア */
#progress-container {
  margin: 1.5em auto;
  max-width: 600px;
  padding: 1em;
  background: #f8f9fa;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
  font-family: "Helvetica Neue", sans-serif;
}

#progress-display {
  font-weight: bold;
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 0.4rem;
}

.progress-bar-wrapper {
  position: relative;
  width: 100%;
  height: 24px;
  background-color: #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
  margin-top: 0.5em;
}

#progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 12px 0 0 12px;
  transition: width 0.6s ease-in-out, background 0.4s ease-in-out;
}

#progress-bar.full {
  /* 色はテーマ側で指定 */
}

/* 修了テストステータス */
.exam-status.passed {
  color: green;
  font-weight: bold;
  margin-top: 1em;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
  header {
    padding: 0.8em;
  }

  .level {
    font-size: 1em;
  }

  .completion-status {
    font-size: 0.85em;
  }

  .accordion {
    margin: 10px;
  }

  .accordion-button {
    font-size: 1em;
    padding: 0.8em;
  }

  .accordion-content {
    padding: 0.8em;
  }

  iframe {
    width: 100% !important;
    height: auto !important;
  }
}

@media screen and (max-width: 480px) {
  .accordion-button {
    font-size: 0.9em;
    padding: 0.6em;
  }

  .level,
  .completion-status {
    font-size: 0.8em;
  }
}

/* 受講登録ボタンと修了テストボタンの横並び */
#button-container {
  margin-top: 1.5em;
  display: flex;
  justify-content: center;
  gap: 1em; /* ボタンの間隔 */
}

#button-container .quiz-button {
  margin-top: 0; /* 既存の余白を打ち消す */
}
