/* Faceoff — Null Agency Brand System */
/* Deep Ink #0F1923 · Signal Green #00FFB4 */
/* JetBrains Mono (headings/code) · Inter (body) */

:root {
  --ink: #0A0E14;
  --ink-1: #0F1923;
  --ink-2: #162230;
  --ink-3: #1E2D3D;
  --ink-4: #253748;
  --green: #00FFB4;
  --green-dim: #00D99A;
  --green-glow: rgba(0, 255, 180, 0.12);
  --green-subtle: rgba(0, 255, 180, 0.06);
  --text-1: #E8ECF1;
  --text-2: #A0B0C0;
  --text-3: #6B7D8D;
  --text-4: #4A5A6A;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(0, 255, 180, 0.2);
  --error: #FF6B6B;
  --warn: #FFB84D;
  --anthropic: #D4A574;
  --openai: #74AA9C;
  --gemini: #8B9CF7;
  --groq: #F97316;
  --mistral: #FF7000;
  --xai: #1DA1F2;
  --deepseek: #4D6BFE;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--ink);
  color: var(--text-1);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--green); color: var(--ink); }

/* ═══════════════ NAV ═══════════════ */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(10, 14, 20, 0.85);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
}

.null-symbol { color: var(--green); font-size: 18px; }
.nav-sep { color: var(--text-4); }
.nav-product { color: var(--text-2); letter-spacing: 0.02em; }

.nav-right { display: flex; align-items: center; gap: 8px; }

.nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--text-3);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.nav-btn:hover { border-color: var(--border-hover); color: var(--text-1); }
.nav-btn.active { border-color: var(--green); color: var(--green); background: var(--green-subtle); }

.key-badge {
  background: var(--green);
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
  min-width: 16px;
  text-align: center;
}

/* ═══════════════ BUTTONS ═══════════════ */

