/* GAMMA Theme - Modern Dark UI */

:root {
  /* Primary colors */
  --primary: #00d4ff;
  --primary-dim: rgba(0, 212, 255, 0.15);
  --secondary: #a855f7;
  --secondary-dim: rgba(168, 85, 247, 0.15);

  /* Status colors */
  --success: #22c55e;
  --success-dim: rgba(34, 197, 94, 0.15);
  --warning: #f59e0b;
  --warning-dim: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;
  --danger-dim: rgba(239, 68, 68, 0.15);

  /* Background layers */
  --bg-base: #0c0c0f;
  --bg-surface: #14141a;
  --bg-elevated: #1c1c24;
  --bg-hover: #24242e;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.2);

  /* Text */
  --text-primary: #f1f1f4;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);

  /* Layout */
  --sidebar-width: 280px;
  --header-height: 60px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* Container */
.gamma-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-md);
}

/* Game Panel Layout */
.gamma-game-panel {
  display: grid;
  grid-template-areas:
    "header header sidebar"
    "main main sidebar"
    "footer footer sidebar";
  grid-template-columns: 1fr auto var(--sidebar-width);
  grid-template-rows: auto 1fr auto;
  min-height: calc(100vh - var(--space-xl));
  gap: var(--space-md);
  background: var(--bg-surface);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

/* Header */
.game-header {
  grid-area: header;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.game-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

.model-badge {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-surface);
  padding: var(--space-xs) var(--space-sm);
  border-radius: 4px;
  font-family: var(--font-mono);
}

.header-center {
  display: flex;
  justify-content: center;
}

.round-pill, .score-pill {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--bg-surface);
  padding: var(--space-sm) var(--space-md);
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
}

.round-label, .score-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.round-num, .score {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
  font-family: var(--font-mono);
}

.round-separator {
  color: var(--text-muted);
}

.max-rounds {
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.streak-indicator {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--warning-dim);
  padding: var(--space-xs) var(--space-sm);
  border-radius: 12px;
  animation: pulse-glow 1.5s ease-in-out infinite;
}

.streak-fire {
  font-size: 16px;
}

.streak-count {
  font-weight: 600;
  color: var(--warning);
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  50% { box-shadow: 0 0 12px 2px rgba(245, 158, 11, 0.3); }
}

/* Main Area */
.game-main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  padding: var(--space-lg);
  overflow-y: auto;
}

/* Section Headers */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.section-header h2 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin: 0;
}

.keyboard-hint, .prob-hint {
  font-size: 12px;
  color: var(--text-muted);
}

/* Context Section */
.context-section {
  background: var(--bg-elevated);
  border-radius: 8px;
  padding: var(--space-md);
  border: 1px solid var(--border-subtle);
}

.attention-badge {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 11px;
  padding: var(--space-xs) var(--space-sm);
  border-radius: 4px;
  transition: var(--transition-fast);
  cursor: help;
  position: relative;
}

.attention-badge::after {
  content: attr(title);
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: normal;
  width: 250px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-fast), visibility var(--transition-fast);
  z-index: 100;
  pointer-events: none;
  line-height: 1.4;
}

.attention-badge:hover::after {
  opacity: 1;
  visibility: visible;
}

.attention-badge.real {
  background: var(--success-dim);
  color: var(--success);
}

.attention-badge.synthetic {
  background: var(--warning-dim);
  color: var(--warning);
}

.attention-icon {
  font-size: 12px;
}

.context-display {
  min-height: 60px;
}

.context-text {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  line-height: 1.4;
  align-items: flex-end;
}

.attn-token-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.attn-token {
  display: inline-block;
  padding: var(--space-xs) var(--space-sm);
  border-radius: 4px;
  font-family: var(--font-mono);
  transition: transform var(--transition-fast);
  cursor: default;
}

.attn-token:hover {
  transform: scale(1.05);
}

.attn-value {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  text-shadow:
    -0.5px -0.5px 0 rgba(255,255,255,0.3),
    0.5px -0.5px 0 rgba(255,255,255,0.3),
    -0.5px 0.5px 0 rgba(255,255,255,0.3),
    0.5px 0.5px 0 rgba(255,255,255,0.3);
  opacity: 0.9;
}

