/* ==========================================================================
   グローバルスタイルと基本設定
   ========================================================================== */

/* フォントのインポート */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&family=Noto+Sans+JP:wght@400;700&display=swap');

/* CSS変数 (カスタムプロパティ) の定義 */
:root {
  --primary-color: #007bff;
  /* 主要なアクションボタンや強調色 */
  --primary-hover: #0056b3;
  /* 主要な要素のホバー時の色 */
  --success-color: #28a745;
  /* 成功を示す色 */
  --success-hover: #218838;
  /* 成功を示す要素のホバー時の色 */
  --danger-color: #dc3545;
  /* 危険やエラーを示す色 */
  --light-bg: #f8f9fa;
  /* 明るい背景色 */
  --dark-text: #343a40;
  /* 濃いテキスト色 */
  --light-text: #6c757d;
  /* 薄いテキスト色 */
  --border-color: #dee2e6;
  /* ボーダーの色 */
  --white: #fff;
  /* 白 */
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  /* 標準的なシャドウ */
}

/* body要素の基本スタイル */
body {
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  /* フォントファミリー */
  background-color: var(--light-bg);
  /* 背景色 */
  color: var(--dark-text);
  /* テキスト色 */
  line-height: 1.6;
  /* 行の高さ */
}

/* ==========================================================================
   共通レイアウトとアニメーション
   ========================================================================== */

/* 各画面のコンテナスタイル */
.screen {
  max-width: 90%;
  /* 最大幅 */
  margin: 2rem auto;
  /* 中央揃えと上下のマージン */
  padding: 2rem;
  /* 内側の余白 */
  background: var(--white);
  /* 背景色 */
  border-radius: 16px;
  /* 角の丸み */
  box-shadow: var(--shadow);
  /* シャドウ */
  animation: fadeIn 0.5s ease-in-out;
  /* フェードインアニメーション */
}

/* フェードインアニメーションのキーフレーム */
@keyframes fadeIn {
  from {
    opacity: 0;
    /* 開始時は透明 */
    transform: translateY(20px);
    /* 開始時は少し下にずらす */
  }

  to {
    opacity: 1;
    /* 終了時は不透明 */
    transform: translateY(0);
    /* 終了時は元の位置 */
  }
}

/* ==========================================================================
   オーディオ警告オーバーレイ (初期表示時)
   ========================================================================== */

/* オーバーレイの背景 */
#audio-warning-overlay {
  position: fixed;
  /* 画面に固定 */
  top: 0;
  left: 0;
  width: 100%;
  /* 全幅 */
  height: 100%;
  /* 全高 */
  background-color: rgba(0, 0, 0, 0.75);
  /* 半透明の黒い背景 */
  z-index: 9999;
  /* 全ての要素の一番上に表示 */
  display: flex;
  /* Flexboxで子要素を中央に配置 */
  justify-content: center;
  /* 水平方向中央 */
  align-items: center;
  /* 垂直方向中央 */
}

/* モーダルコンテンツのスタイル */
#audio-warning-overlay .modal-content {
  background: var(--white);
  /* 背景色 */
  padding: 7rem 4rem;
  /* 内側の余白 */
  border-radius: 16px;
  /* 角の丸み */
  text-align: center;
  /* テキスト中央揃え */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  /* シャドウ */
  max-width: 700px;
  /* 最大幅 */
}

/* 見出しのスタイル */
#audio-warning-overlay h2 {
  margin-bottom: 1rem;
  /* 下マージン */
  color: var(--dark-text);
  /* テキスト色 */
  font-size: 3.0em;
  /* フォントサイズ */
}

/* 段落のスタイル */
#audio-warning-overlay p {
  margin-bottom: 2rem;
  /* 下マージン */
  color: var(--light-text);
  /* テキスト色 */
  font-size: 1.5em;
  /* フォントサイズ */
}

