:root {
  --bg: #0b0e14;
  --surface: #131823;
  --surface-2: #1a2130;
  --border: #263147;
  --text: #e6edf7;
  --muted: #8b9bb4;
  --accent: #14f195;
  --accent-2: #9945ff;
  --danger: #ff5c77;
  --warn: #f5b942;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: radial-gradient(circle at top right, rgba(153, 69, 255, 0.14), transparent 40%),
              radial-gradient(circle at top left, rgba(20, 241, 149, 0.08), transparent 35%),
              var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.container { max-width: 1040px; margin: 0 auto; padding: 24px 18px 48px; }
.hidden { display: none !important; }

.header {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 24px; border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; }
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 600;
  background: rgba(20, 241, 149, 0.12); color: var(--accent);
  border: 1px solid rgba(20, 241, 149, 0.3);
}
.nav-link { color: var(--muted); text-decoration: none; font-weight: 600; }
.nav-link:hover { color: var(--text); }

.hero { padding: 36px 0 28px; }
.hero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.15; margin: 0 0 12px; }
.subtitle { color: var(--muted); max-width: 680px; margin: 0 0 16px; }
.rate-pill {
  display: inline-block; padding: 6px 12px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 0.88rem; color: var(--accent);
}

.protocols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 16px; margin-bottom: 28px;
}
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px; display: flex; flex-direction: column; gap: 14px;
}
.card-top { display: flex; justify-content: space-between; align-items: center; }
.card-top h2 { margin: 0; font-size: 1.2rem; }
.card-desc { margin: 0; color: var(--muted); font-size: 0.92rem; flex: 1; }

.status-dot {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted);
}
.status-dot.online { background: rgba(20, 241, 149, 0.14); color: var(--accent); }
.status-dot.offline { background: rgba(255, 92, 119, 0.15); color: var(--danger); }

.specs { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 0.88rem; }
.specs li { display: flex; justify-content: space-between; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 6px; }
.specs li span:first-child { color: var(--muted); }

.btn {
  cursor: pointer; border: none; border-radius: 10px; padding: 11px 16px;
  font-weight: 700; font-size: 0.92rem; text-decoration: none; text-align: center;
  transition: opacity 0.15s, transform 0.05s;
}
.btn:hover:not(:disabled) { opacity: 0.92; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--accent), #0bd47e); color: #05130d; }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-sm { padding: 8px 12px; font-size: 0.84rem; }

.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px; margin-top: 24px;
}
.panel-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.panel-header h1, .panel-header h2 { margin: 6px 0 4px; }
.muted { color: var(--muted); font-size: 0.9rem; margin: 0; }

.pay-grid, .config-grid { display: grid; grid-template-columns: 230px 1fr; gap: 24px; align-items: start; }
@media (max-width: 720px) { .pay-grid, .config-grid { grid-template-columns: 1fr; } }

.qr-box { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.qr-canvas {
  background: #ffffff; padding: 12px; border-radius: 12px;
  width: 216px; height: 216px; display: flex; align-items: center; justify-content: center;
}
.qr-canvas img, .qr-canvas svg { max-width: 100%; max-height: 100%; }

.pay-details { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.kv {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  background: var(--surface-2); padding: 10px 12px; border-radius: 8px; font-size: 0.9rem;
}
.kv code { font-size: 0.78rem; color: var(--accent); overflow: hidden; text-overflow: ellipsis; }
.wallet-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.pay-status {
  padding: 10px 12px; border-radius: 8px; background: rgba(153, 69, 255, 0.12);
  border: 1px solid rgba(153, 69, 255, 0.35); font-size: 0.88rem;
}

.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat-card { background: var(--surface-2); border-radius: 10px; padding: 12px 14px; }
.stat-label { display: block; font-size: 0.78rem; color: var(--muted); }
.stat-val { font-size: 1.15rem; }

.progress-wrap { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-bottom: 24px; }
.progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.3s; }

.endpoints-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ep-chip {
  font-size: 0.82rem; padding: 4px 10px; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.code-block {
  background: #07090e; border: 1px solid var(--border); border-radius: 10px;
  padding: 14px; overflow-x: auto; font-size: 0.82rem; white-space: pre-wrap; word-break: break-all;
}

.footer { margin-top: 48px; text-align: center; color: var(--muted); font-size: 0.82rem; }