/* Choices Section */
.choices-section {
  flex: 1;
}

.choices-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.choice-btn {
  display: flex;
  align-items: stretch;
  background: var(--bg-elevated);
  border: 2px solid var(--border-default);
  border-radius: 12px;
  padding: 0;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
  color: var(--text-primary);
  overflow: hidden;
}

.choice-btn:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--bg-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.choice-btn.keyboard-selected {
  border-color: var(--secondary);
  background: var(--secondary-dim);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
}

.choice-btn.correct {
  border-color: var(--success);
  background: var(--success-dim);
}

.choice-btn.incorrect {
  border-color: var(--danger);
  background: var(--danger-dim);
}

.choice-btn:disabled {
  cursor: default;
}

.choice-key {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  padding: var(--space-md);
  background: rgba(0, 0, 0, 0.2);
  border-right: 1px solid var(--border-subtle);
}

.choice-number {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-mono);
}

.choice-letter {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.choice-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-md);
}

.choice-text {
  font-size: 18px;
  font-family: var(--font-mono);
  word-break: break-word;
}

.choice-prob-bar {
  position: relative;
  height: 6px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
  margin-top: var(--space-sm);
  overflow: hidden;
}

.prob-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 3px;
  transition: width var(--transition-normal);
}

.prob-value {
  position: absolute;
  right: 0;
  top: -18px;
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

/* Result Display */
.result-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-lg);
  border-radius: 12px;
  animation: slide-in 0.3s ease;
}

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

.result-display.correct {
  background: var(--success-dim);
  border: 1px solid var(--success);
}

.result-display.incorrect {
  background: var(--danger-dim);
  border: 1px solid var(--danger);
}

.result-icon {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.result-display.correct .result-icon {
  color: var(--success);
}

.result-display.incorrect .result-icon {
  color: var(--danger);
}

.result-text {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.result-explanation {
  font-size: 14px;
  color: var(--text-secondary);
}

.result-explanation strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
}

/* Probability Section */
.probability-section {
  background: var(--bg-elevated);
  border-radius: 8px;
  padding: var(--space-md);
  border: 1px solid var(--border-subtle);
}

.probability-chart {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.prob-bar-row {
  display: grid;
  grid-template-columns: 30px 100px 1fr 50px;
  align-items: center;
  gap: var(--space-sm);
  animation: fade-in-row 0.3s ease forwards;
  animation-delay: calc(var(--rank) * 50ms);
  opacity: 0;
}

@keyframes fade-in-row {
  to { opacity: 1; }
}

.prob-rank {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.prob-token {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prob-bar {
  height: 8px;
  background: var(--bg-surface);
  border-radius: 4px;
  overflow: hidden;
}

.prob-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 4px;
  transition: width 0.5s ease;
}

.prob-percent {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  text-align: right;
}

.prob-bar-row.was-choice {
  background: var(--primary-dim);
  padding: var(--space-xs);
  border-radius: 4px;
  margin: -var(--space-xs);
}

/* Sidebar */
.game-sidebar {
  grid-area: sidebar;
  background: var(--bg-elevated);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  transition: width var(--transition-normal), opacity var(--transition-normal);
  overflow: hidden;
}

.game-sidebar.collapsed {
  width: 40px;
}

.game-sidebar.collapsed .attention-heatmap-container,
.game-sidebar.collapsed .heatmap-legend,
.game-sidebar.collapsed .sidebar-header h3 {
  opacity: 0;
  visibility: hidden;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-header h3 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin: 0;
  white-space: nowrap;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-xs);
  transition: var(--transition-fast);
}

.sidebar-toggle:hover {
  color: var(--text-primary);
}

.game-sidebar.collapsed .sidebar-toggle {
  transform: rotate(180deg);
}

.attention-heatmap-container {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md);
}

.attention-heatmap {
  min-height: 100px;
}

.heatmap-empty {
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
  padding: var(--space-lg);
}

.heatmap-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.heatmap-row {
  display: flex;
  align-items: center;
  gap: 2px;
}

.heatmap-round-label {
  font-size: 10px;
  color: var(--text-muted);
  width: 24px;
  flex-shrink: 0;
}

.heatmap-cell {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  transition: transform var(--transition-fast);
}

.heatmap-cell:hover {
  transform: scale(1.3);
  z-index: 1;
}

.heatmap-synthetic-indicator {
  font-size: 10px;
  color: var(--warning);
  margin-left: var(--space-xs);
}

.heatmap-scroll-hint {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  padding: var(--space-sm);
}

.heatmap-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  border-top: 1px solid var(--border-subtle);
}

