/* app/assets/stylesheets/predictions.css */

/* 全体的なコンテナ */
.prediction-detail-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #333;
  background-color: #f9fafb;
}

/* 戻るボタン */
.back-navigation {
  margin-bottom: 1.5rem;
}
.back-btn {
  color: #4a5568;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.back-btn:hover {
  color: #2d3748;
}

/* メインレイアウト */
.prediction-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 1024px) {
  .prediction-layout {
    grid-template-columns: 2fr 1fr;
  }
}

/* カードスタイル */
.card {
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
}

/* ヘッダー */
.prediction-header {
  margin-bottom: 2rem;
}
.prediction-header .category-badge {
  display: inline-block;
  background-color: #e0e7ff;
  color: #3730a3;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.prediction-header .prediction-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
.prediction-header .status-badge {
  font-size: 1rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  color: white;
}
.status-active { background-color: #22c55e; }
.status-closed { background-color: #f97316; }
.status-settled { background-color: #6366f1; }

/* 概要 */
.prediction-description h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 0.5rem;
}
.prediction-description p {
  line-height: 1.6;
  color: #4a5568;
}

/* 選択肢 */
.prediction-options h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.options-list {
  display: grid;
  gap: 1rem;
}
.option-card {
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  transition: all 0.2s;
  cursor: pointer;
}
.option-card.selected {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
}
.option-card.winning {
  border-color: #16a34a;
  background-color: #f0fdf4;
}
.option-card.user-selected {
  position: relative;
  border-color: #3b82f6;
}
.option-card .option-content {
  padding: 1rem;
}
.option-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.option-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
}
.option-header .odds {
  font-size: 1rem;
  font-weight: 700;
  color: #4f46e5;
}
.option-description {
  color: #6b7280;
  margin-bottom: 1rem;
}
.option-stats {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: #4a5568;
}
.option-radio {
  display: none;
}
.option-radio:checked ~ .option-card {
  border-color: #4f46e5 !important;
  background-color: #f8faff !important;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1) !important;
  transform: translateY(-1px);
}
.option-radio:checked ~ .option-card .option-header h3 {
  color: #4f46e5 !important;
}
.option-radio:checked ~ .option-card .option-header .odds {
  color: #3730a3 !important;
  font-size: 1.125rem !important;
}

/* 追加の選択状態スタイル（HTMLの構造に応じて） */
input[type="radio"]:checked + label .option-card,
input[type="radio"]:checked ~ .option-card,
.option-card:has(input[type="radio"]:checked) {
  border-color: #4f46e5 !important;
  background-color: #f8faff !important;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1) !important;
  transform: translateY(-1px);
}

input[type="radio"]:checked + label .option-header h3,
input[type="radio"]:checked ~ .option-card .option-header h3,
.option-card:has(input[type="radio"]:checked) .option-header h3 {
  color: #4f46e5 !important;
}

input[type="radio"]:checked + label .option-header .odds,
input[type="radio"]:checked ~ .option-card .option-header .odds,
.option-card:has(input[type="radio"]:checked) .option-header .odds {
  color: #3730a3 !important;
  font-size: 1.125rem !important;
}

/* ホバー効果も追加 */
.option-card:hover {
  border-color: #a5b4fc;
  background-color: #fafbff;
  transform: translateY(-1px);
  transition: all 0.2s ease;
}

.option-card label {
  display: block;
  cursor: pointer;
}
.bet-placed {
  background-color: #f3f4f6;
}
.bet-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #e5e7eb;
  padding: 0.75rem 1rem;
  border-radius: 0.25rem;
}
.bet-status {
  font-weight: 700;
  color: #1f2937;
}
.bet-points {
  font-weight: 600;
  color: #4f46e5;
}

/* ベットコントロール */
.bet-controls {
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: #f9fafb;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
}
.current-points {
  font-weight: 500;
  margin-bottom: 1rem;
}
.points-value {
  font-weight: 700;
  color: #16a34a;
}
.bet-amount {
  margin-bottom: 1.5rem;
}
.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 1rem;
}
.form-hint {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.25rem;
}
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary {
  background-color: #4f46e5;
  color: white;
}
.btn-primary:hover {
  background-color: #4338ca;
}
.btn-primary:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.6;
}
.btn-primary:disabled:hover {
  background-color: #9ca3af;
}
.btn-large {
  width: 100%;
  text-align: center;
  font-size: 1.125rem;
  padding: 1rem;
}
.btn-outline {
  border-color: #d1d5db;
  color: #374151;
}
.btn-outline:hover {
  background-color: #f3f4f6;
}

/* 未ログイン・締切済み */
.login-prompt {
  text-align: center;
  margin-top: 2rem;
  padding: 2rem;
  background-color: #f3f4f6;
  border-radius: 0.5rem;
}
.login-prompt p {
  margin-bottom: 1rem;
  font-weight: 500;
}
.login-prompt .btn {
  margin: 0 0.5rem;
}
.result-badge, .user-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-weight: 600;
  color: white;
  margin-left: 0.5rem;
}
.result-badge { background-color: #16a34a; }
.user-badge { background-color: #3b82f6; }

/* 結果表示 */
.user-bet-result {
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: 0.5rem;
}
.result-win {
  background-color: #dcfce7;
  border: 1px solid #4ade80;
  color: #14532d;
}
.result-lose {
  background-color: #fee2e2;
  border: 1px solid #f87171;
  color: #7f1d1d;
}
.result-pending {
  background-color: #f3f4f6;
  border: 1px solid #d1d5db;
}
.user-bet-result h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* サイドバー */
.sidebar .card {
  margin-bottom: 2rem;
}
.sidebar h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.info-item, .stats-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f3f4f6;
}
.info-item:last-child, .stats-item:last-child {
  border-bottom: none;
}
.label {
  color: #6b7280;
  font-weight: 500;
}
.value {
  font-weight: 600;
  color: #1f2937;
}
.value.result {
  color: #16a34a;
  font-weight: 700;
}
.deadline-countdown {
  margin-top: 1rem;
  text-align: center;
}
.countdown-time {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: #ef4444;
}

/* ベットヒントメッセージ */
.bet-hint {
  color: #ef4444;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  text-align: center;
}