.btn-primary {
  background: var(--green);
  color: var(--ink);
  border: none;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover:not(:disabled) { background: var(--green-dim); transform: translateY(-1px); box-shadow: 0 4px 20px var(--green-glow); }
.btn-primary:active:not(:disabled) { transform: translateY(0.5px); }
.btn-primary:disabled { opacity: 0.35; cursor: not-allowed; }

.btn-outline {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-outline:hover { border-color: var(--border-hover); color: var(--green); }

.btn-ghost {
  background: transparent;
  color: var(--text-3);
  border: none;
  padding: 8px 12px;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
  transition: color 0.2s;
}

.btn-ghost:hover { color: var(--text-1); }

.btn-small { padding: 4px 10px; font-size: 11px; }

.link-btn {
  background: none;
  border: none;
  color: var(--green);
  font-family: var(--sans);
  font-size: inherit;
  cursor: pointer;
  text-decoration: none;
}

.link-btn:hover { text-decoration: underline; }

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════ HERO ═══════════════ */

.hero {
  text-align: center;
  padding: 56px 24px 24px;
  animation: fadeIn 0.6s var(--ease-out);
}

.hero h1 {
  font-family: var(--mono);
  font-size: clamp(26px, 5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 12px;
}

.accent { color: var(--green); }

.subtitle { color: var(--text-3); font-size: 16px; font-weight: 400; }

/* ═══════════════ MODEL PICKER ═══════════════ */

.picker-section {
  padding: 0 24px 16px;
  max-width: 900px;
  margin: 0 auto;
}

.picker-container {
  background: var(--ink-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.picker-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}

.picker-header h2 {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
}

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

.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}

.model-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--ink-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  user-select: none;
}

.model-chip:hover:not(.disabled) {
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.model-chip.selected {
  border-color: var(--green);
  background: var(--green-subtle);
  box-shadow: 0 0 16px var(--green-glow);
}

.model-chip.selected .chip-number {
  opacity: 1;
}

.model-chip.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.chip-info {
  flex: 1;
  min-width: 0;
}

.chip-name {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip-provider {
  font-size: 10px;
  color: var(--text-4);
}

.chip-free {
  font-size: 9px;
  font-family: var(--mono);
  color: var(--green);
  opacity: 0.7;
}

.chip-number {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 255, 180, 0.15);
  opacity: 0;
  transition: opacity 0.15s;
  flex-shrink: 0;
}

.no-keys-msg {
  text-align: center;
  padding: 20px;
  color: var(--text-3);
  font-size: 14px;
}

.free-hint {
  font-size: 12px;
  color: var(--text-4);
  margin-top: 8px;
}

.free-hint strong { color: var(--green); font-weight: 600; }

/* ═══════════════ PROMPT ═══════════════ */

.prompt-section {
  padding: 12px 24px 24px;
  max-width: 900px;
  margin: 0 auto;
}

.prompt-container {
  background: var(--ink-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.3s var(--ease-out);
}

.prompt-container:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 1px var(--green-glow);
}

.prompt-top {
  padding: 8px 14px 0;
}

.system-toggle {
  background: none;
  border: none;
  color: var(--text-4);
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.2s;
}

.system-toggle:hover { color: var(--text-2); }
.system-toggle.active { color: var(--green); }

.system-row {
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
}

.system-row textarea {
  width: 100%;
  background: transparent;
  color: var(--text-2);
  border: none;
  padding: 8px 0;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  resize: none;
  outline: none;
}

.system-row textarea::placeholder { color: var(--text-4); }

#prompt {
  width: 100%;
  background: transparent;
  color: var(--text-1);
  border: none;
  padding: 14px;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  resize: none;
  min-height: 48px;
  max-height: 300px;
  overflow-y: auto;
  outline: none;
  field-sizing: content;
}

#prompt::placeholder { color: var(--text-4); }

/* ═══════════════ PROMPT SUGGESTIONS ═══════════════ */

.prompt-suggestions {
  display: flex;
  gap: 6px;
  padding: 0 14px 10px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.prompt-suggestions::-webkit-scrollbar { display: none; }

.prompt-suggestions.hidden { display: none; }

.suggestion-chip {
  background: var(--ink-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s var(--ease-out);
}

.suggestion-chip:hover {
  border-color: var(--border-hover);
  color: var(--green);
  background: var(--green-subtle);
}

.prompt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px 10px 14px;
}

.prompt-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

#char-count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-4);
}

.prompt-shortcut {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-4);
  background: var(--ink-3);
  padding: 2px 6px;
  border-radius: 4px;
}

.prompt-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ═══════════════ SESSION BAR ═══════════════ */

.session-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 900px;
  margin: 0 auto 16px;
  padding: 10px 20px;
  background: var(--green-subtle);
  border: 1px solid rgba(0, 255, 180, 0.12);
  border-radius: var(--radius);
  animation: slideDown 0.3s var(--ease-spring);
}

.session-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--green);
}

.session-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease infinite;
}

.session-count { color: var(--text-3); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ═══════════════ ARENA ═══════════════ */

.arena {
  padding: 0 24px 32px;
  max-width: 1400px;
  margin: 0 auto;
}

.arena-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0 16px;
  gap: 16px;
}

.arena-timer {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text-4);
  transition: color 0.3s;
}

.arena-timer.active { color: var(--green); }

.new-comparison-btn {
  margin-left: auto;
}

/* ═══════════════ ARENA EMPTY STATE ═══════════════ */

.arena-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 24px;
  animation: fadeIn 0.6s var(--ease-out);
}

.arena-empty-illustration {
  position: relative;
  width: 160px;
  height: 160px;
  margin-bottom: 24px;
}

.arena-empty-orb {
  position: absolute;
  border-radius: 50%;
  opacity: 0.5;
  filter: blur(1px);
}

.arena-empty-orb-1 {
  width: 48px;
  height: 48px;
  background: radial-gradient(circle, var(--anthropic), transparent);
  top: 20px;
  left: 10px;
  animation: orb1Float 4s ease-in-out infinite;
}

.arena-empty-orb-2 {
  width: 40px;
  height: 40px;
  background: radial-gradient(circle, var(--openai), transparent);
  top: 10px;
  right: 15px;
  animation: orb2Float 4.5s ease-in-out infinite 0.5s;
}

.arena-empty-orb-3 {
  width: 44px;
  height: 44px;
  background: radial-gradient(circle, var(--gemini), transparent);
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  animation: orb3Float 5s ease-in-out infinite 1s;
}

.arena-empty-versus {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--green);
  opacity: 0.3;
  animation: vsPulse 3s ease-in-out infinite;
}