/* ボタンのスタイル */
#audio-warning-overlay button {
  background-color: var(--primary-color);
  /* 背景色 */
  color: var(--white);
  /* テキスト色 */
  border: none;
  /* ボーダーなし */
  border-radius: 8px;
  /* 角の丸み */
  padding: 12px 40px;
  /* 内側の余白 */
  font-size: 3.0em;
  /* フォントサイズ */
  font-weight: 700;
  /* フォントの太さ */
  cursor: pointer;
  /* カーソルをポインターに */
  transition: background-color 0.2s;
  /* ホバー時のトランジション */
}

/* ボタンのホバー時のスタイル */
#audio-warning-overlay button:hover {
  background-color: var(--primary-hover);
  /* ホバー時の背景色 */
}

/* ==========================================================================
   グローバルヘッダーと音量コントロール
   ========================================================================== */

/* グローバルヘッダーのコンテナ */
#global-header {
  position: fixed;
  /* 画面に固定 */
  top: 15px;
  /* 上からの位置 */
  right: 25px;
  /* 右からの位置 */
  z-index: 10000;
  /* 警告オーバーレイよりも上に表示 */
  display: flex;
  /* Flexboxで子要素を配置 */
  gap: 20px;
  /* 子要素間のスペース */
  background: rgba(255, 255, 255, 0.8);
  /* 半透明の背景 */
  padding: 10px 15px;
  /* 内側の余白 */
  border-radius: 50px;
  /* 角の丸み (円形) */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  /* シャドウ */
  backdrop-filter: blur(5px);
  /* 背景のぼかし効果 */
}

/* 音量コントロールグループ */
.volume-group {
  display: flex;
  /* Flexboxで子要素を配置 */
  align-items: center;
  /* 垂直方向中央 */
  gap: 8px;
  /* 子要素間のスペース */
}

/* 音量アイコンのスタイル */
.volume-group>.fas {
  font-size: 1.2em;
  /* フォントサイズ */
  color: var(--light-text);
  /* テキスト色 */
}

/* アイコンボタンの共通スタイル */
.icon-button {
  background: none;
  /* 背景なし */
  border: none;
  /* ボーダーなし */
  cursor: pointer;
  /* カーソルをポインターに */
  font-size: 1.4em;
  /* フォントサイズ */
  color: var(--dark-text);
  /* テキスト色 */
  transition: color 0.2s;
  /* ホバー時のトランジション */
}

/* アイコンボタンのホバー時のスタイル */
.icon-button:hover {
  color: var(--primary-color);
  /* ホバー時のテキスト色 */
}

/* 音量スライダーのスタイル */
.volume-control {
  -webkit-appearance: none;
  /* デフォルトのスタイルを無効化 (WebKit) */
  appearance: none;
  /* デフォルトのスタイルを無効化 */
  width: 100px;
  /* 幅 */
  height: 5px;
  /* 高さ */
  background: var(--border-color);
  /* 背景色 */
  border-radius: 5px;
  /* 角の丸み */
  outline: none;
  /* アウトラインなし */
  transition: opacity 0.2s;
  /* トランジション */
}

/* 音量スライダーのつまみのスタイル (WebKit) */
.volume-control::-webkit-slider-thumb {
  -webkit-appearance: none;
  /* デフォルトのスタイルを無効化 */
  appearance: none;
  /* デフォルトのスタイルを無効化 */
  width: 15px;
  /* 幅 */
  height: 15px;
  /* 高さ */
  background: var(--primary-color);
  /* 背景色 */
  border-radius: 50%;
  /* 円形 */
  cursor: pointer;
  /* カーソルをポインターに */
}

/* ==========================================================================
   タイトル画面 (#screen-title)
   ========================================================================== */

/* タイトル画面のコンテナ */
#screen-title {
  display: flex;
  /* Flexboxで子要素を配置 */
  flex-direction: column;
  /* 縦方向に並べる */
  justify-content: center;
  /* 垂直方向中央 */
  align-items: center;
  /* 水平方向中央 */
  text-align: center;
  /* テキスト中央揃え */
  min-height: 100vh;
  /* 最小高さをビューポートの高さに */
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  /* グラデーション背景 */
  box-shadow: none;
  /* シャドウなし */
  padding: 0;
  /* 内側の余白なし */
}

