/* ==========================================
   生成AIパスポート クイズアプリ 共通スタイル
   Design Theme: Modern AI Glassmorphism (Violet & Cyan Gradient)
   ========================================== */

:root {
  /* カラーパレット */
  --bg-dark: #0a0b14;
  --bg-card: rgba(22, 26, 46, 0.7);
  --bg-card-hover: rgba(30, 36, 64, 0.85);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-color-glow: rgba(124, 58, 237, 0.4);

  --primary: #8b5cf6;       /* バイオレット */
  --primary-hover: #7c3aed;
  --accent: #06b6d4;        /* シアン */
  --accent-hover: #0891b2;
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.15);
  --error: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.15);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(139, 92, 246, 0.35);

  --font-base: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-en: 'Outfit', sans-serif;
}

/* リセット＆ベース定義 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-base);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 背景グローエフェクト */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

.bg-glow-1 {
  top: -10%;
  left: 15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #7c3aed 0%, transparent 70%);
}

.bg-glow-2 {
  bottom: 10%;
  right: 10%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
}

.bg-glow-3 {
  top: 45%;
  left: -5%;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #ec4899 0%, transparent 70%);
}

/* コンテナ構造 */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ヘッダー */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  margin-bottom: 2rem;
  background: rgba(18, 22, 40, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.logo-badge {
  font-family: var(--font-en);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 1px;
  padding: 0.25rem 0.6rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.4);
}

.logo-title {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-main);
}

.logo-sub {
  font-family: var(--font-en);
  color: var(--accent);
  font-weight: 600;
}

.header-actions {
  display: flex;
  gap: 0.5rem;
}

/* ボタン共通 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #6d28d9);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.6);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), #0284c7);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(6, 182, 212, 0.6);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-icon {
  position: relative;
  padding: 0.6rem;
  border-radius: var(--radius-md);
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 0.95rem 1.75rem;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--error);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* カード基底 */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

/* スクリーン管理 */
.screen {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.screen.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* 1. ダッシュボード */
.welcome-card {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.7), rgba(15, 23, 42, 0.8));
  border: 1px solid var(--border-color-glow);
  position: relative;
  overflow: hidden;
}

.welcome-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  margin-bottom: 0.75rem;
}

.welcome-card h1 {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.gradient-text {
  background: linear-gradient(135deg, #a78bfa, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.welcome-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.settings-card h2, .status-card h2 {
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.setting-group {
  margin-bottom: 1.25rem;
}

.setting-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.select-wrapper select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(10, 11, 20, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
}

.radio-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.radio-tile {
  cursor: pointer;
}

.radio-tile input {
  display: none;
}

.tile-label {
  display: block;
  text-align: center;
  padding: 0.6rem 0.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.radio-tile input:checked + .tile-label {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* 通常演習と模擬試験のモード区分（設定がどちらに効くかを視覚化） */
.mode-section {
  padding: 1.1rem;
  background: rgba(10, 11, 20, 0.35);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.mode-section-exam {
  border-color: rgba(6, 182, 212, 0.35);
  background: rgba(6, 182, 212, 0.05);
}

.mode-section-header {
  margin-bottom: 1rem;
}

.mode-section-title {
  display: block;
  font-weight: 700;
  font-size: 1rem;
}

.mode-section-desc {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  line-height: 1.5;
}

.mode-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
  color: var(--text-dim);
  font-size: 0.75rem;
}

.mode-divider::before,
.mode-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

/* ステータスカード */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.stat-box {
  background: rgba(10, 11, 20, 0.5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 0.5rem;
  text-align: center;
}

.stat-value {
  font-family: var(--font-en);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent);
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.menu-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.menu-link-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  text-align: left;
}

.menu-link-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
  transform: translateX(4px);
}

.menu-link-icon {
  font-size: 1.25rem;
}

.menu-link-text {
  flex: 1;
}

.menu-link-title {
  font-weight: 700;
  font-size: 0.9rem;
}

.menu-link-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.menu-link-arrow {
  color: var(--text-dim);
  font-weight: 700;
}

/* 2. クイズ画面 */
.quiz-header {
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.quiz-info-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.meta-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.category-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
}

/* タイマーバッジ */
.timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: #38bdf8;
  border-radius: 50px;
  font-family: var(--font-en);
  font-size: 0.85rem;
  font-weight: 700;
}

.timer-badge.warning {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--error);
  color: #fca5a5;
  animation: pulseAlert 1s infinite alternate;
}

@keyframes pulseAlert {
  from { opacity: 0.7; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1.03); }
}

.quiz-progress-text {
  font-family: var(--font-en);
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 50px;
  transition: width 0.3s ease;
}

.question-card {
  padding: 2rem;
}

.question-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.question-id-badge {
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent);
}

