/* GeaNaVid Demo - Modern Swiss Design & Live Terminal CSS */

:root {
  --bg-primary: #f6f4ef;
  --bg-surface: #ffffff;
  --bg-terminal: #0f141c;
  --text-main: #1f2328;
  --text-muted: #656d76;
  --border-color: #d0d7de;
  --primary: #dc2626;
  --primary-hover: #b91c1c;
  --focus-ring: rgba(220, 38, 38, 0.25);

  --c-entailment: #16a34a;
  --c-entailment-bg: #dcfce7;
  --c-neutral: #0284c7;
  --c-neutral-bg: #e0f2fe;
  --c-contradiction: #dc2626;
  --c-contradiction-bg: #fee2e2;

  --term-text: #e6edf3;
  --term-key: #7ee787;
  --term-string: #a5d6ff;
  --term-number: #79c0ff;
  --term-bool: #ff7b72;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #12161f;
    --bg-surface: #1a202c;
    --text-main: #f0f6fc;
    --text-muted: #8b949e;
    --border-color: #30363d;
  }
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.app-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.flag {
  font-size: 1.75rem;
}

.brand-text strong {
  display: block;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.brand-text .sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.header-badges {
  display: flex;
  gap: 0.5rem;
}

.badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-weight: 500;
  border: 1px solid var(--border-color);
}

.badge-model {
  background: rgba(2, 132, 199, 0.1);
  color: #0284c7;
  border-color: rgba(2, 132, 199, 0.3);
}

.badge-auth {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
  border-color: rgba(22, 163, 74, 0.3);
}

/* Main Layout */
.app-main {
  flex: 1;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .app-main {
    grid-template-columns: 1fr;
  }
}

.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.panel-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.panel-header h2 {
  font-size: 1.05rem;
  font-weight: 600;
}

/* Mode Switcher */
.mode-toggle {
  display: inline-flex;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 2px;
}

.btn-toggle {
  background: transparent;
  border: none;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.btn-toggle.active {
  background: var(--bg-surface);
  color: var(--text-main);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  font-weight: 600;
}

/* Form */
.demo-form {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.75rem;
  justify-content: space-between;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-group label .hint {
  font-weight: normal;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.form-group label .char-count {
  font-weight: normal;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.field-note {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.field-note:empty {
  display: none;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.9rem;
  background: var(--bg-surface);
  color: var(--text-main);
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-textarea {
  resize: vertical;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.mode-fields.hidden {
  display: none;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: var(--bg-primary);
}

.shortcut-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

kbd {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  padding: 1px 4px;
  font-size: 0.7rem;
  font-family: monospace;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.spinner.hidden {
  display: none;
}

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

/* Terminal View */
.terminal-window {
  background: var(--bg-terminal);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 480px;
}

.terminal-bar {
  background: #161b22;
  border-bottom: 1px solid #30363d;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot-red {
  background: #ff5f56;
}

.dot-yellow {
  background: #ffbd2e;
}

.dot-green {
  background: #27c93f;
}

.terminal-title {
  color: #8b949e;
  font-size: 0.775rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.btn-term {
  background: #21262d;
  color: #c9d1d9;
  border: 1px solid #30363d;
  border-radius: 4px;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-term:hover {
  background: #30363d;
  color: #ffffff;
}

.terminal-command-line {
  background: #11151c;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid #21262d;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.825rem;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  white-space: nowrap;
}

.prompt-symbol {
  color: #58a6ff;
  font-weight: bold;
}

.command-text {
  color: #e6edf3;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Verdict Ribbon */
.verdict-ribbon {
  padding: 0.65rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #30363d;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  transition: all 0.2s ease;
}

.verdict-ribbon.hidden {
  display: none;
}

.verdict-main {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.verdict-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.verdict-title {
  font-size: 0.9rem;
  font-weight: 700;
}

.verdict-metrics {
  display: flex;
  gap: 1rem;
  font-size: 0.775rem;
  color: #8b949e;
}

.verdict-metrics strong {
  color: #e6edf3;
}

.verdict-entailment {
  background: rgba(22, 163, 74, 0.15);
  border-color: rgba(22, 163, 74, 0.4);
}
.verdict-entailment .verdict-indicator {
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}
.verdict-entailment .verdict-title {
  color: #4ade80;
}

.verdict-neutral {
  background: rgba(2, 132, 199, 0.15);
  border-color: rgba(2, 132, 199, 0.4);
}
.verdict-neutral .verdict-indicator {
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}
.verdict-neutral .verdict-title {
  color: #38bdf8;
}

.verdict-contradiction {
  background: rgba(220, 38, 38, 0.15);
  border-color: rgba(220, 38, 38, 0.4);
}
.verdict-contradiction .verdict-indicator {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}
.verdict-contradiction .verdict-title {
  color: #f87171;
}

.terminal-body {
  padding: 1rem;
  flex: 1;
  overflow: auto;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
}

.json-code {
  color: var(--term-text);
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-footer {
  background: #11151c;
  border-top: 1px solid #21262d;
  padding: 0.45rem 1rem;
  font-size: 0.725rem;
  color: #8b949e;
}

.spec-tag {
  color: #58a6ff;
  font-weight: 600;
  margin-right: 0.35rem;
}

/* Footer */
.app-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding: 1.25rem 0;
  background: var(--bg-surface);
  text-align: center;
  font-size: 0.8rem;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

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

.form-group.hidden {
  display: none;
}

