/* ============================================================
   AM Premium — split-card aktivasi
   Dark clean · monokrom (hitam / putih / abu)
   Font: Comfortaa (display), Quicksand (UI), JetBrains Mono (data)
   ============================================================ */

:root {
  --bg:        #000000;
  --card:      #0b0b0b;
  --card-2:    #080808;
  --surface:   #111111;

  --text:      #ffffff;
  --text-soft: #d0d0d0;
  --muted:     #7a7a7a;

  --border:        rgba(255,255,255,.08);
  --border-strong: rgba(255,255,255,.16);

  --ok:  #ffffff;
  --err: #ff5c5c;

  --font-display: "Comfortaa", "Quicksand", ui-sans-serif, system-ui, sans-serif;
  --font-sans:    "Quicksand", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
svg.lucide { display: inline-block; vertical-align: middle; flex-shrink: 0; }

/* ---------- subtle mono background ---------- */
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aurora__blob { position: absolute; border-radius: 50%; filter: blur(90px); }
.aurora__blob--1 { top: -12%; left: -8%; width: 44vw; height: 44vw; background: rgba(255,255,255,.05); animation: drift1 18s ease-in-out infinite; }
.aurora__blob--2 { bottom: -14%; right: -8%; width: 40vw; height: 40vw; background: rgba(255,255,255,.035); animation: drift2 21s ease-in-out infinite; }
.aurora__blob--3 { display: none; }
@keyframes drift1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(36px,26px)} }
@keyframes drift2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-36px,-26px)} }
.aurora__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 100%);
}

