:root {
  --bg: #000000;
  --bg-raised: #070a07;
  --card: #0a0f0a;
  --card-border: #182018;
  --input-bg: #0d130d;
  --text: #eef2ee;
  --text-dim: #b9c2b9;
  --text-muted: #6d786d;
  --green: #53e43c;
  --green-dim: rgba(83, 228, 60, 0.14);
  --green-border: rgba(83, 228, 60, 0.35);
  --red: #ff5c5c;
  --radius: 16px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 20px;
}

.green { color: var(--green); }
.muted { color: var(--text-muted); }
.sol { font-size: 0.85em; }

button { font-family: inherit; cursor: pointer; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  display: inline-flex;
  width: 28px;
  height: 28px;
  color: var(--green);
}
.brand-mark svg { width: 100%; height: 100%; }

.brand-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.header-actions { display: flex; align-items: center; gap: 10px; }

.btn {
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.15s ease;
}
.btn:hover { border-color: var(--green-border); }

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--text);
}

.btn-primary {
  background: var(--green);
  border-color: var(--green);
  color: #04120a;
}
.btn-primary:hover { filter: brightness(1.1); border-color: var(--green); }

/* ===== Tab nav ===== */
.tab-nav { border-top: 1px solid var(--card-border); }
.tab-nav-inner { display: flex; gap: 4px; overflow-x: auto; }

.tab-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 14px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.tab-link:hover { color: var(--text); }
.tab-link.active { color: var(--text); border-bottom-color: var(--green); }

/* ===== Views ===== */
.view { display: none; padding-bottom: 80px; }
.view.active { display: block; }
.view-head { margin-top: 48px; }

/* ===== Hero ===== */
.hero { text-align: center; padding: 90px 0 40px; }

.hero h1 {
  font-size: clamp(34px, 6vw, 52px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.hero-mark {
  display: inline-flex;
  width: 0.85em;
  height: 0.85em;
  vertical-align: -0.08em;
  color: var(--green);
}
.hero-mark svg { width: 100%; height: 100%; }

.hero-sub { margin-top: 10px; font-size: 17px; color: var(--text-dim); }
.hero-sub strong { color: var(--green); font-weight: 700; }
.hero-sub.muted { margin-top: 4px; }

.burn-line {
  margin-top: 12px;
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--green-border);
  background: var(--green-dim);
  color: var(--text-dim);
}

/* ===== Cards ===== */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 22px;
}

/* ===== Search ===== */
.search-card { margin-top: 12px; }

.search-field {
  display: flex;
  align-items: center;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 0 18px;
  transition: border-color 0.15s ease;
}
.search-field:focus-within {
  border-color: var(--green-border);
  box-shadow: 0 0 0 3px var(--green-dim);
}

.search-field input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 17px;
  padding: 16px 0;
  font-family: inherit;
}
.search-field input::placeholder { color: var(--text-muted); }

.search-field .tld { font-size: 17px; font-weight: 600; }

.search-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  gap: 12px;
}

.hint {
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}
.hint.price { color: var(--text-dim); }

.search-result[hidden] { display: none; }

.search-result {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--input-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.search-result .result-name { font-weight: 700; font-size: 17px; }
.search-result .result-status { font-size: 13.5px; font-weight: 600; }
.search-result.available { border-color: var(--green-border); }
.search-result.available .result-status { color: var(--green); }
.search-result.taken .result-status { color: var(--red); }
.search-result.invalid .result-status { color: var(--text-muted); font-weight: 500; }
.search-result .btn { padding: 8px 18px; font-size: 13.5px; }

/* ===== Facts card ===== */
.facts-card {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.fact { display: flex; flex-direction: column; gap: 2px; }

.label {
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.fact .value { font-size: 20px; font-weight: 700; margin-top: 6px; }
.fact .desc { font-size: 13.5px; color: var(--text-dim); }

/* ===== Sections ===== */
.section { margin-top: 72px; }

.section h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-sub { color: var(--text-dim); margin-top: 6px; font-size: 15px; }

.section .card { margin-top: 20px; }

/* ===== Steps ===== */
.steps-card { padding: 0; overflow: hidden; }

.step {
  display: flex;
  gap: 18px;
  padding: 24px 22px;
}
.step + .step { border-top: 1px solid var(--card-border); }

.step-num {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  padding-top: 3px;
}

.step h3 { font-size: 16.5px; font-weight: 700; }
.step p { color: var(--text-dim); font-size: 14.5px; margin-top: 6px; }

/* ===== Code cards ===== */
.code-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--mono);
}
.code-card + .code-card { margin-top: 12px; }

.code-card code {
  font-size: 13.5px;
  color: var(--text);
  word-break: break-all;
}
.code-card .prompt { color: var(--green); margin-right: 6px; }

.text-link {
  background: none;
  border: none;
  color: var(--green);
  font-size: 14.5px;
  font-weight: 500;
  padding: 0;
  margin-top: 16px;
  text-decoration: none;
  display: inline-block;
  text-align: left;
}
.text-link:hover { text-decoration: underline; }

/* ===== FAQ ===== */
.faq-item { margin-top: 26px; }
.faq-item h3 { font-size: 16.5px; font-weight: 700; }
.faq-item p { color: var(--text-dim); font-size: 14.5px; margin-top: 6px; }

.docs-h { font-size: 18px; font-weight: 700; }

/* ===== Registry stats ===== */
.registry-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}