/* ゲームタイトルのスタイル */
.game-title {
  font-size: 4.5em;
  /* フォントサイズ */
  font-weight: 700;
  /* フォントの太さ */
  margin-bottom: 1.5rem;
  /* 下マージン */
  color: var(--dark-text);
  /* テキスト色 */
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.1);
  /* テキストシャドウ */
}

/* メインボタンとサブボタンの共通スタイル */
.main-button,
.sub-button {
  border: none;
  /* ボーダーなし */
  border-radius: 12px;
  /* 角の丸み */
  padding: 18px 45px;
  /* 内側の余白 */
  font-size: 1.3em;
  /* フォントサイズ */
  font-weight: 700;
  /* フォントの太さ */
  cursor: pointer;
  /* カーソルをポインターに */
  transition: all 0.3s ease;
  /* 全てのプロパティにトランジション */
  margin: 10px;
  /* マージン */
  min-width: 320px;
  /* 最小幅 */
  text-align: center;
  /* テキスト中央揃え */
  display: inline-flex;
  /* インラインFlexbox */
  align-items: center;
  /* 垂直方向中央 */
  justify-content: center;
  /* 水平方向中央 */
  gap: 10px;
  /* 子要素間のスペース */
}

/* メインボタンのスタイル */
.main-button {
  background-color: var(--primary-color);
  /* 背景色 */
  color: var(--white);
  /* テキスト色 */
  box-shadow: var(--shadow);
  /* シャドウ */
}

/* メインボタンのホバー時のスタイル */
.main-button:hover {
  background-color: var(--primary-hover);
  /* ホバー時の背景色 */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  /* ホバー時のシャドウ */
  transform: translateY(-3px);
  /* 少し上に移動 */
}

/* サブボタンのスタイル */
.sub-button {
  background-color: var(--white);
  /* 背景色 */
  color: var(--dark-text);
  /* テキスト色 */
  border: 2px solid var(--border-color);
  /* ボーダー */
}

/* サブボタンのホバー時のスタイル */
.sub-button:hover {
  background-color: var(--light-bg);
  /* ホバー時の背景色 */
  border-color: var(--primary-color);
  /* ホバー時のボーダー色 */
}

/* タイトル画面フッターのスタイル */
#screen-title .footer {
  position: absolute;
  /* 親要素を基準に絶対配置 */
  bottom: 30px;
  /* 下からの位置 */
  display: flex;
  /* Flexboxで子要素を配置 */
  gap: 20px;
  /* 子要素間のスペース */
}

/* タイトル画面フッターのボタンのスタイル */
#screen-title .footer button {
  background: none;
  /* 背景なし */
  border: none;
  /* ボーダーなし */
  color: var(--light-text);
  /* テキスト色 */
  cursor: pointer;
  /* カーソルをポインターに */
  text-decoration: none;
  /* テキスト装飾なし */
  font-size: 1em;
  /* フォントサイズ */
  transition: color 0.2s;
  /* ホバー時のトランジション */
}

/* タイトル画面フッターのボタンのホバー時のスタイル */
#screen-title .footer button:hover {
  color: var(--dark-text);
  /* ホバー時のテキスト色 */
  text-decoration: underline;
  /* ホバー時に下線 */
}

/* ==========================================================================
   設定画面 (#screen-settings)
   ========================================================================== */

/* 設定画面の見出し */
#screen-settings h2 {
  text-align: center;
  /* テキスト中央揃え */
  margin-bottom: 2.5rem;
  /* 下マージン */
  font-size: 2.5em;
  /* フォントサイズ */
  color: var(--dark-text);
  /* テキスト色 */
}

/* 設定画面のナビゲーション */
.settings-nav {
  display: flex;
  /* Flexboxで子要素を配置 */
  justify-content: space-between;
  /* 両端揃え */
  align-items: center;
  /* 垂直方向中央 */
  margin-bottom: 1.5rem;
  /* 下マージン */
  padding: 1rem;
  /* 内側の余白 */
  background-color: var(--light-bg);
  /* 背景色 */
  border-radius: 12px;
  /* 角の丸み */
}

