/* ── Design tokens ─────────────────────────────────────────────────────────── */

:root {
  --bg:        #121212;
  --card:      #1e1e1e;
  --primary:   #ffb74d;
  --primary-d: #ffa726;
  --text:      #ffffff;
  --muted:     #b0bec5;
  --dim:       #546e7a;
  --input-bg:  #263238;
  --border:    #37474f;

  --tier-small:   #546e7a;
  --tier-medium:  #42a5f5;
  --tier-large:   #ffb74d;
  --tier-jackpot: #ffd54f;
}

/* ── Reset & base ───────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 {
  text-align: center;
  color: var(--primary);
  font-weight: 300;
  margin-bottom: 30px;
}

h3 {
  margin-top: 0;
  color: var(--primary);
  font-size: 1.1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 15px;
}

code {
  background: #000;
  color: #00e676;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  word-break: break-all;
  display: inline-block;
  font-size: 0.85rem;
}

/* ── Navigation ─────────────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 18, 18, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--primary);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-btn {
  padding: 7px 16px;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: background 0.15s, color 0.15s;
}

.nav-btn-outline {
  border: 1px solid var(--border);
  color: var(--muted);
  background: transparent;
}
.nav-btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

.nav-btn-primary {
  background: var(--primary);
  color: #121212;
  border: 1px solid transparent;
}
.nav-btn-primary:hover {
  background: var(--primary-d);
  text-decoration: none;
}

/* ── Config bar (wallet page) ───────────────────────────────────────────────── */

.config-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0 8px;
}

.config-bar-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}

.config-bar-input {
  flex: 1;
  font-size: 0.78rem;
  padding: 6px 8px;
  width: auto;
}

.config-bar-link {
  font-size: 0.82rem;
  color: var(--primary);
  white-space: nowrap;
}

/* ── Collapsible cards ──────────────────────────────────────────────────────── */

.collapsible-card {
  padding: 0;
}

.collapsible-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  border-radius: 8px; /* matches card radius when collapsed */
}

.collapsible-card .card-header:hover {
  background: rgba(255, 255, 255, 0.03);
}

.collapsible-card:not(.collapsed) .card-header {
  border-bottom: 1px solid var(--border);
  border-radius: 8px 8px 0 0;
}

.collapsible-card .card-body {
  padding: 18px;
}

.collapsible-card.collapsed .card-body {
  display: none;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.3px;
}

.card-chevron {
  color: var(--dim);
  font-size: 0.85rem;
  transition: transform 0.2s;
  line-height: 1;
}

.collapsible-card.collapsed .card-chevron {
  transform: rotate(-90deg);
}

.card-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Wallet identity (loaded state) ─────────────────────────────────────────── */

.wallet-empty p {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 16px;
  line-height: 1.6;
}

.wallet-empty-actions {
  display: flex;
  gap: 8px;
}

.wallet-empty-actions .btn-secondary {
  flex: 1;
}

.wallet-identity {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.wallet-wordcode {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.3px;
  margin-bottom: 20px;
  line-height: 1.2;
}

.wallet-address-label {
  margin-bottom: 6px;
}

.wallet-address-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wallet-address-row .address-hex {
  flex: 1;
  min-width: 0;
  display: block;
}

.wallet-balance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.balance-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 2px;
}

.balance-value {
  font-family: 'Courier New', monospace;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.pending-info {
  margin-top: 5px;
  font-size: 0.8rem;
}

.pending-label {
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--dim);
  margin-right: 4px;
}

.pending-value {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  color: var(--primary);
}

/* ── Small utility buttons ──────────────────────────────────────────────────── */

.btn-chip {
  width: auto;
  padding: 5px 12px;
  background: var(--input-bg);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0;
  text-transform: none;
  letter-spacing: 0;
  transition: color 0.15s, border-color 0.15s;
}

.btn-chip:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--input-bg);
}

.btn-chip-copy {
  min-width: 52px; /* fixed width — never resizes on state change */
}

.btn-chip-copy.copied {
  color: #66bb6a;
  border-color: #66bb6a;
}

.btn-icon {
  width: auto;
  padding: 4px 7px;
  background: transparent;
  color: var(--dim);
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  margin-top: 0;
  text-transform: none;
  letter-spacing: 0;
  transition: color 0.15s;
  flex-shrink: 0;
}

.btn-icon:hover {
  color: var(--primary);
  background: transparent;
}

/* ── Send result ────────────────────────────────────────────────────────────── */

.send-result {
  margin-top: 10px;
  font-size: 0.85rem;
  min-height: 1.2em;
  line-height: 1.5;
}