.btn-bookmark-toggle.active svg {
  fill: var(--accent);
  stroke: var(--accent);
}

.question-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-flag-toggle.active svg {
  fill: #f59e0b;
  stroke: #f59e0b;
}

.question-title {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.option-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.option-item:hover:not(.disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateX(4px);
}

.option-index {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.option-text {
  font-size: 0.95rem;
  line-height: 1.5;
}

/* 解答後のスタイル */
.option-item.correct {
  background: var(--success-bg) !important;
  border-color: var(--success) !important;
  color: #ecfdf5;
}

.option-item.correct .option-index {
  background: var(--success);
  color: #fff;
}

.option-item.incorrect {
  background: var(--error-bg) !important;
  border-color: var(--error) !important;
  color: #fef2f2;
}

.option-item.incorrect .option-index {
  background: var(--error);
  color: #fff;
}

.option-item.disabled {
  cursor: default;
  opacity: 0.75;
}

/* 模擬試験: 選択中の回答（正誤は見せない） */
.option-item.selected {
  background: rgba(139, 92, 246, 0.18);
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.25);
}

.option-item.selected .option-index {
  background: var(--primary);
  color: #fff;
}

/* 模擬試験: ナビゲーションと解答状況パレット */
.exam-nav {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
}

.exam-nav .btn {
  flex: 1;
}

#btn-exam-submit {
  flex: 1.4;
}

.exam-nav .btn:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.exam-palette-card {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
}

.exam-palette-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.exam-palette-title {
  font-size: 0.95rem;
  font-weight: 700;
}

.palette-legend {
  display: flex;
  gap: 0.9rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.palette-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.legend-dot.answered { background: var(--primary); }
.legend-dot.unanswered { background: rgba(255, 255, 255, 0.12); border: 1px solid var(--border-color); }
.legend-dot.flagged { background: #f59e0b; }

.exam-palette {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 0.4rem;
}

.palette-cell {
  position: relative;
  padding: 0.45rem 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.palette-cell:hover {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--text-main);
}

.palette-cell.answered {
  background: rgba(139, 92, 246, 0.25);
  border-color: var(--primary);
  color: #fff;
}

.palette-cell.flagged::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f59e0b;
}

.palette-cell.current {
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.45);
  color: #fff;
}

/* 解説ボックス */
.explanation-box {
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(10, 11, 20, 0.7);
  border: 1px solid var(--border-color-glow);
  border-radius: var(--radius-lg);
  animation: fadeIn 0.4s ease;
}

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

.result-badge {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 0.35rem 1rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}

.result-badge.correct {
  background: var(--success);
  color: #fff;
}

.result-badge.incorrect {
  background: var(--error);
  color: #fff;
}

.explanation-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--accent);
}