/* クイズ開始ボタンのラッパー */
.question-start-wrapper .btn-start-quiz {
  margin-left: 15px;
  /* 左マージン */
}

/* 戻るボタンと開始ボタンの共通スタイル */
.btn-back-to-title,
.btn-start-quiz {
  border: none;
  /* ボーダーなし */
  padding: 12px 24px;
  /* 内側の余白 */
  border-radius: 8px;
  /* 角の丸み */
  font-size: 1.1em;
  /* フォントサイズ */
  font-weight: 700;
  /* フォントの太さ */
  cursor: pointer;
  /* カーソルをポインターに */
  transition: background-color 0.2s;
  /* ホバー時のトランジション */
}

/* 戻るボタンのスタイル */
.btn-back-to-title {
  background-color: var(--light-text);
  /* 背景色 */
  color: var(--white);
  /* テキスト色 */
}

/* 戻るボタンのホバー時のスタイル */
.btn-back-to-title:hover {
  background-color: #5a6268;
  /* ホバー時の背景色 */
}

/* 一時停止/再開ボタンのスタイル */
#btn-pause-resume {
  min-width: 80px;
  /* ボタンの最小幅 */
  text-align: center;
  /* テキスト中央揃え */
}

/* 停止ボタンのスタイル */
#btn-stop {
  min-width: 80px;
  /* ボタンの最小幅 */
  text-align: center;
  /* テキスト中央揃え */
}

/* クイズ開始ボタンのスタイル */
.btn-start-quiz {
  background-color: var(--success-color);
  /* 背景色 */
  color: var(--white);
  /* テキスト色 */
}

/* クイズ開始ボタンのホバー時のスタイル */
.btn-start-quiz:hover {
  background-color: var(--success-hover);
  /* ホバー時の背景色 */
}

/* 設定グループのコンテナ */
.settings-group {
  background-color: var(--white);
  /* 背景色 */
  border: 1px solid var(--border-color);
  /* ボーダー */
  border-radius: 12px;
  /* 角の丸み */
  padding: 1.5rem;
  /* 内側の余白 */
  margin-bottom: 1.5rem;
  /* 下マージン */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  /* シャドウ */
}

/* 設定グループの凡例 (legend) */
.settings-group legend {
  font-weight: 700;
  /* フォントの太さ */
  font-size: 1.2em;
  /* フォントサイズ */
  padding: 0 10px;
  /* 内側の余白 */
  color: var(--primary-color);
  /* テキスト色 */
}

/* ラジオボタンのグループ */
.radio-group {
  display: flex;
  /* Flexboxで子要素を配置 */
  gap: 20px;
  /* 子要素間のスペース */
}

/* ラジオボタンのラベル */
.radio-group label {
  display: flex;
  /* Flexboxで子要素を配置 */
  align-items: center;
  /* 垂直方向中央 */
  gap: 5px;
  /* 子要素間のスペース */
}

/* チェックボックスコンテナ */
.checkbox-container {
  display: grid;
  /* グリッドレイアウト */
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  /* 自動で列を生成 */
  gap: 5px;
  /* グリッドアイテム間のスペース */
  max-height: 300px;
  /* 最大高さ */
  overflow-y: auto;
  /* 縦スクロール */
  padding: 10px;
  /* 内側の余白 */
  border: 1px solid var(--border-color);
  /* ボーダー */
  border-radius: 8px;
  /* 角の丸み */
  margin-top: 1rem;
  /* 上マージン */
}

/* チェックボックスのラベル */
.checkbox-container label {
  display: flex;
  /* Flexboxで子要素を配置 */
  align-items: center;
  /* 垂直方向中央 */
  padding: 8px;
  /* 内側の余白 */
  border-radius: 6px;
  /* 角の丸み */
  transition: background-color 0.2s;
  /* ホバー時のトランジション */
}

/* チェックボックスのラベルのホバー時のスタイル */
.checkbox-container label:hover {
  background-color: #e9ecef;
  /* ホバー時の背景色 */
}

/* チェックボックスの入力要素 */
.checkbox-container input[type="checkbox"] {
  margin-right: 10px;
  /* 右マージン */
  width: 18px;
  /* 幅 */
  height: 18px;
  /* 高さ */
}

