/* Basic layout */
:root {
  --bg: #0f172a; /* slate-900 */
  --text: #e5e7eb; /* gray-200 */
  --muted: #94a3b8; /* slate-400 */
  --primary: #2563eb; /* blue-600 */
  --valid-bg: #064e3b; /* emerald-900 */
  --valid-border: #10b981; /* emerald-500 */
  --invalid-bg: #7f1d1d; /* red-900 */
  --invalid-border: #ef4444; /* red-500 */
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px;
}

h1 {
  margin: 0 0 12px 0;
  font-size: 1.75rem;
}

.controls {
  margin: 16px auto;
  max-width: 480px;
}

button {
  appearance: none;
  border: 0;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 1rem;
  cursor: pointer;
}

.controls button {
  width: 100%;
  display: block;
}

button.primary { background: var(--primary); color: white; }
button.secondary { background: #334155; color: white; }
button:disabled { opacity: 0.6; cursor: not-allowed; }

.reader {
  margin: 16px 0;
  border: 1px solid #334155;
  border-radius: 8px;
  overflow: hidden;
}

/* The library injects its own sizing; we keep a max */
#reader { max-width: 480px; }

.result {
  margin: 16px 0;
  padding: 16px;
  border-radius: 8px;
}

.result.valid {
  background: var(--valid-bg);
  border: 1px solid var(--valid-border);
}

.result.invalid {
  background: var(--invalid-bg);
  border: 1px solid var(--invalid-border);
}

.result .title { font-weight: 600; margin-bottom: 8px; }
.result .details { color: var(--muted); }

.row { display: flex; gap: 12px; align-items: center; }
.badge { padding: 4px 8px; border-radius: 999px; background: #1f2937; }