.legend-low, .legend-high {
  font-size: 10px;
  color: var(--text-muted);
}

.legend-gradient {
  width: 100px;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg,
    rgb(68, 1, 84),
    rgb(59, 82, 139),
    rgb(33, 144, 140),
    rgb(93, 201, 99),
    rgb(253, 231, 37)
  );
}

/* Footer */
.game-footer {
  grid-area: footer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-subtle);
}

.footer-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.footer-hint kbd {
  background: var(--bg-surface);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-default);
  font-family: var(--font-mono);
  font-size: 11px;
}

/* Buttons */
.btn {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  padding: var(--space-sm) var(--space-lg);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Loading Screen */
.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  padding: var(--space-xl);
}

.loading-content {
  text-align: center;
  width: 100%;
  max-width: 400px;
}

.loading-stage {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.loading-progress-bar {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--primary);
  letter-spacing: 2px;
}

.loading-percent {
  font-size: 36px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: var(--space-md) 0;
}

.loading-size {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.loading-steps {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
}

.loading-steps span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: var(--space-sm) var(--space-md);
  border-radius: 20px;
  border: 1px solid var(--border-default);
  color: var(--text-muted);
}

.loading-steps span.pending {
  opacity: 0.5;
}

.loading-steps span.active {
  color: var(--primary);
  border-color: var(--primary);
  animation: pulse-border 1.5s ease infinite;
}

.loading-steps span.done {
  color: var(--success);
  border-color: var(--success);
}

@keyframes pulse-border {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.4); }
  50% { box-shadow: 0 0 10px 2px rgba(0, 212, 255, 0.2); }
}

/* Model Selector */
.model-selector {
  padding: var(--space-lg);
  max-width: 900px;
  margin: 0 auto;
}

.start-section {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-xl);
}

.start-section.top {
  padding: var(--space-lg);
  background: var(--bg-elevated);
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  margin-bottom: var(--space-lg);
}

.start-game-btn {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 1px;
  padding: var(--space-md) var(--space-xl);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: var(--shadow-md), 0 4px 20px rgba(0, 212, 255, 0.2);
  transition: all var(--transition-fast);
  min-width: 220px;
  position: relative;
  overflow: hidden;
}

.start-game-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.start-game-btn:hover::before {
  left: 100%;
}

.start-game-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-lg), 0 8px 30px rgba(0, 212, 255, 0.4);
}

.start-game-btn:active {
  transform: translateY(-1px) scale(1);
}

.section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--primary);
  margin: 0 0 var(--space-md) 0;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.section-title::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 12px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 2px;
}

.prompt-section {
  background: var(--bg-elevated);
  border-radius: 12px;
  padding: var(--space-lg);
  border: 1px solid var(--border-subtle);
  margin-bottom: var(--space-lg);
  transition: all var(--transition-fast);
}

.prompt-section:hover {
  border-color: var(--border-default);
}

.prompt-section:focus-within {
  border-color: var(--primary);
  box-shadow: var(--shadow-md), 0 0 0 1px var(--primary-dim);
}

.prompt-controls {
  display: flex;
  gap: var(--space-md);
  align-items: stretch;
  flex-wrap: wrap;
}

.prompt-input {
  flex: 1;
  min-width: 200px;
  background: var(--bg-surface);
  border: 2px solid var(--border-default);
  border-radius: 10px;
  padding: var(--space-md) var(--space-lg);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 15px;
  transition: all var(--transition-fast);
}

.prompt-input:hover {
  border-color: var(--border-strong);
  background: var(--bg-hover);
}

.prompt-input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px var(--primary-dim), inset 0 0 20px rgba(0, 212, 255, 0.03);
}