.send-result.result-ok  { color: #66bb6a; }
.send-result.result-err { color: #ef5350; }

/* ── Forms & controls ───────────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: 500px;
}

/* Wallet pages: center the container below the nav */
.wallet-body .container {
  max-width: 500px;
  margin: 24px auto;
  padding: 0 20px;
}

.nav-center {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-node-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--dim);
}

.nav-node-input {
  width: 200px;
  font-size: 0.78rem;
  padding: 5px 8px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  font-family: 'Courier New', monospace;
}

.card {
  background: var(--card);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
}

.row { margin-bottom: 15px; }

label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.85rem;
}

input {
  width: 100%;
  padding: 10px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-family: monospace;
}

input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Primary action button */
button {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: #121212;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 5px;
}

button:hover { background: var(--primary-d); }

button:disabled {
  background: #555;
  color: #999;
  cursor: not-allowed;
}

/* ── Utility ────────────────────────────────────────────────────────────────── */

.mt-sm { margin-top: 10px; }
.mt-md { margin-top: 15px; }
.mt-lg { margin-top: 28px; }

.flex-row {
  display: flex;
  gap: 10px;
}

.flex-1 { flex: 1; }

.wordcode {
  font-size: 1.1rem;
  color: var(--primary);
  letter-spacing: 0.5px;
}

.address-hex {
  font-size: 0.72rem;
  color: #00e676;
  word-break: break-all;
}

.hash-mono {
  font-family: 'Courier New', monospace;
  word-break: break-all;
  font-size: 0.78rem;
}

.empty-state {
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  margin: 10px 0;
}

/* ── Secondary / utility buttons ────────────────────────────────────────────── */

.btn-secondary {
  width: auto;
  flex: 1;
  padding: 8px 12px;
  background: var(--input-bg);
  color: var(--primary);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.85rem;
  margin-top: 0;
  text-transform: none;
  letter-spacing: 0;
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--primary);
  background: #263238;
}

