/* 評価者トレーニングシステム - カスタムCSS */

/* ================================
   グローバルスタイル
   ================================ */

* {
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'メイリオ', sans-serif;
  line-height: 1.6;
  background-color: #f3f4f6;
}

/* スクロールバーのスタイル */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* ================================
   ローディングオーバーレイ
   ================================ */

#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3b82f6;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ================================
   メッセージ表示
   ================================ */

.message {
  position: fixed;
  top: 20px;
  right: 20px;
  max-width: 400px;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.message-error {
  background-color: #fee;
  border-left: 4px solid #dc2626;
  color: #991b1b;
}

.message-success {
  background-color: #d1fae5;
  border-left: 4px solid #10b981;
  color: #065f46;
}

/* ================================
   ヘッダー
   ================================ */

header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

/* ================================
   カード
   ================================ */

.card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 600;
  color: #1f2937;
}

.card-body {
  padding: 20px;
}

/* ================================
   ケースリスト
   ================================ */

#case-list {
  display: grid;
  gap: 16px;
}

.case-card {
  cursor: pointer;
  transition: all 0.2s ease;
}

.case-card:hover {
  transform: translateX(4px);
}

.case-card:active {
  transform: scale(0.98);
}

/* ================================
   評価フォーム
   ================================ */

.radio-group {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.radio-option {
  position: relative;
}

.radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.radio-option label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: white;
}

.radio-option input[type="radio"]:checked + label {
  border-color: #3b82f6;
  background-color: #eff6ff;
  color: #1e40af;
  font-weight: 600;
}

.radio-option label:hover {
  border-color: #93c5fd;
  background-color: #f0f9ff;
}

.radio-option .score-number {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.radio-option .score-label {
  font-size: 0.875rem;
  color: #6b7280;
}

/* ================================
   テキストエリア
   ================================ */

textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  line-height: 1.6;
  transition: all 0.2s ease;
  resize: vertical;
}

textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ================================
   ボタン
   ================================ */

button {
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  outline: none;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  background-color: #3b82f6;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
}

.btn-primary:hover {
  background-color: #2563eb;
}

.btn-secondary {
  background-color: #6b7280;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
}

.btn-secondary:hover {
  background-color: #4b5563;
}

.btn-success {
  background-color: #10b981;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
}

.btn-success:hover {
  background-color: #059669;
}

/* ================================
   バッジ
   ================================ */

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
}

.badge-blue {
  background-color: #dbeafe;
  color: #1e40af;
}

.badge-green {
  background-color: #d1fae5;
  color: #065f46;
}

.badge-yellow {
  background-color: #fef3c7;
  color: #92400e;
}

.badge-red {
  background-color: #fee2e2;
  color: #991b1b;
}

/* ================================
   テーブル
   ================================ */

table {
  width: 100%;
  border-collapse: collapse;
}

table th {
  background-color: #f9fafb;
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
}

table td {
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
}

table tbody tr:hover {
  background-color: #f9fafb;
}

/* ================================
   AIフィードバック
   ================================ */

.feedback-score {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}

.bias-item {
  border-left: 4px solid;
  padding: 16px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.bias-item.warning {
  border-color: #f59e0b;
  background-color: #fffbeb;
}

.bias-item.error {
  border-color: #ef4444;
  background-color: #fef2f2;
}

/* ================================
   アニメーション
   ================================ */

.fade-in {
  animation: fadeIn 0.5s ease-in;
}

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

.slide-in-left {
  animation: slideInLeft 0.5s ease-out;
}

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

/* ================================
   レスポンシブデザイン
   ================================ */

@media (max-width: 768px) {
  .radio-group {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .header-title {
    font-size: 1.25rem;
  }
  
  .message {
    left: 20px;
    right: 20px;
    max-width: none;
  }
}

@media (max-width: 640px) {
  .radio-group {
    grid-template-columns: 1fr;
  }
  
  .radio-option .score-number {
    font-size: 1.5rem;
  }
}

/* ================================
   ユーティリティクラス
   ================================ */

.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.font-bold {
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

/* ================================
   評価者選択ドロップダウン
   ================================ */

#evaluator-selector {
  min-width: 200px;
}

#evaluator-selector option {
  background-color: white;
  color: #374151;
  padding: 8px;
}