/* 設定ボタンのグループ */
.settings-buttons {
  margin-bottom: 1rem;
  /* 下マージン */
  display: flex;
  /* Flexboxで子要素を配置 */
  gap: 10px;
  /* 子要素間のスペース */
}

/* 設定ボタンのスタイル */
.settings-buttons button {
  padding: 5px 12px;
  /* 内側の余白 */
  font-size: 0.9em;
  /* フォントサイズ */
  border: 1px solid var(--border-color);
  /* ボーダー */
  background-color: var(--light-bg);
  /* 背景色 */
  border-radius: 6px;
  /* 角の丸み */
  cursor: pointer;
  /* カーソルをポインターに */
  transition: all 0.2s;
  /* 全てのプロパティにトランジション */
}

/* 設定ボタンのホバー時のスタイル */
.settings-buttons button:hover {
  background-color: #e2e6ea;
  /* ホバー時の背景色 */
  border-color: #b1b9c1;
  /* ホバー時のボーダー色 */
}

/* 設定グリッドレイアウト */
.settings-grid {
  display: grid;
  /* グリッドレイアウト */
  grid-template-columns: 1fr 1fr;
  /* 同じ幅の列を2つ作成 */
  gap: 1.5rem;
  /* 各項目の間のスペース */
}

/* グリッド内の設定グループ (下マージンをリセット) */
.settings-grid .settings-group {
  margin-bottom: 0;
  /* 下マージンなし */
}

/* ==========================================================================
   クイズ画面 (#screen-quiz)
   ========================================================================== */

/* クイズ画面のコンテナ */
#screen-quiz {
  text-align: center;
  /* テキスト中央揃え */
}

/* クイズ情報表示エリア */
#quiz-info {
  font-size: 1.3em;
  /* フォントサイズ */
  color: var(--light-text);
  /* テキスト色 */
  background-color: var(--light-bg);
  /* 背景色 */
  padding: 10px 20px;
  /* 内側の余白 */
  border-radius: 30px;
  /* 角の丸み (円形) */
  display: inline-block;
  /* インラインブロック要素 */
  margin-bottom: 2rem;
  /* 下マージン */
}

/* クイズコントロールボタンのグループ */
.quiz-controls {
  display: flex;
  /* Flexboxで子要素を配置 */
  justify-content: center;
  /* 水平方向中央 */
  align-items: center;
  /* 垂直方向中央 */
  gap: 20px;
  /* 子要素間のスペース */
  margin-bottom: 1rem;
  /* 下マージン */
}

/* クイズコントロールのアイコンボタン */
.quiz-controls .icon-button {
  font-size: 2em;
  /* フォントサイズ */
  width: 90px;
  /* 幅 */
  height: 80px;
  /* 高さ */
  border-radius: 50%;
  /* 円形 */
  background-color: var(--primary-color);
  /* 背景色 */
  color: var(--white);
  /* テキスト色 */
  box-shadow: var(--shadow);
  /* シャドウ */
}

/* クイズコントロールのアイコンボタンのホバー時のスタイル */
.quiz-controls .icon-button:hover {
  background-color: var(--primary-hover);
  /* ホバー時の背景色 */
}

/* クイズのプログレスバー */
#quiz-progress-bar {
  -webkit-appearance: none;
  /* デフォルトのスタイルを無効化 (WebKit) */
  appearance: none;
  /* デフォルトのスタイルを無効化 */
  width: 100%;
  /* 幅 */
  height: 8px;
  /* 高さ */
  border-radius: 5px;
  /* 角の丸み */
  background: var(--border-color);
  /* 背景色 */
  outline: none;
  /* アウトラインなし */
  transition: opacity .2s;
  /* トランジション */
}

/* クイズのプログレスバーのつまみ (WebKit) */
#quiz-progress-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  /* デフォルトのスタイルを無効化 */
  appearance: none;
  /* デフォルトのスタイルを無効化 */
  width: 22px;
  /* 幅 */
  height: 22px;
  /* 高さ */
  border-radius: 50%;
  /* 円形 */
  background: var(--success-color);
  /* 背景色 */
  cursor: pointer;
  /* カーソルをポインターに */
}