.prompt-input::placeholder {
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-style: italic;
}

.random-prompt-btn {
  background: var(--bg-surface);
  border: 2px solid var(--border-default);
  color: var(--text-secondary);
  padding: var(--space-md) var(--space-lg);
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  white-space: nowrap;
}

.random-prompt-btn::before {
  content: '♺';
  font-size: 14px;
  margin-right: 2px;
}

.random-prompt-btn:hover {
  background: var(--secondary-dim);
  border-color: var(--secondary);
  color: var(--secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.random-prompt-btn:active {
  transform: translateY(0);
}

.prompt-select {
  background: var(--bg-surface);
  border: 2px solid var(--border-default);
  border-radius: 10px;
  padding: var(--space-md) var(--space-xl) var(--space-md) var(--space-lg);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 14px;
  cursor: pointer;
  min-width: 160px;
  transition: all var(--transition-fast);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2371717a' d='M3 4l3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.prompt-select:hover {
  border-color: var(--primary);
  background-color: var(--bg-hover);
  color: var(--text-primary);
}

.prompt-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-dim);
}

.prompt-select option {
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: var(--space-sm);
}

.model-section {
  margin-bottom: var(--space-lg);
}

.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
}

.model-card {
  background: var(--bg-elevated);
  border: 2px solid var(--border-default);
  border-radius: 12px;
  padding: var(--space-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.model-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.model-card.selected {
  border-color: var(--primary);
  background: var(--primary-dim);
}

.model-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.model-specs {
  font-size: 13px;
  color: var(--text-secondary);
}

.provider-badge {
  font-size: 10px;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--secondary-dim);
  color: var(--secondary);
}

/* Utility Classes */
.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 1200px) {
  .gamma-game-panel {
    grid-template-areas:
      "header header"
      "main sidebar"
      "footer footer";
    grid-template-columns: 1fr 200px;
  }

  :root {
    --sidebar-width: 200px;
  }
}

@media (max-width: 900px) {
  .gamma-game-panel {
    grid-template-areas:
      "header"
      "main"
      "footer";
    grid-template-columns: 1fr;
  }

  .game-sidebar {
    display: none;
  }

  .choices-grid {
    grid-template-columns: 1fr;
  }

  .game-header {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  .header-center {
    order: 3;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .gamma-container {
    padding: var(--space-sm);
  }

  .game-main {
    padding: var(--space-md);
  }

  .choice-text {
    font-size: 16px;
  }
}

/* Settings Panel */
.settings-panel {
  background: var(--bg-elevated);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  margin-bottom: var(--space-lg);
  overflow: hidden;
  transition: box-shadow var(--transition-normal);
}

.settings-panel:hover {
  border-color: var(--border-default);
}

.settings-panel.expanded {
  border-color: var(--border-default);
  box-shadow: var(--shadow-md);
}

.settings-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: var(--font-sans);
  font-size: 14px;
}

.settings-toggle:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.settings-toggle:hover .settings-icon {
  transform: rotate(15deg);
}

.settings-icon {
  font-size: 18px;
  transition: transform var(--transition-fast);
}

.settings-label {
  flex: 1;
  text-align: left;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.settings-chevron {
  font-size: 10px;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.settings-panel.expanded .settings-chevron {
  transform: rotate(90deg);
}

.settings-panel.expanded .settings-toggle {
  background: var(--bg-hover);
  border-bottom: 1px solid var(--border-subtle);
}

.settings-content {
  padding: var(--space-md) var(--space-lg) var(--space-lg);
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.settings-section {
  padding: var(--space-md) 0;
}

.settings-section.quick-settings {
  background: var(--bg-surface);
  border-radius: 8px;
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

.settings-section:not(:last-child):not(.quick-settings) {
  border-bottom: 1px solid var(--border-subtle);
}

.settings-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--primary);
  margin: 0 0 var(--space-md) 0;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.settings-section-title::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 12px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 2px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  padding: var(--space-sm);
  border-radius: 6px;
  transition: background var(--transition-fast);
}

.setting-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.setting-row:last-child {
  margin-bottom: 0;
}

.setting-row label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  cursor: pointer;
}

.setting-name {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.setting-hint {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

.setting-control {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.setting-control input[type="range"] {
  width: 120px;
  height: 6px;
  appearance: none;
  background: linear-gradient(to right, var(--primary) 0%, var(--bg-surface) 0%);
  border-radius: 3px;
  cursor: pointer;
  outline: none;
}

.setting-control input[type="range"]:focus {
  box-shadow: 0 0 0 2px var(--primary-dim);
}

.setting-control input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-sm), 0 0 0 2px var(--bg-elevated);
  transition: all var(--transition-fast);
}

.setting-control input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: var(--shadow-md), 0 0 8px rgba(0, 212, 255, 0.4);
}

.setting-control input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--bg-elevated);
}