@keyframes orb1Float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(12px, -8px); }
}

@keyframes orb2Float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-10px, 10px); }
}

@keyframes orb3Float {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -12px); }
}

@keyframes vsPulse {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.4; }
}

.arena-empty-text {
  font-size: 14px;
  color: var(--text-4);
  text-align: center;
  max-width: 320px;
}

/* ═══════════════ MOBILE TAB BAR ═══════════════ */

.mobile-tab-bar {
  display: none;
}

@media (max-width: 768px) {
  .mobile-tab-bar {
    display: flex;
    gap: 4px;
    padding: 0 0 12px;
    overflow-x: auto;
    scrollbar-width: none;
    position: sticky;
    top: 56px;
    z-index: 50;
    background: var(--ink);
    padding-top: 8px;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-tab-bar::-webkit-scrollbar { display: none; }
}

.mobile-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--ink-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s var(--ease-out);
}

.mobile-tab.active {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-subtle);
}

.mobile-tab .provider-dot {
  width: 6px;
  height: 6px;
}

.arena-columns {
  display: grid;
  gap: 12px;
}

.arena-columns.cols-2 { grid-template-columns: repeat(2, 1fr); }
.arena-columns.cols-3 { grid-template-columns: repeat(3, 1fr); }
.arena-columns.cols-4 { grid-template-columns: repeat(2, 1fr); }

/* Response Column */
.response-col {
  background: var(--ink-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(16px);
  animation: colEnter 0.4s var(--ease-spring) forwards;
}

.response-col:nth-child(1) { animation-delay: 0s; }
.response-col:nth-child(2) { animation-delay: 0.06s; }
.response-col:nth-child(3) { animation-delay: 0.12s; }
.response-col:nth-child(4) { animation-delay: 0.18s; }

@keyframes colEnter {
  to { opacity: 1; transform: translateY(0); }
}

.response-col.streaming {
  border-color: rgba(255, 255, 255, 0.08);
}

.response-col.complete {
  border-color: var(--border);
}

/* Completion pulse */
.response-col.complete-pulse {
  animation: completePulse 0.6s var(--ease-out);
}

@keyframes completePulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 255, 180, 0.3); }
  50% { box-shadow: 0 0 20px 4px rgba(0, 255, 180, 0.15); }
  100% { box-shadow: none; }
}

.response-col.winner {
  border-color: var(--green);
  box-shadow: 0 0 24px var(--green-glow);
  animation: winnerPulse 0.5s var(--ease-spring);
}

@keyframes winnerPulse {
  0% { box-shadow: 0 0 0 var(--green-glow); }
  50% { box-shadow: 0 0 40px var(--green-glow); }
  100% { box-shadow: 0 0 24px var(--green-glow); }
}

.response-col.error {
  border-color: rgba(255, 107, 107, 0.2);
}

.response-col.error .col-body {
  color: var(--error);
  font-family: var(--mono);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  min-height: 42px;
}

.col-model {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
}

.col-model.blind {
  color: var(--text-3);
  font-style: italic;
}

/* Winner trophy indicator */
.col-trophy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 255, 180, 0.15);
  flex-shrink: 0;
  opacity: 0;
  transform: scale(0);
  transition: all 0.4s var(--ease-spring);
}

.col-trophy.visible {
  opacity: 1;
  transform: scale(1);
}

.col-trophy svg {
  width: 12px;
  height: 12px;
}

.provider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-anthropic { background: var(--anthropic); }
.dot-openai { background: var(--openai); }
.dot-gemini { background: var(--gemini); }
.dot-groq { background: var(--groq); }
.dot-mistral { background: var(--mistral); }
.dot-xai { background: var(--xai); }
.dot-deepseek { background: var(--deepseek); }

.col-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.col-status {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-4);
}

.col-status.streaming { color: var(--green); }
.col-status.complete { color: var(--text-3); }
.col-status.error { color: var(--error); }
.col-status.thinking { color: var(--warn); }

/* Thinking indicator for reasoning models */
.thinking-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--warn);
  animation: thinkPulse 1.5s ease-in-out infinite;
}

.thinking-dots span {
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--warn);
  animation: dotBounce 1.4s ease-in-out infinite;
}

.thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes thinkPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes dotBounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-3px); }
}

.copy-btn {
  background: none;
  border: none;
  color: var(--text-4);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s;
  display: flex;
}

.copy-btn:hover { color: var(--text-1); }
.copy-btn.copied { color: var(--green); }

.col-body {
  padding: 14px;
  flex: 1;
  font-size: 14px;
  line-height: 1.75;
  overflow-y: auto;
  max-height: 600px;
  min-height: 100px;
}

/* Shimmer loading state */
.col-body.loading::before {
  content: '';
  display: block;
  height: 12px;
  width: 60%;
  background: linear-gradient(90deg, var(--ink-2) 25%, var(--ink-3) 50%, var(--ink-2) 75%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: shimmer 1.5s ease infinite;
  margin-bottom: 10px;
}

.col-body.loading::after {
  content: '';
  display: block;
  height: 12px;
  width: 40%;
  background: linear-gradient(90deg, var(--ink-2) 25%, var(--ink-3) 50%, var(--ink-2) 75%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: shimmer 1.5s ease 0.15s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Thinking loading state */
.col-body .thinking-block {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  margin-bottom: 12px;
  background: rgba(255, 184, 77, 0.06);
  border: 1px solid rgba(255, 184, 77, 0.12);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--warn);
}

.thinking-block .thinking-dots {
  display: flex;
  gap: 2px;
}

.cursor-blink {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--green);
  animation: blink 0.7s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 1px;
}

@keyframes blink { 50% { opacity: 0; } }

/* Markdown rendering in responses */
.col-body p { margin-bottom: 0.75em; }
.col-body p:last-child { margin-bottom: 0; }
.col-body strong { font-weight: 600; color: var(--text-1); }
.col-body em { font-style: italic; color: var(--text-2); }
.col-body code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--ink-3);
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--green);
}
.col-body pre {
  background: var(--ink-3);
  padding: 12px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 0.75em 0;
  font-size: 13px;
}
.col-body pre code {
  background: none;
  padding: 0;
}
.col-body ul, .col-body ol { padding-left: 1.5em; margin: 0.5em 0; }
.col-body li { margin: 0.25em 0; }
.col-body h1, .col-body h2, .col-body h3 {
  font-family: var(--mono);
  margin: 1em 0 0.5em;
  font-size: 1em;
  font-weight: 600;
  color: var(--text-1);
}
.col-body blockquote {
  border-left: 2px solid var(--green);
  padding-left: 12px;
  color: var(--text-2);
  margin: 0.75em 0;
}

/* Tables */
.col-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75em 0;
  font-size: 13px;
}

.col-body th, .col-body td {
  border: 1px solid var(--border);
  padding: 6px 10px;
  text-align: left;
}

.col-body th {
  background: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
}

.col-body td {
  color: var(--text-1);
}

.col-body tr:nth-child(even) td {
  background: var(--ink-2);
}

/* Horizontal rules */
.col-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1em 0;
}

.col-metrics {
  display: flex;
  gap: 12px;
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-4);
  flex-wrap: wrap;
}

.metric-val { color: var(--text-3); }

.first-badge {
  font-size: 9px;
  color: var(--green);
  border: 1px solid rgba(0, 255, 180, 0.2);
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: auto;
}

/* ═══════════════ INLINE PICK WINNER ═══════════════ */

.pick-winner-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  color: var(--green);
  border: none;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  user-select: none;
}

.pick-winner-btn:hover {
  background: var(--green-subtle);
  color: var(--green);
}

.pick-winner-btn:active {
  background: rgba(0, 255, 180, 0.15);
}

.pick-winner-btn .pick-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
}

.pick-winner-btn.picked {
  background: rgba(0, 255, 180, 0.1);
  color: var(--green);
  pointer-events: none;
}

.pick-winner-btn.picked .pick-label::after {
  content: '';
}

/* Rank badge shown on the pick button after clicking (3-4 model mode) */
.pick-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 255, 180, 0.15);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 11px;
  color: var(--green);
}

/* Winner column glow */
.response-col.pick-winner {
  border-color: var(--green) !important;
  box-shadow: 0 0 24px var(--green-glow);
  animation: winnerPulse 0.5s var(--ease-spring);
}

