:root {
  --bg: #0e0e12;
  --fg: #f5f3ee;
  --muted: #a9a6b3;
  --accent: #c9a7ff;
  --card: #17171f;
  --border: #2a2a36;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

main {
  width: 100%;
  max-width: 560px;
  padding: 48px 20px 64px;
  text-align: center;
}

.hero {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: block;
  margin: 0 auto 20px;
}

.hero-fallback {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--muted);
  font-size: 3rem;
  background: var(--card);
}

h1 { margin: 0 0 8px; font-size: 2rem; letter-spacing: 0.02em; }
p.sub { color: var(--muted); margin: 0 0 32px; }

.links { display: grid; gap: 12px; }

a.btn {
  display: block;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--fg);
  text-decoration: none;
  font-weight: 600;
}

a.btn:hover { border-color: var(--accent); }

a.btn.primary { background: var(--accent); color: #14101f; border-color: var(--accent); }

a.btn.tip {
  font-size: 1.25rem;
  padding: 12px 16px;
}

/* Optional: add distinct labels for each fixed-amount tip
   by using data-label, or style "Custom" the same as others. */

.qr-box {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  display: inline-block;
  margin: 20px auto;
  min-width: 276px;
  min-height: 276px;
  position: relative;
}

.qr-box img { display: block; margin: 0 auto; }

#qr-static,
#qr-auto img,
#qr-auto canvas {
  width: 236px !important;
  height: 236px !important;
}

#qr-auto {
  position: relative;
  width: 236px;
  margin: 0 auto;
}

/* Branded center badge. Kept small (~30% of code width) and paired with
   error-correction level H so the code stays scannable. */
.qr-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border: 2px solid #6d28d9;
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.25;
  color: #6d28d9;
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
}

code.url { color: var(--accent); word-break: break-all; }

.note {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 24px;
  line-height: 1.5;
}

footer { color: var(--muted); font-size: 0.8rem; padding: 24px; }
