/* 意味順テストモード用スタイル */
.imijun-test-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* 問題表示テーブル（タイピングモーダルと同じスタイル） */
.imijun-test-table,
#imijun-type-modal .block-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 20px;
  table-layout: fixed;
  background: rgba(250, 250, 250, 0.95);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.imijun-test-table td {
  padding: 14px 16px;
  text-align: center;
  border-right: 1px solid rgba(229, 231, 235, 0.8);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  position: relative;
  word-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  transition: background-color 0.2s ease;
}

.imijun-test-table td:last-child {
  border-right: none;
}

.imijun-test-table tr:last-child td {
  border-bottom: none;
}

/* 日本語行（タイピングモーダルと同じスタイル） */
.imijun-test-japanese-row,
.japanese-row {
  background-color: rgba(255, 255, 255, 0.95);
}

.imijun-test-japanese-cell,
.japanese-row td {
  font-size: 1.4rem;
  font-weight: 500;
  color: #1f2937;
  min-width: 120px;
  vertical-align: middle;
  line-height: 1.5;
}

/* 解答表示行（タイピングモーダルと同じスタイル） */
.imijun-test-answer-row,
.english-row {
  background: rgba(255, 255, 255, 0.95);
}

.imijun-test-answer-cell,
.english-row td {
  font-size: 1.4rem;
  font-family: 'CustomFont', 'ImijunEnglish', 'Times New Roman', serif;
  color: transparent;
  min-height: 45px;
  position: relative;
  padding: 14px 16px;
  font-weight: 500;
}

.imijun-test-answer-cell.revealed {
  color: #2d3748;
  animation: fadeIn 0.3s ease-in;
}

/* ユーザー入力行 */
.imijun-test-input-row,
.input-row {
  background-color: rgba(255, 255, 255, 0.95);
}

.imijun-test-input-cell {
  padding: 10px 5px;
}

.imijun-test-input {
  width: 100%;
  padding: 8px 12px;
  font-size: 18px;
  font-family: 'CustomFont', sans-serif;
  border: 2px solid #e5e7eb;
  border-radius: 5px;
  text-align: center;
  transition: all 0.3s ease;
  outline: none;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  resize: none;
  overflow-y: auto;
  min-height: 40px;
  line-height: 1.4;
}

.imijun-test-input:focus {
  border-color: #4299e1;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

/* 正解時のスタイル */
.imijun-test-input.correct {
  background-color: #a2e5a2;
  border-color: #48bb78;
}

/* 不正解時のスタイル */
.imijun-test-input.incorrect {
  background-color: #f9e79f;
  border-color: #f6ad55;
}

/* 次の問題へボタン */
.imijun-test-next-btn {
  display: none;
  margin: 20px auto;
  padding: 12px 30px;
  font-size: 16px;
  font-weight: bold;
  color: white;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.imijun-test-next-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.imijun-test-next-btn:active {
  transform: translateY(0);
}

.imijun-test-next-btn.visible {
  display: block;
}

/* 完了メッセージ */
.imijun-test-complete {
  text-align: center;
  padding: 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 15px;
  margin: 20px auto;
  max-width: 500px;
}

.imijun-test-complete h2 {
  font-size: 28px;
  margin-bottom: 20px;
}

.imijun-test-complete p {
  font-size: 18px;
  margin-bottom: 30px;
}

.imijun-test-retry-btn {
  padding: 12px 30px;
  font-size: 16px;
  font-weight: bold;
  color: #667eea;
  background: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.imijun-test-retry-btn:hover {
  transform: scale(1.05);
}

/* アニメーション */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* プログレスバー */
.imijun-test-progress {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  margin-bottom: 30px;
  overflow: hidden;
}

.imijun-test-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* 問題番号表示 */
.imijun-test-question-number {
  text-align: center;
  font-size: 18px;
  color: #4a5568;
  margin-bottom: 20px;
  font-weight: 500;
}