/* 回答選択肢エリア */
#answer-options-area {
  display: grid;
  /* グリッドレイアウト */
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  /* 自動で列を生成 */
  gap: 15px;
  /* グリッドアイテム間のスペース */
}

/* 回答選択肢ボタン */
#answer-options-area button {
  display: flex;
  /* Flexboxで子要素を配置 */
  flex-direction: column;
  /* 縦方向に並べる */
  justify-content: center;
  /* 垂直方向中央 */
  align-items: center;
  /* 水平方向中央 */
  padding: 20px;
  /* 内側の余白 */
  min-height: 100px;
  /* 最小高さ */
  font-size: 1.2em;
  /* フォントサイズ */
  border: 2px solid var(--border-color);
  /* ボーダー */
  border-radius: 16px;
  /* 角の丸み */
  background-color: var(--white);
  /* 背景色 */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  /* シャドウ */
  transition: all 0.2s ease-in-out;
  /* 全てのプロパティにトランジション */
  cursor: pointer;
  /* カーソルをポインターに */
  text-align: center;
  /* テキスト中央揃え */
}

/* 回答選択肢ボタンのホバー時のスタイル (無効化されていない場合) */
#answer-options-area button:hover:not(:disabled) {
  transform: translateY(-5px);
  /* 少し上に移動 */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
  /* ホバー時のシャドウ */
  border-color: var(--primary-color);
  /* ホバー時のボーダー色 */
}

/* 無効化された回答選択肢ボタン */
#answer-options-area button:disabled {
  cursor: default;
  /* カーソルをデフォルトに */
  opacity: 1;
  /* 透明度なし */
}

/* 正解の回答選択肢ボタン */
#answer-options-area button.correct {
  background-color: #d4edda;
  /* 背景色 */
  border-color: #c3e6cb;
  /* ボーダー色 */
  color: #155724;
  /* テキスト色 */
  transform: scale(1.05);
  /* 少し拡大 */
}

/* 不正解の回答選択肢ボタン */
#answer-options-area button.incorrect {
  background-color: #f8d7da;
  /* 背景色 */
  border-color: #f5c6cb;
  /* ボーダー色 */
  color: #721c24;
  /* テキスト色 */
  opacity: 0.7;
  /* 透明度 */
}

/* 曲タイトルのスタイル */
.song-title {
  font-weight: 700;
  /* フォントの太さ */
  font-size: 1.1em;
  /* フォントサイズ */
  margin-bottom: 8px;
  /* 下マージン */
}

/* シリーズのサブタイトル */
.series-subtitle {
  font-size: 0.85em;
  /* フォントサイズ */
  color: var(--light-text);
  /* テキスト色 */
  background-color: transparent;
  /* 背景色なし */
  padding: 0;
  /* 内側の余白なし */
}

/* 結果フィードバックエリア */
#result-feedback {
  padding: 0px;
  /* 内側の余白なし */
  margin-bottom: 10px;
  /* 下マージン */
  margin-top: 2.5rem;
  /* 上マージン */
}

/* フィードバックテキスト */
#feedback-text {
  font-size: 1.8em;
  /* フォントサイズ */
  font-weight: 700;
  /* フォントの太さ */
  margin-bottom: 1.5rem;
  /* 下マージン */
}

/* フィードバックの設定 */
.settings-summary {
  font-size: 0.9em;
  color: var(--light-text);
  border-top: 1px solid var(--border-color);
  margin: 2rem auto 1.5rem auto;
  /* 上下の余白 */
  padding-top: 1.5rem;
  text-align: left;
  max-width: 400px;
  /* 表示エリアの最大幅 */
}

/* フィードバックの設定 */
.settings-summary h4 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--dark-text);
}

/* フィードバックの設定 */
.settings-summary p {
  margin: 0.5rem 0;
  display: flex;
}

/* フィードバックの設定 */
.settings-summary strong {
  color: var(--dark-text);
  min-width: 130px;
  /* ラベルの幅を揃える */
  display: inline-block;
  font-weight: 700;
}

