:root {
  --page: #0d0d0d;
  --surface: #1a1a19;
  --text-primary: #ffffff;
  --text-secondary: #c3c2b7;
  --text-muted: #898781;
  --border: rgba(255, 255, 255, 0.10);
  --accent: #3987e5;
  --accent-2: #9085e9;
  --good: #0ca30c;
  --critical: #e66767;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--page);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.intro h1 {
  font-size: 40px;
  margin: 0 0 8px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  color: var(--text-secondary);
  margin: 0 0 40px;
  font-size: 16px;
}

.lookup {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.at {
  display: flex;
  align-items: center;
  padding: 0 4px 0 16px;
  color: var(--text-muted);
  font-size: 15px;
  white-space: nowrap;
}

#username-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 15px;
  padding: 14px 8px;
  outline: none;
}

#username-input::placeholder { color: var(--text-muted); }

#generate-btn {
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 0 22px;
  cursor: pointer;
  transition: background 0.15s ease;
}

#generate-btn:hover { background: #2f74c8; }
#generate-btn:disabled { background: var(--text-muted); cursor: default; }

.status {
  min-height: 20px;
  margin: 16px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.status.error { color: var(--critical); }

.result[hidden] { display: none; }

.result {
  margin-top: 32px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#card-canvas {
  width: 100%;
  max-width: 640px;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.actions button, .actions a {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.actions button:hover, .actions a:hover {
  border-color: var(--accent);
}

.actions button:active, .actions a:active {
  transform: scale(0.97);
}

.disclaimer {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 12.5px;
  max-width: 480px;
  line-height: 1.5;
}

.footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 24px;
}

.footer a { color: var(--text-secondary); }

@media (max-width: 480px) {
  .page { padding-top: 40px; }
  .intro h1 { font-size: 30px; }
  .lookup { max-width: 100%; }
}
