:root {
  --bg: #0f1220;
  --panel: #181c2e;
  --panel-2: #1f2440;
  --text: #e8eaf6;
  --muted: #9aa0c3;
  --accent: #5b8cff;
  --accent-2: #7c5bff;
  --ok: #2ecc8f;
  --err: #ff5d6c;
  --border: #2a3050;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, #1a2040 0%, var(--bg) 60%);
  color: var(--text);
  min-height: 100vh;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 30px;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .sub {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  max-width: 56ch;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
  margin-top: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.card h2 {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 600;
}
.card p { color: var(--muted); line-height: 1.5; margin: 0 0 16px; }

.hidden { display: none; }

button {
  font: inherit;
  cursor: pointer;
  border-radius: 10px;
  padding: 11px 18px;
  border: 1px solid transparent;
  transition: transform 0.05s ease, filter 0.15s ease;
}
button:active { transform: translateY(1px); }
button.primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 600;
  border: none;
}
button.primary:hover { filter: brightness(1.08); }
button.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  margin-top: 16px;
}
button.ghost:hover { color: var(--text); border-color: var(--muted); }

.qr-wrap {
  display: flex;
  justify-content: center;
  padding: 18px;
  background: #fff;
  border-radius: 12px;
  width: fit-content;
  margin: 0 auto 14px;
}
#qr-img {
  width: 280px;
  height: 280px;
  display: block;
}
.hint { text-align: center; margin: 0 0 16px; }

.meta {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 6px 12px;
  margin: 0 0 4px;
  font-size: 13px;
}
.meta dt { color: var(--muted); }
.meta dd { margin: 0; overflow-wrap: anywhere; }
code {
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--panel-2);
  padding: 2px 6px;
  border-radius: 6px;
}

/* Result */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
}
.badge.ok { background: rgba(46, 204, 143, 0.15); color: var(--ok); border: 1px solid rgba(46,204,143,0.4); }
.badge.err { background: rgba(255, 93, 108, 0.15); color: var(--err); border: 1px solid rgba(255,93,108,0.4); }

table.claims {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.claims th, table.claims td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
}
table.claims th { color: var(--muted); font-weight: 500; width: 40%; }
table.claims td { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }

.error-text { color: var(--err); font-family: var(--mono); font-size: 13px; white-space: pre-wrap; }

.foot { margin-top: 24px; text-align: center; }
.status { color: var(--muted); font-size: 13px; }
.status.working { color: var(--accent); }

.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: -2px;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }
