:root {
  color-scheme: dark;
  --bg: #070b17;
  --panel: rgba(17, 24, 45, 0.72);
  --panel-strong: rgba(19, 27, 50, 0.95);
  --line: rgba(255, 255, 255, 0.09);
  --text: #f7f9ff;
  --muted: #9ca8c4;
  --blue: #6ea8ff;
  --cyan: #58e4d6;
  --success: #68e6a5;
  --warning: #ffd16a;
  --danger: #ff7d8b;
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(69, 104, 255, 0.14), transparent 34%),
    radial-gradient(circle at 95% 35%, rgba(61, 227, 208, 0.1), transparent 28%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.orb { position: fixed; border-radius: 50%; filter: blur(80px); pointer-events: none; opacity: .18; z-index: -1; }
.orb-one { width: 360px; height: 360px; background: #456cff; left: -180px; top: 240px; }
.orb-two { width: 320px; height: 320px; background: #35e0c8; right: -180px; top: 520px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(22px, 6vw, 90px);
  background: rgba(7, 11, 23, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(145deg, #77a8ff, #5266ff 60%, #56e2d1);
  color: white;
  font-weight: 900;
  box-shadow: 0 10px 30px rgba(78, 104, 255, .32);
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: .98rem; letter-spacing: .01em; }
.brand small { color: var(--muted); font-size: .72rem; }
nav { display: flex; gap: 26px; color: var(--muted); font-size: .9rem; }
nav a:hover { color: var(--text); }

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.hero {
  min-height: 690px;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  align-items: center;
  gap: 70px;
  padding: 78px 0 44px;
}
.eyebrow { color: var(--cyan); font-size: .76rem; font-weight: 800; letter-spacing: .18em; }
.hero h1 { margin: 18px 0 22px; font-size: clamp(3.2rem, 7vw, 6.7rem); line-height: .94; letter-spacing: -.06em; }
.hero h1 span { color: transparent; background: linear-gradient(90deg, #8bb7ff, #5de4d4); -webkit-background-clip: text; background-clip: text; }
.hero-copy > p { max-width: 680px; color: var(--muted); font-size: 1.1rem; }
.hero-actions { display: flex; gap: 12px; margin: 34px 0; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--text);
  font-weight: 750;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.button:hover { transform: translateY(-2px); }
.button.primary { background: linear-gradient(135deg, #6d9cff, #5663f3 65%, #4bd8c8); box-shadow: 0 16px 36px rgba(73, 101, 243, .28); }
.button.ghost { background: rgba(255,255,255,.035); border-color: var(--line); }
.button.full { width: 100%; }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.trust-row { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: .82rem; }
.trust-row span { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.025); }

.glass { background: var(--panel); border: 1px solid var(--line); box-shadow: 0 28px 80px rgba(0,0,0,.25); backdrop-filter: blur(18px); }
.hero-card { padding: 28px; border-radius: 30px; transform: rotate(1.2deg); }
.card-head, .panel-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; font-weight: 800; }
.live-dot, .status-pill { color: var(--success); font-size: .72rem; padding: 7px 10px; border-radius: 999px; background: rgba(104,230,165,.1); border: 1px solid rgba(104,230,165,.22); }
.flow-step { display: flex; gap: 16px; align-items: center; padding: 18px; border-radius: 18px; background: rgba(255,255,255,.025); }
.flow-step.active { border: 1px solid rgba(105,156,255,.26); background: linear-gradient(120deg, rgba(93,128,255,.14), rgba(83,226,211,.06)); }
.flow-step b { display: grid; place-items: center; min-width: 38px; height: 38px; border-radius: 12px; background: rgba(255,255,255,.07); color: var(--blue); }
.flow-step strong, .flow-step small { display: block; }
.flow-step small { color: var(--muted); margin-top: 3px; }
.flow-line { height: 26px; width: 1px; margin-left: 37px; background: var(--line); }

.section { padding: 110px 0; }
.section-heading { max-width: 720px; margin-bottom: 34px; }
.section-heading h2 { margin: 10px 0 8px; font-size: clamp(2.1rem, 4vw, 3.7rem); letter-spacing: -.04em; }
.section-heading p { color: var(--muted); margin: 0; }
.tester-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 24px; align-items: start; }
.panel { padding: 28px; border-radius: var(--radius); }
label { display: block; margin-bottom: 18px; color: #dce3f6; font-size: .88rem; font-weight: 700; }
label span { color: var(--muted); font-weight: 500; }
input, select {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(5, 9, 20, .65);
  color: var(--text);
  padding: 14px 15px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
input:focus, select:focus { border-color: rgba(102, 155, 255, .75); box-shadow: 0 0 0 4px rgba(102, 155, 255, .11); }
.two-col { display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; }
.form-note { color: var(--muted); font-size: .78rem; text-align: center; margin: 12px 0 0; }
.hidden { display: none !important; }

.result-panel { min-height: 590px; }
.empty-state { min-height: 530px; display: grid; place-content: center; text-align: center; color: var(--muted); }
.empty-state h3 { color: var(--text); margin: 12px 0 4px; }
.empty-state p { margin: 0; }
.empty-icon { margin: auto; display: grid; place-items: center; width: 78px; height: 78px; border-radius: 24px; background: rgba(255,255,255,.04); border: 1px solid var(--line); font-size: 2.1rem; color: var(--cyan); }
.status-pill.pending { color: var(--warning); background: rgba(255,209,106,.09); border-color: rgba(255,209,106,.2); }
.status-pill.success { color: var(--success); background: rgba(104,230,165,.1); border-color: rgba(104,230,165,.22); }
.status-pill.failed { color: var(--danger); background: rgba(255,125,139,.1); border-color: rgba(255,125,139,.22); }
.qr-frame { width: min(360px, 100%); aspect-ratio: 1; margin: 0 auto 22px; padding: 16px; border-radius: 24px; background: white; box-shadow: 0 18px 48px rgba(0,0,0,.26); }
.qr-frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
.amount-line { display: flex; justify-content: space-between; align-items: end; margin: 12px 0 18px; }
.amount-line strong { font-size: 2rem; letter-spacing: -.03em; }
.amount-line small { color: var(--muted); }
.result-list { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.result-list > div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); align-items: center; }
.result-list > div:last-child { border-bottom: 0; }
.result-list span { color: var(--muted); font-size: .82rem; }
.result-list code { overflow: hidden; text-overflow: ellipsis; color: #cfe0ff; }
.result-actions { display: flex; gap: 10px; margin-top: 18px; }
details { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
summary { color: var(--muted); cursor: pointer; }
pre { overflow: auto; white-space: pre-wrap; word-break: break-word; background: rgba(4,8,18,.72); border: 1px solid var(--line); border-radius: 14px; padding: 14px; color: #c8d7f4; font-size: .78rem; }

.endpoint-list { display: grid; gap: 14px; }
.endpoint-card { border-radius: 20px; padding: 22px; }
.endpoint-card > div { display: flex; gap: 14px; align-items: center; }
.endpoint-card p { color: var(--muted); margin: 10px 0 0; }
.endpoint-card pre { margin-bottom: 0; }
.method { min-width: 54px; padding: 5px 8px; border-radius: 8px; text-align: center; font-size: .72rem; font-weight: 900; }
.method.get { color: var(--cyan); background: rgba(88,228,214,.1); }

footer { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 34px 0 50px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font-size: .84rem; }
#toast { position: fixed; right: 20px; bottom: 20px; z-index: 50; max-width: 360px; padding: 14px 16px; border-radius: 14px; background: #18213b; border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0,0,0,.35); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s ease; }
#toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  nav { display: none; }
  .hero { grid-template-columns: 1fr; gap: 34px; min-height: auto; padding-top: 70px; }
  .hero-card { transform: none; }
  .tester-grid { grid-template-columns: 1fr; }
  .section { padding: 82px 0; }
}

@media (max-width: 560px) {
  main, footer { width: min(100% - 24px, 1180px); }
  .topbar { padding: 14px 16px; }
  .hero h1 { font-size: 3.25rem; }
  .hero-actions, .result-actions { flex-direction: column; }
  .two-col { grid-template-columns: 1fr; gap: 0; }
  .panel, .hero-card { padding: 20px; border-radius: 20px; }
  .result-list > div { grid-template-columns: 1fr; gap: 4px; }
  footer { align-items: flex-start; flex-direction: column; }
}