/* Dimmed columns after pick (non-winners) */
.response-col.pick-dimmed {
  opacity: 0.5;
  transition: opacity 0.3s var(--ease-out);
}

/* Tie button in arena header */
.tie-btn {
  color: var(--text-3);
  border-color: var(--border);
  transition: all 0.2s var(--ease-out);
}

.tie-btn:hover {
  color: var(--text-1);
  border-color: var(--border-hover);
}

/* Rank progress indicator */
.rank-progress {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  animation: fadeIn 0.3s var(--ease-out);
}

/* Done ranking button (3-4 model mode) */
.done-ranking-btn {
  background: var(--green);
  color: var(--ink);
  border: none;
  padding: 4px 12px;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  animation: fadeIn 0.3s var(--ease-out);
}

.done-ranking-btn:hover {
  background: var(--green-dim);
  transform: translateY(-1px);
}

/* ═══════════════ SESSION REPORT ═══════════════ */

.report-section {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 24px;
  animation: fadeIn 0.5s var(--ease-out);
}

.report-card {
  background: var(--ink-1);
  border: 1px solid var(--green);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: 0 0 40px var(--green-glow);
}

.report-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
}

.report-header h2 {
  font-family: var(--mono);
  font-size: 18px;
}

.report-meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-3);
}

.report-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.report-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.report-rank {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 20px;
  color: var(--green);
  width: 36px;
  text-align: center;
}

.report-row:not(:first-child) .report-rank { color: var(--text-3); }

.report-model {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  flex: 1;
}

.report-stats {
  display: flex;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
}

.report-stat-val { color: var(--text-2); }

.report-breakdown {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-bottom: 20px;
}

.report-round {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
}

.report-round-num { color: var(--text-4); width: 50px; }
.report-round-winner { color: var(--green); }

.report-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ═══════════════ LEADERBOARD ═══════════════ */

.leaderboard-section {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

.leaderboard-section h2 {
  font-family: var(--mono);
  font-size: 18px;
  text-align: center;
  margin-bottom: 4px;
}

.leaderboard-subtitle {
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
  margin-bottom: 24px;
}

.leaderboard { display: flex; flex-direction: column; gap: 6px; }

.leaderboard-empty {
  text-align: center;
  padding: 48px 0;
  color: var(--text-4);
}

.empty-icon { font-size: 32px; margin-bottom: 12px; opacity: 0.3; }
.empty-sub { font-size: 13px; margin-top: 4px; }

.lb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ink-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: all 0.3s var(--ease-out);
}

.lb-row:first-child {
  border-color: var(--green);
  box-shadow: 0 0 16px var(--green-glow);
}

.lb-rank {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 16px;
  color: var(--green);
  width: 28px;
  text-align: center;
}

.lb-row:not(:first-child) .lb-rank { color: var(--text-3); }

.lb-model {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  flex: 1;
}

.lb-bar-wrap {
  width: 80px;
  height: 4px;
  background: var(--ink-3);
  border-radius: 2px;
  overflow: hidden;
}

.lb-bar {
  height: 100%;
  background: var(--green);
  border-radius: 2px;
  transition: width 0.5s var(--ease-out);
}

.lb-elo {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-2);
  width: 48px;
  text-align: right;
}

/* Elo counter animation */
.lb-elo.counting {
  color: var(--green);
  transition: color 0.3s;
}

.lb-elo-delta {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  margin-left: 2px;
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.3s var(--ease-out);
}

.lb-elo-delta.visible {
  opacity: 1;
  transform: translateY(0);
}

.lb-elo-delta.positive { color: var(--green); }
.lb-elo-delta.negative { color: var(--error); }

.lb-record {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-4);
  width: 56px;
  text-align: right;
}

.leaderboard-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}

.comparison-count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-4);
}

/* ═══════════════ MODAL ═══════════════ */

.modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 1;
}