.btn-secondary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-paste {
  width: auto;
  padding: 10px 14px;
  background: var(--input-bg);
  color: var(--primary);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.85rem;
  margin-top: 0;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-paste:hover {
  border-color: var(--primary);
  background: #263238;
}

/* ── Fee hint & presets ─────────────────────────────────────────────────────── */

.fee-hint {
  margin: 5px 0 6px;
  font-size: 0.78rem;
  color: var(--muted);
  min-height: 1.1em;
}

.fee-hint.fee-hint-good  { color: #66bb6a; }
.fee-hint.fee-hint-warn  { color: #ffb74d; }
.fee-hint.fee-hint-error { color: #ef5350; }

.fee-presets {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.btn-preset {
  flex: 1;
  padding: 5px 4px;
  background: var(--input-bg);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  margin-top: 0;
  white-space: nowrap;
}

.btn-preset:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-preset.active {
  border-color: var(--primary);
  color: var(--primary);
  background: #1a1a1a;
}

/* ── Transaction list & badges ──────────────────────────────────────────────── */

.tx-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tx-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
}

.tx-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 110px;
}

.tx-right {
  text-align: right;
  flex: 1;
  overflow: hidden;
}

.tx-badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 7px;
  border-radius: 4px;
  flex-shrink: 0;
}

.tx-badge-in      { background: #1b5e20; color: #a5d6a7; }
.tx-badge-out     { background: #0d2137; color: #64b5f6; } /* explorer: neutral TX */
.tx-badge-debit   { background: #b71c1c; color: #ef9a9a; } /* wallet: outgoing OUT */
.tx-badge-coinbase{ background: #2d2000; color: #ffb74d; }
.tx-badge-self    { background: #37474f; color: #b0bec5; }
.tx-badge-lottery { background: #4a148c; color: #ce93d8; }

.tx-amount {
  font-family: 'Courier New', monospace;
  font-weight: 600;
  font-size: 0.95rem;
}

.tx-amount-in  { color: #66bb6a; }
.tx-amount-out { color: #ef5350; }

.tx-counterpart {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wordcode-tip {
  border-bottom: 1px dotted var(--dim);
  cursor: copy;
}

.addr-tooltip {
  position: fixed;
  background: #000;
  color: #00e676;
  font-family: 'Courier New', monospace;
  font-size: 0.68rem;
  padding: 5px 8px;
  border-radius: 4px;
  border: 1px solid #1a3a1a;
  word-break: break-all;
  width: 260px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s;
  z-index: 1000;
}

.tx-meta {
  font-size: 0.75rem;
  color: var(--dim);
  margin-top: 2px;
}

/* ── Pagination ─────────────────────────────────────────────────────────────── */

.tx-pagination {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.tx-page-info {
  flex: 1;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ── Confirmation & wallet modals ───────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px 24px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.modal-box h3 {
  margin-top: 0;
  text-align: center;
}

.modal-label {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0 0 6px;
}

.modal-wordcode {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.modal-address {
  display: block;
  margin-bottom: 16px;
}

.modal-details {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 4px;
}

.modal-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

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

.modal-val {
  font-family: 'Courier New', monospace;
  font-weight: 600;
  color: var(--text);
}

.modal-warning {
  background: #1a1200;
  border: 1px solid #f57f17;
  color: #ffcc02;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.85rem;
  margin: 0 0 14px;
}

.modal-secret-key {
  display: block;
  width: 100%;
  font-size: 0.78rem;
  padding: 12px;
  user-select: all;
  cursor: text;
}

/* ── Mnemonic phrase ─────────────────────────────────────────────────────────── */

.mnemonic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 4px 0 16px;
}

.mnemonic-word {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mnemonic-num {
  color: var(--dim);
  font-size: 0.72rem;
  min-width: 16px;
  text-align: right;
}

.mnemonic-confirm-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
}

.mnemonic-confirm-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--primary);
}

.mnemonic-input {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
  padding: 10px 12px;
  resize: vertical;
  font-family: inherit;
}

.mnemonic-input:focus {
  outline: none;
  border-color: var(--primary);
}

.open-wallet-advanced {
  text-align: right;
}

.btn-link {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  margin-top: 0;
}

.btn-link:hover {
  color: var(--text);
}

/* ── Explorer layout ────────────────────────────────────────────────────────── */

.explorer-page {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 56px);
}

.explorer-sidebar {
  border-right: 1px solid var(--border);
  background: var(--card);
  padding: 24px 20px;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.explorer-main {
  padding: 24px 28px;
  min-width: 0;
  height: calc(100vh - 56px);
  overflow-y: auto;
}

.scroll-sentinel {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  color: transparent; /* invisible until genesis is reached */
  margin-top: 4px;
}

.scroll-sentinel.sentinel-end {
  color: var(--dim);
  letter-spacing: 1px;
}

/* Node URL row inside sidebar */
.sidebar-url-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 8px;
}

.sidebar-url-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.sidebar-url-row input {
  flex: 1;
  min-width: 0;
  font-size: 0.78rem;
  padding: 7px 10px;
}

.sidebar-url-row button {
  width: auto;
  margin-top: 0;
  padding: 0 10px;
  height: 34px;
  font-size: 1rem;
  background: var(--input-bg);
  color: var(--muted);
  border: 1px solid var(--border);
  text-transform: none;
  letter-spacing: 0;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s;
}

.sidebar-url-row button:hover {
  background: var(--input-bg);
  color: var(--primary);
  border-color: var(--primary);
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* Stat rows in sidebar */
.sidebar-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sidebar-stat-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--dim);
}

.sidebar-stat-value {
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
  background: none;
  padding: 0;
  display: block;
  word-break: break-all;
}

/* ── Explorer tabs ──────────────────────────────────────────────────────────── */

.explorer-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.explorer-tab {
  width: auto;
  padding: 10px 20px;
  background: transparent;
  color: var(--muted);
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  margin-top: 0;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}

.explorer-tab:hover {
  background: transparent;
  color: var(--text);
}

.explorer-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: transparent;
}

/* ── Address search (Transactions tab) ─────────────────────────────────────── */

.addr-search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.addr-search-bar input {
  flex: 1;
  font-size: 0.85rem;
  padding: 9px 12px;
}

.addr-search-bar button {
  width: auto;
  padding: 9px 18px;
  margin-top: 0;
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: 0;
  flex-shrink: 0;
}

.addr-balance-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.addr-balance-identity {
  min-width: 0;
}

.addr-wordcode {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.addr-balance-amount {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-shrink: 0;
}

.addr-balance-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--dim);
}

.addr-balance-value {
  font-family: 'Courier New', monospace;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

/* ── Lottery tier filter ─────────────────────────────────────────────────────── */

.tier-filter-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.tier-filter-btn {
  width: auto;
  padding: 5px 14px;
  background: var(--input-bg);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  margin-top: 0;
  transition: color 0.15s, border-color 0.15s;
}

.tier-filter-btn:hover {
  background: var(--input-bg);
  color: var(--primary);
  border-color: var(--primary);
}

.tier-filter-btn.active {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--input-bg);
}

.tx-badge-tier-small   { background: #1a2229; color: var(--tier-small); }
.tx-badge-tier-medium  { background: #0d1e2d; color: var(--tier-medium); }
.tx-badge-tier-large   { background: #2d2000; color: var(--tier-large); }
.tx-badge-tier-jackpot { background: #2d2500; color: var(--tier-jackpot); }

.tx-load-more {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

/* Explorer page heading */
.explorer-heading {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin: 0 0 20px;
  color: var(--text);
}

/* ── Block list (explorer) ──────────────────────────────────────────────────── */

.block-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.block-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.15s;
}

.block-item:hover {
  border-color: #4a5f6a;
}

.block-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--card);
  cursor: pointer;
  user-select: none;
}

.block-header:hover {
  background: #232f35;
}

.block-index {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  color: var(--primary);
  font-size: 1.05rem;
  min-width: 56px;
}

.block-meta {
  flex: 1;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.block-txcount {
  font-size: 0.85rem;
  color: var(--muted);
}

.block-time {
  font-size: 0.82rem;
  color: var(--muted);
}

.block-hash {
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  color: var(--dim);
  margin-left: auto;
}

.block-chevron {
  color: var(--dim);
  font-size: 0.75rem;
  transition: transform 0.15s;
}

.block-chevron.open {
  transform: rotate(180deg);
}

.block-txs {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.block-txs.open {
  display: flex;
}

/* ── Hero (index.html) ──────────────────────────────────────────────────────── */

.hero {
  min-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(255, 183, 77, 0.07) 0%, transparent 70%);
  pointer-events: none;
}

.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 20px;
  opacity: 0.85;
}

.hero h1 {
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1;
  margin: 0 0 28px;
  background: linear-gradient(135deg, #ffe082 0%, #ffb74d 50%, #ff8f00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  color: unset;
  border: none;
  padding: 0;
  text-transform: none;
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-hero-primary {
  padding: 14px 32px;
  background: var(--primary);
  color: #121212;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  border-radius: 6px;
  transition: background 0.15s, transform 0.1s;
}
.btn-hero-primary:hover {
  background: var(--primary-d);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-hero-outline {
  padding: 14px 32px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 6px;
  transition: border-color 0.15s, color 0.15s, transform 0.1s;
}
.btn-hero-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
  transform: translateY(-1px);
}

/* ── Live Pot (index.html) ──────────────────────────────────────────────────── */

.live-pot {
  margin: 32px 0 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.live-pot-inner {
  position: relative;
  background: var(--card);
  border: 1px solid rgba(255, 183, 77, 0.3);
  border-radius: 16px;
  padding: 28px 52px;
  text-align: center;
  box-shadow: 0 0 48px rgba(255, 183, 77, 0.07);
  min-width: 260px;
}

.live-pot-pulse {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4caf50;
  animation: pot-pulse 2.2s ease-out infinite;
}

@keyframes pot-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.65); }
  70%  { box-shadow: 0 0 0 9px rgba(76, 175, 80, 0); }
  100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

.live-pot-eyebrow {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--primary);
  opacity: 0.75;
  margin-bottom: 10px;
}

.live-pot-amount {
  font-family: 'Courier New', monospace;
  font-size: clamp(2.2rem, 7vw, 3.8rem);
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  letter-spacing: -1px;
}

.live-pot-coinlabel {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 6px;
}

.live-pot-last-jackpot {
  font-size: 0.72rem;
  color: var(--dim);
  margin-top: 6px;
  opacity: 0.75;
}

.live-pot-jackpot {
  font-size: 0.78rem;
  color: var(--dim);
  margin-top: 10px;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.2px;
  min-height: 1em;
}

.live-pot-node-row {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--dim);
  font-size: 0.78rem;
  flex-wrap: wrap;
  justify-content: center;
}

.live-pot-node-row label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0;
}

.live-pot-node-row input {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  padding: 4px 8px;
  width: 190px;
  font-family: 'Courier New', monospace;
}

.live-pot-node-row input:focus {
  border-color: var(--primary);
}

.live-pot-node-row button {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  padding: 3px 8px;
  width: auto;
  margin-top: 0;
  text-transform: none;
  letter-spacing: 0;
  font-weight: normal;
  transition: color 0.15s, border-color 0.15s;
}

.live-pot-node-row button:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: transparent;
}

.live-pot-age {
  color: var(--dim);
  font-size: 0.72rem;
}

/* ── Stats strip (index.html) ───────────────────────────────────────────────── */

.stats-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--card);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
}

.stat-cell {
  padding: 22px 40px;
  text-align: center;
  border-right: 1px solid var(--border);
  flex: 1;
  min-width: 160px;
}
.stat-cell:last-child { border-right: none; }

.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  font-family: 'Courier New', monospace;
  display: block;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
  display: block;
}

/* ── Sections (index.html) ──────────────────────────────────────────────────── */

.section {
  max-width: 960px;
  margin: 0 auto;
  padding: 80px 24px;
}

.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 10px;
  opacity: 0.8;
}

.section h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  margin: 0 0 14px;
  letter-spacing: -0.5px;
}

.section-lead {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 600px;
  margin: 0 0 48px;
  line-height: 1.75;
}

.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ── Pot overview (index.html) ──────────────────────────────────────────────── */

.pot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 48px;
}

.pot-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
}

.pot-card-title {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.pot-card-value {
  font-family: 'Courier New', monospace;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.pot-card-sub {
  font-size: 0.82rem;
  color: var(--dim);
  margin-top: 6px;
}

.pot-bar-wrap { margin-top: 32px; }

.pot-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.pot-bar-track {
  height: 10px;
  background: var(--input-bg);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.pot-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff8f00, #ffb74d);
  border-radius: 10px;
  width: 99.9%;
}

.pot-bar-fill-circ {
  height: 100%;
  background: #42a5f5;
  border-radius: 10px;
  width: 0.1%;
}

/* ── Lottery tiers (index.html) ─────────────────────────────────────────────── */

.tiers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.tier-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 16px;
  position: relative;
  overflow: hidden;
}

.tier-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.tier-card.small::before   { background: var(--tier-small); }
.tier-card.medium::before  { background: var(--tier-medium); }
.tier-card.large::before   { background: var(--tier-large); }
.tier-card.jackpot::before { background: var(--tier-jackpot); }

.tier-name {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.tier-card.small   .tier-name { color: var(--tier-small); }
.tier-card.medium  .tier-name { color: var(--tier-medium); }
.tier-card.large   .tier-name { color: var(--tier-large); }
.tier-card.jackpot .tier-name { color: var(--tier-jackpot); }

.tier-prob {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  line-height: 1.1;
  margin-bottom: 10px;
}

.tier-payout {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.tier-initial {
  font-size: 0.78rem;
  color: var(--dim);
  font-family: 'Courier New', monospace;
}

/* ── How it works (index.html) ──────────────────────────────────────────────── */

.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 52px;
}

.steps::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 28px;
  bottom: 28px;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), transparent);
  opacity: 0.3;
}

