/* NodeBench Starter — Glass Card DNA */
:root {
  --bg-primary: #151413;
  --bg-surface: rgba(255, 255, 255, 0.02);
  --border-edge: rgba(255, 255, 255, 0.06);
  --accent: #d97757;
  --accent-soft: rgba(217, 119, 87, 0.15);
  --text-primary: #f5f5f4;
  --text-muted: rgba(245, 245, 244, 0.5);
  --text-dim: rgba(245, 245, 244, 0.3);
  --font-sans: "Inter", -apple-system, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;
  --radius: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
}

.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ─── Nav ─── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border-edge);
  backdrop-filter: blur(12px);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: white;
}

.nav-title {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.nav-tabs {
  display: flex;
  gap: 4px;
}

.nav-tab {
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-tab:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
}

.nav-tab.active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(217, 119, 87, 0.2);
}

/* ─── Main ─── */
.main {
  flex: 1;
  padding: 32px 24px;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}

/* ─── Cards ─── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-edge);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(8px);
}

.card + .card { margin-top: 16px; }

.card-header {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ─── Inputs ─── */
.input-group {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.input {
  flex: 1;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-edge);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}

.input:focus {
  border-color: var(--accent);
}

.input::placeholder {
  color: var(--text-dim);
}

.btn {
  padding: 12px 24px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.btn:hover { opacity: 0.9; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-edge);
  color: var(--text-primary);
}

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

/* ─── Results ─── */
.result-item {
  padding: 16px;
  border: 1px solid var(--border-edge);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: border-color 0.15s;
}

.result-item:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.result-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}

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

.result-body {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.5;
}

/* ─── Badges ─── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-error { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.badge-warning { background: rgba(234, 179, 8, 0.15); color: #eab308; }
.badge-info { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.badge-success { background: rgba(34, 197, 94, 0.15); color: #22c55e; }

/* ─── Empty state ─── */
.empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 32px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-hint {
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--accent);
  background: var(--accent-soft);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-top: 12px;
}

/* ─── Memo ─── */
.memo-section { margin-bottom: 24px; }
.memo-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.memo-content {
  width: 100%;
  min-height: 80px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-edge);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  resize: vertical;
  outline: none;
}

.memo-content:focus { border-color: var(--accent); }

/* ─── Footer ─── */
.footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-edge);
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
}

.footer a {
  color: var(--accent);
  text-decoration: none;
}

.footer a:hover { text-decoration: underline; }

/* ─── Loading ─── */
.loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-edge);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .nav { flex-direction: column; gap: 8px; }
  .nav-tabs { width: 100%; overflow-x: auto; }
  .input-group { flex-direction: column; }
  .main { padding: 16px; }
}
