/* Snake Theory AI Lab — unified with FinHub tokens */
body {
  background: linear-gradient(135deg, #121212 0%, #1f1f1f 100%);
  min-height: 100vh;
}

.snake-lab-hero {
  text-align: center;
  padding: 1rem 1rem 0;
  color: #fff;
}

.snake-lab-hero h1 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.snake-lab-hero p {
  margin: 0 auto 1rem;
  max-width: 640px;
  font-size: 0.95rem;
  color: #d1d5db;
  line-height: 1.5;
}

.lab-game-container {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  padding: 1.25rem;
  margin: 0 auto max(2rem, env(safe-area-inset-bottom, 0px));
  max-width: 560px;
  width: calc(100% - 2rem);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lab-primary-actions .desktop-hint,
.lab-primary-actions .mobile-hint {
  width: 100%;
  text-align: center;
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: #6b7280;
}

.lab-game-container .duel-panel {
  order: 0;
  width: 100%;
}

.lab-board-block {
  order: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lab-primary-actions {
  order: 2;
  width: 100%;
}

.lab-expert {
  order: 3;
  width: 100%;
}

#game-board-wrap {
  margin-bottom: 1rem;
  padding: 10px;
  border: 2px solid rgba(37, 99, 235, 0.25);
  border-radius: 10px;
  background: #f9fafb;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  overflow: visible;
}

#snake-canvas {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.game-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.5rem;
  margin: 0.75rem 0;
  font-size: 0.95rem;
  color: var(--snake-muted);
  width: 100%;
}

.stat-value {
  font-weight: bold;
  color: var(--snake-primary);
  font-size: 1.1rem;
}

.traffic-lights {
  display: flex;
  gap: 10px;
  margin: 0.5rem 0;
}

.traffic-lights .light {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #9ca3af;
  border: 2px solid #374151;
}

.game-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 0.75rem 0;
  width: 100%;
}

.control-btn {
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  background: var(--snake-primary);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.control-btn:hover {
  background: var(--snake-primary-dark);
  transform: translateY(-1px);
}

.control-btn:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}

.control-btn.secondary { background: #6b7280; }
.control-btn.secondary:hover { background: #4b5563; }
.control-btn.success { background: #059669; }
.control-btn.success:hover { background: #047857; }

.status-message {
  text-align: center;
  margin: 0.5rem 0;
  padding: 0.75rem;
  border-radius: 8px;
  font-weight: 500;
  min-height: 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

.status-message.success { background: #d1fae5; color: #065f46; }
.status-message.error { background: #fef3c7; color: #92400e; }
.status-message.info { background: #dbeafe; color: #1e40af; }

.ai-controls {
  padding: 1rem;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  margin-top: 0.75rem;
}

.ai-controls h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--snake-text);
}

.model-selector {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.model-option {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid transparent;
}

.model-option:has(input:checked) {
  background: rgba(37, 99, 235, 0.06);
  border-color: #93c5fd;
}

.model-option label {
  cursor: pointer;
  line-height: 1.4;
}

.model-option .model-hint {
  display: block;
  font-size: 0.8rem;
  color: var(--snake-muted);
  font-weight: normal;
}

.model-option.advanced-only {
  opacity: 0.85;
}

.curriculum-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.75rem;
}

.curriculum-level {
  padding: 0.35rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}

.ai-decision-log-compact {
  width: 100%;
  margin: 0.5rem 0;
}

.ai-decision-log-compact summary {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  padding: 0.5rem 0;
}

.duel-leaderboard .empty {
  font-style: italic;
  color: #6b7280;
  justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
  .snake-shake { animation: none !important; }
  .control-btn:hover { transform: none; }
}