.step {
  position: relative;
  padding: 4px 0 32px;
}

.step:last-child { padding-bottom: 0; }

.step-num {
  position: absolute;
  left: -52px;
  top: 2px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  font-family: 'Courier New', monospace;
}

.step-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.step-body {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
  max-width: 580px;
}

.step-body code {
  background: var(--input-bg);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.85em;
}

/* ── Fee table (index.html) ─────────────────────────────────────────────────── */

.fee-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.fee-table th {
  text-align: left;
  padding: 10px 16px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid var(--border);
}

.fee-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.fee-table tr:last-child td { border-bottom: none; }
.fee-table tr:hover td { background: var(--input-bg); }
.fee-table .mono { font-family: 'Courier New', monospace; color: var(--primary); }
.fee-table .muted { color: var(--muted); }

.fee-table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

/* ── Get Started cards (index.html) ─────────────────────────────────────────── */

.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.cta-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.2s;
}

.cta-card:hover { border-color: var(--primary); }

.cta-icon { line-height: 1; color: var(--primary); }

.cta-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}

.cta-body {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
}

.cta-link {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.3px;
  align-self: flex-start;
  transition: background 0.15s, color 0.15s;
}

.cta-link-primary {
  background: var(--primary);
  color: #121212;
}
.cta-link-primary:hover {
  background: var(--primary-d);
  text-decoration: none;
}

.cta-link-outline {
  border: 1px solid var(--border);
  color: var(--muted);
}
.cta-link-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

/* ── Footer ─────────────────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
  color: var(--dim);
  font-size: 0.82rem;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .explorer-page {
    grid-template-columns: 1fr;
  }

  .explorer-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .explorer-main {
    height: auto;
    overflow-y: visible;
  }

  .sidebar-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
  }
}

@media (max-width: 700px) {
  .tiers-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .pot-grid { grid-template-columns: 1fr; }
  .block-hash { display: none; }
}

@media (max-width: 600px) {
  .cta-grid { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
  .tiers-grid { grid-template-columns: 1fr; }
}