.setting-control input[type="range"]::-moz-range-track {
  background: var(--bg-surface);
  height: 6px;
  border-radius: 3px;
}

.setting-value {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--primary);
  min-width: 40px;
  text-align: right;
  font-weight: 600;
  background: var(--primary-dim);
  padding: 2px 8px;
  border-radius: 4px;
}

.setting-control select {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  padding: var(--space-sm) var(--space-lg) var(--space-sm) var(--space-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  cursor: pointer;
  min-width: 140px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2371717a' d='M3 4l3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: all var(--transition-fast);
}

.setting-control select:hover {
  border-color: var(--primary);
  background-color: var(--bg-hover);
}

.setting-control select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-dim);
}

.setting-control select option {
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: var(--space-sm);
}

/* Checkbox rows */
.checkbox-row {
  flex-direction: row;
}

.checkbox-row input[type="checkbox"] {
  appearance: none;
  width: 44px;
  height: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.checkbox-row input[type="checkbox"]:hover {
  border-color: var(--border-strong);
}

.checkbox-row input[type="checkbox"]:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-dim);
}

.checkbox-row input[type="checkbox"]::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.checkbox-row input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: transparent;
}

.checkbox-row input[type="checkbox"]:checked::after {
  background: white;
  transform: translateX(20px);
  box-shadow: var(--shadow-md);
}

/* Advanced settings collapsible */
.advanced-settings,
.display-settings {
  border: none;
  padding: 0;
  margin-top: var(--space-sm);
}

.advanced-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  list-style: none;
  color: var(--text-secondary);
  font-size: 13px;
  background: var(--bg-surface);
  border-radius: 8px;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.advanced-toggle:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

details[open] .advanced-toggle {
  background: var(--bg-hover);
  border-color: var(--border-subtle);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.advanced-toggle::-webkit-details-marker {
  display: none;
}

.advanced-toggle::before {
  content: '▶';
  font-size: 8px;
  margin-right: var(--space-sm);
  transition: transform var(--transition-fast);
  color: var(--primary);
}

details[open] .advanced-toggle::before {
  transform: rotate(90deg);
}

.advanced-hint {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.advanced-content {
  padding: var(--space-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-top: none;
  border-radius: 0 0 8px 8px;
  margin-bottom: var(--space-sm);
}

/* Sampling presets */
.sampling-presets {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.presets-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.preset-btn {
  padding: var(--space-xs) var(--space-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  color: var(--text-secondary);
  font-size: 11px;
  font-family: var(--font-sans);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.preset-btn:hover {
  background: var(--primary-dim);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.preset-btn:active {
  transform: translateY(0);
}

/* Settings actions */
.settings-actions {
  padding-top: var(--space-lg);
  margin-top: var(--space-md);
  display: flex;
  justify-content: center;
}

.btn-secondary {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  padding: var(--space-sm) var(--space-lg);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background: var(--danger-dim);
  border-color: var(--danger);
  color: var(--danger);
}

.reset-settings-btn::before {
  content: '↺ ';
}

/* High contrast mode */
body.high-contrast {
  --primary: #00ffff;
  --secondary: #ff00ff;
  --success: #00ff00;
  --warning: #ffff00;
  --danger: #ff0000;
  --text-primary: #ffffff;
  --text-secondary: #cccccc;
  --border-default: rgba(255, 255, 255, 0.3);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-surface);
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