.modal-content {
  position: relative;
  z-index: 2;
  background: var(--ink-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalEnter 0.3s var(--ease-spring);
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.modal-header h2 { font-family: var(--mono); font-size: 16px; }

.modal-close {
  background: none;
  border: none;
  color: var(--text-3);
  font-size: 22px;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.2s;
}

.modal-close:hover { color: var(--text-1); }

.keys-notice {
  font-size: 12px;
  color: var(--text-4);
  margin-bottom: 16px;
  line-height: 1.5;
}

.keys-security-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(0, 255, 180, 0.04);
  border: 1px solid rgba(0, 255, 180, 0.12);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.keys-security-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.keys-security-text strong {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--green);
  font-weight: 600;
}

.keys-security-text span {
  font-size: 11px;
  color: var(--text-3);
}

.keys-security-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  padding: 0 2px;
}

.security-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.4;
}

.security-check {
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.key-fields { display: flex; flex-direction: column; gap: 12px; }

.key-field label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  margin-bottom: 4px;
  color: var(--text-2);
}

.key-free-tag {
  font-size: 9px;
  color: var(--green);
  border: 1px solid rgba(0, 255, 180, 0.2);
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: auto;
}

.key-get-free {
  margin-left: auto;
  font-size: 10px;
  font-family: var(--mono);
  color: var(--green);
  text-decoration: none;
  background: rgba(0, 255, 180, 0.08);
  border: 1px solid rgba(0, 255, 180, 0.2);
  padding: 2px 8px;
  border-radius: 4px;
  transition: all 0.2s var(--ease-out);
  white-space: nowrap;
}

.key-get-free:hover {
  background: rgba(0, 255, 180, 0.15);
  border-color: var(--green);
}

.key-get-link {
  margin-left: auto;
  font-size: 10px;
  font-family: var(--mono);
  color: var(--text-4);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}

.key-get-link:hover {
  color: var(--text-2);
}

.key-hint {
  font-size: 10px;
  color: var(--text-4);
  margin-top: 4px;
  padding-left: 2px;
  line-height: 1.4;
}

.key-field input {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 12px;
  color: var(--text-1);
  font-family: var(--mono);
  font-size: 12px;
  outline: none;
  transition: border-color 0.2s;
}

.key-field input:focus { border-color: var(--green); }
.key-field input::placeholder { color: var(--text-4); }

.modal-footer {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  cursor: pointer;
}

.remember-label input[type="checkbox"] {
  accent-color: var(--green);
}

/* ═══════════════ INFO MODAL ═══════════════ */

.info-modal-content {
  max-width: 520px;
}

.info-body {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-2);
}

.info-steps {
  padding-left: 1.4em;
  margin-bottom: 20px;
}

.info-steps li {
  margin-bottom: 6px;
  padding-left: 4px;
}

.info-steps li::marker {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--green);
}

.info-heading {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 8px;
  margin-top: 4px;
}

.info-list {
  list-style: none;
  padding: 0;
  margin-bottom: 20px;
}

.info-list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-3);
}

.info-list li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
  font-size: 11px;
}

.info-list li strong {
  color: var(--text-1);
  font-weight: 600;
}

.info-body kbd {
  font-family: var(--mono);
  font-size: 10px;
  background: var(--ink-3);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--text-2);
}

/* ═══════════════ FOOTER ═══════════════ */

.footer {
  text-align: center;
  padding: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-4);
  font-size: 12px;
}

.footer a { color: var(--green); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ═══════════════ SCREEN READER ONLY ═══════════════ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ═══════════════ ANIMATIONS ═══════════════ */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* ═══════════════ MOBILE ═══════════════ */

@media (max-width: 768px) {
  .arena-columns.cols-2,
  .arena-columns.cols-3,
  .arena-columns.cols-4 {
    grid-template-columns: 1fr;
  }

  /* Mobile: hide non-active columns when tab bar is active */
  .arena-columns.mobile-tabbed .response-col {
    display: none;
  }
  .arena-columns.mobile-tabbed .response-col.mobile-active {
    display: flex;
  }

  .hero { padding: 36px 16px 16px; }
  .hero h1 { font-size: 24px; }
  .picker-section, .prompt-section { padding-left: 16px; padding-right: 16px; }
  .model-grid { grid-template-columns: repeat(2, 1fr); }
  .nav { padding: 0 16px; }
  .prompt-shortcut { display: none; }
  .session-bar { margin-left: 16px; margin-right: 16px; }
  .report-card { padding: 20px; }
}

@media (max-width: 480px) {
  .model-grid { grid-template-columns: 1fr; }
}
