:root {
  --bg: #f9fafb;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #000000;
  --primary-hover: #222222;
  --card-bg: #ffffff;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.03);
  --eth-gray: #6b7280;
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--primary-hover);
}

/* ---------- Layout ---------- */
.container {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 20px 60px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ---------- Hero logo ---------- */
.hero {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.hero-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-eth {
  height: 44px;
  width: auto;
  display: block;
}

/* ---------- Card ---------- */
.card {
  background: var(--card-bg);
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  padding: 40px;
  width: 100%;
}

.card-title {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--ink);
  letter-spacing: -0.02em;
}

/* ---------- Form ---------- */
.gen-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}

.field-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  color: var(--ink);
  background: #f9fafb;
}

.field-input::placeholder {
  color: #9ca3af;
}

.field-input:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
}

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, transform 0.1s ease-in-out, box-shadow 0.2s ease-in-out;
  width: 100%;
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #ffffff;
  text-decoration: none;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.2s ease-in-out, transform 0.1s ease-in-out, box-shadow 0.2s ease-in-out;
  width: 100%;
}

.btn-secondary:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  color: var(--ink);
  text-decoration: none;
}

.btn-secondary:active {
  transform: scale(0.98);
}

/* ---------- Alert ---------- */
.alert {
  background: #fef2f2;
  border: 1px solid #fee2e2;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
}

/* ---------- Lede / intro under card ---------- */
.lede {
  margin-top: 32px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  line-height: 1.6;
}

.lede p {
  margin-bottom: 12px;
}

.center {
  text-align: center;
}

.muted {
  color: var(--muted);
}

/* ---------- Result page ---------- */
.result {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.result-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.qr-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  margin-bottom: 24px;
}

.qr-img {
  width: 260px;
  height: 260px;
  display: block;
  border-radius: 12px;
}

.result-address-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 28px;
}

.result-address-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
}

.addr-code-wrapper {
  display: flex;
  align-items: center;
  background: #f3f4f6;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px 6px 6px 14px;
  width: 100%;
}

.addr-code {
  font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--ink);
  word-break: break-all;
  flex: 1;
  text-align: left;
  user-select: all;
}

.btn-copy {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
  margin-left: 8px;
}

.btn-copy:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

/* ---------- Vanity Section ---------- */
.vanity-container {
  width: 100%;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  padding: 24px;
  margin-top: 8px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.vanity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.vanity-badge {
  background: #e2e8f0;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  letter-spacing: 0.05em;
}

.vanity-score {
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
}

.vanity-desc {
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.result-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  width: 100%;
  max-width: 600px;
  margin: 40px auto 0;
  padding: 32px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.brand-logo {
  height: 24px;
  width: auto;
  display: block;
}

.footer p {
  margin-bottom: 8px;
}

.footer p:last-child {
  margin-bottom: 0;
}

@media (max-width: 480px) {
  .card {
    padding: 24px;
  }
  .result-actions-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