.stat-card { display: flex; flex-direction: column; gap: 8px; }
.stat-card .value { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }

/* ===== Registry table ===== */
.table-card { margin-top: 24px; padding: 0; overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }

th {
  text-align: left;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  padding: 16px 22px;
  border-bottom: 1px solid var(--card-border);
}

td {
  padding: 15px 22px;
  font-size: 14.5px;
  border-bottom: 1px solid var(--card-border);
}
tr:last-child td { border-bottom: none; }

td.domain { font-weight: 600; }
td.domain .green { font-weight: 600; }
td.owner { font-family: var(--mono); font-size: 13px; color: var(--text-dim); }
td.date { color: var(--text-muted); font-size: 13.5px; }

/* ===== Empty state ===== */
.empty-card {
  margin-top: 24px;
  text-align: center;
  padding: 60px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.empty-icon { color: var(--green); opacity: 0.8; }
.empty-card h3 { font-size: 18px; font-weight: 700; margin-top: 8px; }
.empty-card p { color: var(--text-dim); font-size: 14.5px; }
.empty-card .btn { margin-top: 16px; }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--card-border);
  background: var(--bg-raised);
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
  padding-top: 56px;
  padding-bottom: 56px;
}

.footer-brand .brand-name { font-size: 20px; }
.footer-brand p {
  color: var(--text-dim);
  font-size: 14px;
  margin-top: 12px;
  max-width: 300px;
}

.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col .label { margin-bottom: 4px; }
.footer-col .text-link {
  color: var(--text-dim);
  margin-top: 0;
  font-size: 14px;
}
.footer-col .text-link:hover { color: var(--green); text-decoration: none; }

.footer-bar { border-top: 1px solid var(--card-border); }

.footer-bar-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 18px;
  font-size: 12.5px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

/* ===== Wallet modal ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-backdrop[hidden] { display: none; }

.modal {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 380px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.modal-head h3 { font-size: 18px; font-weight: 700; }

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
}
.modal-close:hover { color: var(--text); }

.wallet-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 16px;
  margin-top: 10px;
  transition: border-color 0.15s ease;
}
.wallet-option:hover { border-color: var(--green-border); }

.wallet-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
}

.modal-note {
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--text-muted);
  text-align: center;
}

.wallet-option.connecting { opacity: 0.6; cursor: wait; }

.disconnect-link {
  margin: 14px auto 0;
  display: block;
  color: var(--text-muted);
  font-size: 13px;
}
.disconnect-link:hover { color: var(--red); text-decoration: none; }

/* ===== Register modal ===== */
.reg-domain {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.reg-step {
  display: grid;
  grid-template-columns: 24px 1fr;
  grid-template-areas: "icon label" ". detail";
  column-gap: 12px;
  padding: 10px 0;
  opacity: 0.35;
  transition: opacity 0.3s ease;
}
.reg-step.active { opacity: 1; }

.reg-step-icon {
  grid-area: icon;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.reg-step .check { display: none; color: var(--green); font-weight: 700; }
.reg-step .spinner { display: none; }

.reg-step.active:not(.done) .spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--green-dim);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.reg-step.done .check { display: inline; }

@keyframes spin { to { transform: rotate(360deg); } }

.reg-step-label { grid-area: label; font-size: 14.5px; font-weight: 600; }
.reg-step-detail { grid-area: detail; font-size: 12.5px; color: var(--text-muted); }

.reg-done { text-align: center; padding: 8px 0 4px; }
.reg-done-title { font-size: 18px; font-weight: 800; }
.reg-done-sub { font-size: 14px; color: var(--text-dim); margin-top: 10px; }
.reg-done-sub strong { color: var(--text); }

.reg-sig {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 14px;
  word-break: break-all;
}

.reg-done-actions { margin-top: 18px; }

/* ===== Responsive ===== */
@media (max-width: 720px) {
  .facts-card { grid-template-columns: 1fr 1fr; gap: 20px; }
  .registry-stats { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding-top: 60px; }
  .search-meta { flex-direction: column; gap: 4px; }
}

@media (max-width: 440px) {
  .footer-grid { grid-template-columns: 1fr; }
}