.explanation-content {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.quiz-next-actions {
  display: flex;
  justify-content: flex-end;
}

/* 3. 結果画面 */
.result-card {
  text-align: center;
  padding: 3rem 2rem;
}

.result-trophy {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
}

.result-subtitle {
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.time-taken-badge {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.4rem 1rem;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 50px;
}

.score-display {
  margin: 2rem 0;
  display: flex;
  justify-content: center;
}

.score-circle {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.25) 0%, rgba(10, 11, 20, 0.8) 70%);
  border: 3px solid var(--primary);
  box-shadow: var(--shadow-glow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-percent {
  font-family: var(--font-en);
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--accent);
}

.score-ratio {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.result-evaluation {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 2rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

@media (max-width: 600px) {
  .result-actions {
    flex-direction: column;
  }

  .exam-nav {
    flex-wrap: wrap;
  }

  .exam-nav .btn {
    flex: 1 1 40%;
  }

  #btn-exam-submit {
    flex: 1 1 100%;
  }

  .exam-palette {
    grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
  }
}

/* 4. 用語集画面 */
.terms-header {
  margin-bottom: 1.5rem;
}

.terms-header h2 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.terms-search-input {
  width: 100%;
  padding: 0.85rem 1.25rem;
  margin-top: 1rem;
  background: rgba(10, 11, 20, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
}

.terms-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

.terms-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.term-card {
  background: rgba(10, 11, 20, 0.5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: all 0.2s ease;
}

.term-card:hover {
  border-color: var(--border-color-glow);
}

.term-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.term-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}

.term-reading {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.term-meaning {
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.term-detail {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* 用語集フィルタ行 */
.terms-filter-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* 章別正解率（弱点分析） */
.category-stats {
  text-align: left;
  margin-bottom: 2rem;
}

.result-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1rem;
}

.cat-stat-row {
  margin-bottom: 0.9rem;
}

.cat-stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.3rem;
  gap: 0.5rem;
}

.cat-stat-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.cat-stat-value {
  font-family: var(--font-en);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.cat-bar-bg {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50px;
  overflow: hidden;
}

.cat-bar-fill {
  height: 100%;
  border-radius: 50px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.cat-bar-fill.good { background: linear-gradient(90deg, #10b981, #34d399); }
.cat-bar-fill.mid  { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.cat-bar-fill.bad  { background: linear-gradient(90deg, #ef4444, #f87171); }

/* 間違えた問題の復習リスト */
.wrong-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.wrong-list-header h2 {
  font-size: 1.25rem;
}

.wrong-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.review-item {
  background: rgba(10, 11, 20, 0.5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.review-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.btn-review-bookmark.active svg {
  fill: var(--accent);
  stroke: var(--accent);
}

.review-question {
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.6;
  white-space: pre-line;
}

.review-answer {
  font-size: 0.9rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.4rem;
}

.review-answer.wrong {
  background: var(--error-bg);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.review-answer.right {
  background: var(--success-bg);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

.review-explanation {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-top: 0.6rem;
  white-space: pre-line;
}

/* 問題文の改行対応（自動生成のB形式など） */
.question-title,
.explanation-content {
  white-space: pre-line;
}

/* 使い方画面 */
.about-content h2 {
  color: var(--accent);
  font-size: 1.35rem;
  margin: 1.75rem 0 0.75rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.about-content ul {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.about-content li {
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.info-box {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin: 1.25rem 0;
}

/* フッター */
.app-footer {
  margin-top: auto;
  text-align: center;
  padding-top: 2rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.app-footer .disclaimer {
  max-width: 720px;
  margin: 0 auto 0.5rem;
  font-size: 0.72rem;
  line-height: 1.6;
  color: var(--text-dim);
}

/* 合格サポートコラム一覧 */
.columns-card {
  margin-top: 1.5rem;
}

.columns-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.column-link-card {
  display: block;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.column-link-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-color-glow);
  transform: translateY(-2px);
}

.column-link-title {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 0.35rem;
}

.column-link-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* 運営者情報・お問い合わせカード */
.info-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .info-card-grid {
    grid-template-columns: 1fr;
  }
}

/* 結果画面の「次のステップ」ボックス */
.next-step-box {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: rgba(6, 182, 212, 0.05);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: var(--radius-md);
  text-align: left;
}

.next-step-box a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.next-step-box a:hover {
  text-decoration: underline;
}