/* 次の質問ボタンとクイズ終了ボタンの共通スタイル */
#btn-next-question,
#btn-quit-quiz {
  padding: 14px 30px;
  /* 内側の余白 */
  font-size: 1.2em;
  /* フォントサイズ */
  font-weight: 700;
  /* フォントの太さ */
  margin: 0 10px;
  /* 左右マージン */
  border-radius: 10px;
  /* 角の丸み */
  border: none;
  /* ボーダーなし */
  cursor: pointer;
  /* カーソルをポインターに */
  transition: all 0.2s;
  /* 全てのプロパティにトランジション */
}

/* 次の質問ボタンのスタイル */
#btn-next-question {
  background-color: var(--primary-color);
  /* 背景色 */
  color: var(--white);
  /* テキスト色 */
}

/* 次の質問ボタンのホバー時のスタイル */
#btn-next-question:hover {
  background-color: var(--primary-hover);
  /* ホバー時の背景色 */
  transform: translateY(-2px);
  /* 少し上に移動 */
}

/* クイズ終了ボタンのスタイル */
#btn-quit-quiz {
  background-color: var(--light-text);
  /* 背景色 */
  color: var(--white);
  /* テキスト色 */
}

/* クイズ終了ボタンのホバー時のスタイル */
#btn-quit-quiz:hover {
  background-color: #5a6268;
  /* ホバー時の背景色 */
  transform: translateY(-2px);
  /* 少し上に移動 */
}

/* ==========================================================================
   結果画面 (#screen-result)
   ========================================================================== */

/* 結果画面のコンテナ */
#screen-result {
  text-align: center;
  /* テキスト中央揃え */
}

/* スコア、セッション最大連勝、合計最大連勝の表示 */
#result-score,
#result-session-max-streak,
#result-total-max-streak {
  font-size: 1.3em;
  /* フォントサイズ */
  margin: 15px 0;
  /* 上下マージン */
}

/* 結果画面からタイトルに戻るボタン */
#btn-back-to-title-from-result {
  margin-top: 25px;
  /* 上マージン */
  padding: 12px 25px;
  /* 内側の余白 */
  font-size: 1.2em;
  /* フォントサイズ */
}

/* ==========================================================================
   タイマー表示
   ========================================================================== */

/* タイマー表示エリア全体 */
#timer-display {
  margin: 10px 0;
  /* 上下マージン */
}

/* タイマーバーの背景 */
#timer-bar-container {
  width: 100%;
  /* 幅 */
  height: 10px;
  /* 高さ */
  background-color: #e0e0e0;
  /* 背景色 */
  border-radius: 5px;
  /* 角の丸み */
  overflow: hidden;
  /* はみ出た部分を隠す */
  margin-top: 5px;
  /* 上マージン */
}

/* タイマーバー本体 */
#timer-bar {
  width: 100%;
  /* 幅 */
  height: 100%;
  /* 高さ */
  background-color: #4caf50;
  /* 背景色 */
  border-radius: 5px;
  /* 角の丸み */
  transition: width 0.1s linear;
  /* アニメーションを滑らかに */
}

/* ==========================================================================
   設定画面の追加スタイル
   ========================================================================== */

/* 問題数スライダーのコンテナ (Flexboxで伸縮に対応) */
#setting-question-count-container {
  display: flex;
  /* Flexboxで子要素を配置 */
  align-items: center;
  /* 垂直方向中央 */
  gap: 10px;
  /* 子要素間のスペース */
}

/* 幅広スライダー用のスタイル */
.slider-wide {
  flex-grow: 1;
  /* 横幅いっぱいに伸びる */
}

/* ==========================================================================
   シリーズ/曲 選択肢ボタン
   ========================================================================== */

/* シリーズ/曲 選択肢ボタンの共通スタイル */
.series-choice-button,
.song-choice-button {
  width: 100%;
  /* 幅 */
  padding: 10px;
  /* 内側の余白 */
  font-size: 1em;
  /* フォントサイズ */
  text-align: left;
  /* テキスト左揃え */
  border: 1px solid var(--border-color);
  /* ボーダー */
  background-color: var(--white);
  /* 背景色 */
  border-radius: 8px;
  /* 角の丸み */
  cursor: pointer;
  /* カーソルをポインターに */
  transition: all 0.2s;
  /* 全てのプロパティにトランジション */
}