/* ---------- layout ---------- */
.stage-wrap {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start;
  padding: 28px 20px 24px;
  gap: 16px;
}
.cardx {
  width: 100%; max-width: 480px;
  display: block;
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 40px 90px rgba(0,0,0,.7);
  animation: pop-in .5s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes pop-in { from { opacity: 0; transform: translateY(22px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---------- thin header ---------- */
.topx {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--card-2);
}

/* ---------- SIDE ---------- */
.side {
  position: relative;
  padding: 34px;
  display: flex; flex-direction: column;
  background: var(--card-2);
  border-right: 1px solid var(--border);
}
.side__top { display: flex; align-items: center; justify-content: space-between; }
.side__brand { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -.5px; color: #fff; }
.side__brand span { color: #fff; }
.status { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.status.online i { background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.14); animation: blink 1.6s infinite; }
.status.offline i { background: var(--err); }
@keyframes blink { 50% { opacity: .35; } }

.side__mid { margin: 36px 0 26px; }
.side__title { font-family: var(--font-display); font-weight: 700; font-size: 30px; line-height: 1.16; letter-spacing: -1px; color: #fff; }
.side__title .grad { color: var(--muted); -webkit-text-fill-color: currentColor; background: none; }
.side__desc { color: var(--muted); font-size: 14px; margin-top: 12px; }

/* mini terminal */
.proc {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #000;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
}
.proc__row { display: flex; align-items: center; gap: 9px; color: var(--muted); padding: 4px 0; opacity: 0; transform: translateX(-6px); animation: pin .5s forwards; }
.proc__row[data-i="1"]{animation-delay:.3s} .proc__row[data-i="2"]{animation-delay:1s} .proc__row[data-i="3"]{animation-delay:1.7s} .proc__row[data-i="4"]{animation-delay:2.4s}
@keyframes pin { to { opacity: 1; transform: none; } }
.proc__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.proc__row--ok { color: #fff; gap: 7px; }
.proc__row--ok svg { color: #fff; }
.proc__row--ok .proc__dot { display: none; }

.side__foot { display: flex; gap: 16px; margin-top: 18px; flex-wrap: wrap; }
.side__foot span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.side__foot svg { color: var(--text-soft); }

/* ---------- BOTTOM BAR (proses + jaminan) ---------- */
.botbar {
  position: relative; z-index: 1;
  width: 100%; max-width: 480px;
  display: flex; flex-direction: column;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
  padding: 20px;
}
.botbar .proc { background: #000; }
.botbar .side__foot { margin-top: 0; justify-content: center; }

/* ---------- MAIN ---------- */
.main { padding: 34px; display: flex; flex-direction: column; background: var(--card); }

/* progress bar */
.prog { margin-bottom: 28px; }
.prog__track { height: 3px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; }
.prog__fill { height: 100%; width: 33%; border-radius: 3px; background: #fff; transition: width .4s cubic-bezier(.4,0,.2,1); }
.prog__labels { display: flex; justify-content: space-between; margin-top: 12px; }
.prog__labels span { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); transition: color .25s; }
.prog__labels b {
  width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  background: transparent; color: var(--muted); border: 1px solid var(--border-strong); transition: .25s;
}
.prog__labels .is-active { color: #fff; }
.prog__labels .is-active b { background: #fff; border-color: #fff; color: #000; }
.prog__labels .is-done b { background: var(--muted); border-color: var(--muted); color: #000; }

/* stages */
.stage { display: none; animation: fade .35s both; }
.stage.is-active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.main__h { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -.4px; color: #fff; }
.main__p { color: var(--muted); font-size: 14px; margin: 6px 0 22px; }

label { display: block; font-size: 13px; font-weight: 600; color: var(--text-soft); margin-bottom: 8px; }
.field { position: relative; }
.field__ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.field input { padding-left: 44px; }
input, textarea {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
  background: #000;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 13px 15px;
  transition: border-color .18s, box-shadow .18s;
}
input::placeholder, textarea::placeholder { color: #555; }
input:focus, textarea:focus { outline: none; border-color: var(--border-strong); box-shadow: none; }
textarea { resize: vertical; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-sans); font-weight: 700; font-size: 15px; line-height: 1;
  border: 1px solid transparent; border-radius: 12px; padding: 13px 20px;
  cursor: pointer; white-space: nowrap;
  transition: transform .18s, background .18s, border-color .18s, color .18s;
}
.btn--block { width: 100%; }
.btn--grad { color: #000; background: #fff; }
.btn--grad:hover { transform: translateY(-2px); background: #e6e6e6; }
.btn--grad:active { transform: translateY(0); }
.btn--ghost { color: var(--text-soft); background: transparent; border-color: var(--border-strong); }
.btn--ghost:hover { color: #fff; border-color: #fff; background: rgba(255,255,255,.05); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.stage .btn { margin-top: 20px; }
.stage .btn + .btn { margin-top: 12px; }
.btn-row { display: flex; gap: 12px; margin-top: 20px; }
.btn-row .btn { flex: 1; margin-top: 0; }

.link-back {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 16px auto 0; background: none; border: none; cursor: pointer;
  color: var(--muted); font-family: var(--font-sans); font-size: 13px; font-weight: 600;
}
.link-back:hover { color: #fff; }
.link-back svg { transform: rotate(180deg); }

/* message */
.msg {
  margin-top: 16px;
  font-size: 11px; font-family: var(--font-mono);
  white-space: pre-line;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  text-align: center;
}
.msg[hidden] { display: none; }
.msg.ok   { color: var(--muted); }
.msg.err  { color: var(--err); }
.msg.wait { color: var(--muted); }

/* done */
.stage--done { text-align: center; }
.burst { position: relative; width: 84px; height: 84px; margin: 4px auto 16px; display: grid; place-items: center; }
.burst__ring { position: absolute; inset: 0; border-radius: 50%; background: #fff; opacity: .2; animation: ring 1.6s ease-out infinite; }
@keyframes ring { 0%{transform:scale(.7);opacity:.4} 100%{transform:scale(1.5);opacity:0} }
.done-icon {
  position: relative; width: 64px; height: 64px; border-radius: 50%;
  background: #fff; color: #000; display: grid; place-items: center;
  animation: pop .45s both;
}
@keyframes pop { 0%{transform:scale(0)} 70%{transform:scale(1.12)} 100%{transform:scale(1)} }
.summary {
  text-align: left; border: 1px solid var(--border-strong); border-radius: 12px;
  overflow: hidden; margin: 20px 0; font-family: var(--font-mono);
}
.summary div { display: flex; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 13px; }
.summary div:last-child { border-bottom: none; }
.summary .k { color: var(--muted); }
.summary .v { color: #fff; font-weight: 600; }

.tiny {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 8px;
  color: var(--muted); font-size: 12px; text-align: center;
}
.tiny__link { color: var(--text-soft); font-weight: 600; font-family: var(--font-mono); text-decoration: none; transition: color .18s; }
.tiny__link:hover { color: #fff; }
.tiny__sep { color: var(--border-strong); }

/* ---------- statistik (di dalam card, bawah header) ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--card-2);
}
.stat {
  text-align: center;
}
.stat__num {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  line-height: 1;
}
.stat__label {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  color: var(--muted);
}
@media (max-width: 400px) {
  .stat__num { font-size: 16px; }
  .stat__label { font-size: 9px; }
}

.spin {
  display: inline-block; width: 15px; height: 15px;
  border: 2px solid rgba(0,0,0,.3); border-top-color: #000;
  border-radius: 50%; animation: rot .7s linear infinite; flex-shrink: 0;
}
.btn--ghost .spin { border-color: rgba(255,255,255,.3); border-top-color: #fff; }
@keyframes rot { to { transform: rotate(360deg); } }

/* dots: lebar tetap biar teks tidak bergeser saat titik bertambah.
   animasi teks di-handle JS (app.js), CSS cuma jaga lebarnya. */
.dots {
  display: inline-block;
  width: 1.6em;
  text-align: left;
  white-space: pre;
}

/* ---------- responsive ---------- */
@media (max-width: 480px) {
  .main { padding: 24px; }
  .topx { padding: 14px 20px; }
  .prog__labels span { font-size: 0; gap: 0; }
  .prog__labels b { font-size: 11px; }
}