/* 「戻る」ボタンのスタイル */
.back-to-series-button {
  grid-column: 1 / -1;
  /* グリッドの全幅を占める */
  padding: 10px;
  /* 内側の余白 */
  font-size: 1em;
  /* フォントサイズ */
  font-weight: 700;
  /* フォントの太さ */
  color: var(--primary-color);
  /* テキスト色 */
  text-align: left;
  /* テキスト左揃え */
  border: 1px solid var(--border-color);
  /* ボーダー */
  background-color: var(--white);
  /* 背景色 */
  border-radius: 8px;
  /* 角の丸み */
  cursor: pointer;
  /* カーソルをポインターに */
  transition: all 0.2s;
  /* 全てのプロパティにトランジション */
}

/* ホバー時のスタイル */
.series-choice-button:hover,
.song-choice-button:hover,
.back-to-series-button:hover {
  border-color: var(--primary-color);
  /* ホバー時のボーダー色 */
  background-color: #f5f7fa;
  /* ホバー時の背景色 */
  transform: translateY(-2px);
  /* 少し上に移動 */
  box-shadow: var(--shadow);
  /* シャドウ */
}

/* ==========================================================================
   注釈モーダル
   ========================================================================== */

/* 注釈を開く「？」ボタンのスタイル (タイトル画面フッター用) */
.annotation-trigger {
  background-color: var(--light-text);
  /* 背景色 */
  color: var(--white);
  /* テキスト色 */
  border: none;
  /* ボーダーなし */
  border-radius: 50%;
  /* 円形 */
  width: 24px;
  /* 幅 */
  height: 24px;
  /* 高さ */
  font-size: 14px;
  /* フォントサイズ */
  font-weight: 700;
  /* フォントの太さ */
  cursor: pointer;
  /* カーソルをポインターに */
  line-height: 24px;
  /* 行の高さ */
  text-align: center;
  /* テキスト中央揃え */
  margin-left: 5px;
  /* 左マージン */
  transition: background-color 0.2s;
  /* ホバー時のトランジション */
}

/* 注釈ボタンのホバー時のスタイル */
.annotation-trigger:hover {
  background-color: var(--dark-text);
  /* ホバー時の背景色 */
}

/* モーダルの背景オーバーレイ */
.modal-overlay {
  position: fixed;
  /* 画面に固定 */
  top: 0;
  left: 0;
  width: 100%;
  /* 全幅 */
  height: 100%;
  /* 全高 */
  background-color: rgba(0, 0, 0, 0.6);
  /* 半透明の背景 */
  z-index: 2000;
  /* ヘッダーよりは下、他よりは上 */
  display: none;
  /* 初期状態では非表示 */
  justify-content: center;
  /* 水平方向中央 */
  align-items: center;
  /* 垂直方向中央 */
}

/* モーダルのコンテンツボックス */
.modal-overlay .modal-content {
  background: var(--white);
  /* 背景色 */
  padding: 2rem;
  /* 内側の余白 */
  border-radius: 12px;
  /* 角の丸み */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  /* シャドウ */
  max-width: 600px;
  /* 最大幅 */
  width: 90%;
  /* 幅 */
  max-height: 80vh;
  /* 画面の高さ80%まで */
  overflow-y: auto;
  /* 内容が長ければスクロール */
}

/* モーダルコンテンツの見出し */
.modal-overlay .modal-content h3 {
  margin-top: 0;
  /* 上マージンなし */
  margin-bottom: 1rem;
  /* 下マージン */
}

/* モーダルコンテンツの段落 */
.modal-overlay .modal-content p {
  margin-bottom: 2rem;
  /* 下マージン */
}

/* モーダルコンテンツのボタン */
.modal-overlay .modal-content button {
  padding: 10px 25px;
  /* 内側の余白 */
}