/* ── QRIS ANGSANA94 – Stylesheet ── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=DM+Mono:wght@400;500;600&display=swap');

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

:root {
  --red:    #E8192C;
  --navy:   #0B1521;
  --gray:   #7a8fa3;
  --green:  #00D68F;
  --border: rgba(255,255,255,0.08);
}

/* ── BASE ── */
html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--navy);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 70% 50% at 15% 0%,  rgba(232,25,44,0.15) 0%, transparent 55%),
    radial-gradient(ellipse 50% 60% at 90% 100%, rgba(232,25,44,0.10) 0%, transparent 50%);
}

/* ── MAIN CARD ── */
.card {
  position: relative; z-index: 1;
  background: rgba(255,255,255,0.035);
  backdrop-filter: blur(32px);
  border: 1px solid var(--border);
  border-radius: 32px; width: 100%; max-width: 400px;
  padding: 28px 24px 24px;
  box-shadow: 0 48px 96px rgba(0,0,0,0.55), 0 1px 0 rgba(255,255,255,0.06) inset;
  animation: rise 0.65s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(28px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

/* ── TOP BAR ── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}

.qris-logo {
  display: flex; align-items: center; gap: 7px;
  background: var(--red); border-radius: 10px; padding: 6px 11px;
}
.qris-logo span { font-size: 12px; font-weight: 800; color: #fff; letter-spacing: 0.06em; }

.gpn-tag {
  font-size: 11px; font-weight: 800; letter-spacing: 0.1em; color: var(--gray);
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 5px 10px;
}

/* ── MERCHANT ── */
.merchant { text-align: center; margin-bottom: 16px; }
.merchant-name {
  font-size: 24px; font-weight: 900; color: #fff;
  letter-spacing: -0.025em; margin-bottom: 5px;
}
.merchant-nmid {
  font-family: 'DM Mono', monospace; font-size: 11px; color: var(--gray);
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 7px; display: inline-block; padding: 3px 10px;
}

/* ── QR FRAME ── */
.qr-frame {
  background: #fff; border-radius: 20px; padding: 14px;
  margin-bottom: 14px; box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  position: relative; transition: box-shadow 0.3s;
}
.qr-frame.pulse { box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 0 3px var(--red); }

#qrcode { width: 100%; display: flex; align-items: center; justify-content: center; }
#qrcode canvas, #qrcode img { width: 100% !important; height: auto !important; border-radius: 4px; }

.qr-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px; padding: 0 2px;
}
.qr-amount-pill {
  background: var(--red); color: #fff; font-size: 11px; font-weight: 700;
  border-radius: 6px; padding: 3px 9px; font-family: 'DM Mono', monospace;
  opacity: 0; transform: scale(0.8);
  transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.qr-amount-pill.on { opacity: 1; transform: scale(1); }
.slot-tag { font-size: 10px; font-weight: 700; color: var(--red); font-family: 'DM Mono', monospace; letter-spacing: 0.08em; }

/* ── SPINNER ── */
.spinner {
  position: absolute; inset: 0; border-radius: 20px;
  background: rgba(255,255,255,0.92);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.2s; z-index: 5;
}
.spinner.on { opacity: 1; }
.ring {
  width: 38px; height: 38px;
  border: 3px solid rgba(232,25,44,0.2);
  border-top-color: var(--red);
  border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── AMOUNT ── */
.amt-section { text-align: center; margin-bottom: 10px; }
.amt-lbl {
  font-size: 11px; color: var(--gray); font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 3px;
}
.amt-val {
  font-size: 28px; font-weight: 900; letter-spacing: -0.03em;
  font-family: 'DM Mono', monospace;
  color: rgba(255,255,255,0.18); min-height: 38px; transition: color 0.3s;
}
.amt-val.active { color: var(--green); animation: pop 0.22s cubic-bezier(0.34,1.56,0.64,1); }
@keyframes pop {
  0%   { transform: scale(0.9); }
  60%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}
.amt-val.placeholder {
  font-size: 14px; font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 500; letter-spacing: 0; color: rgba(255,255,255,0.18);
}

/* ── DIVIDER ── */
.div { height: 1px; background: rgba(255,255,255,0.07); margin: 12px 0; }

/* ── LABELS ── */
.sec-lbl {
  font-size: 11px; font-weight: 700; color: var(--gray);
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 8px;
}

/* ── INPUT ── */
.input-wrap { position: relative; margin-bottom: 10px; }
.prefix {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-size: 14px; font-weight: 700; color: var(--gray);
  font-family: 'DM Mono', monospace; pointer-events: none;
}
.nom-input {
  width: 100%; background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 14px; padding: 14px 14px 14px 42px;
  font-size: 20px; font-weight: 700; color: #fff;
  font-family: 'DM Mono', monospace; outline: none;
  transition: border-color 0.2s, background 0.2s; letter-spacing: 0.02em;
}
.nom-input::placeholder {
  color: rgba(255,255,255,0.18); font-size: 14px;
  font-weight: 400; font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: 0;
}
.nom-input:focus { border-color: var(--red); background: rgba(232,25,44,0.07); }

/* ── QUICK BUTTONS ── */
.quick-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 7px; margin-bottom: 16px;
}
.qbtn {
  background: rgba(255,255,255,0.05); border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 11px; padding: 9px 4px; font-size: 12px; font-weight: 700;
  color: rgba(255,255,255,0.6); cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif; transition: all 0.16s; text-align: center;
}
.qbtn:hover { background: rgba(232,25,44,0.14); border-color: rgba(232,25,44,0.35); color: #fff; transform: translateY(-1px); }
.qbtn:active { transform: scale(0.96); }
.qbtn.sel { background: rgba(232,25,44,0.22); border-color: var(--red); color: #fff; }

/* ── BUTTONS ── */

.reset-btn {
  width: 100%; background: transparent;
  border: 1.5px solid rgba(255,255,255,0.09);
  border-radius: 11px; padding: 11px; font-size: 12px; font-weight: 600; color: var(--gray);
  cursor: pointer; font-family: 'Plus Jakarta Sans', sans-serif; transition: all 0.16s; margin-top: 8px;
}
.reset-btn:hover { border-color: rgba(255,255,255,0.18); color: #fff; }

/* ── FOOTER ── */
.footer {
  text-align: center; margin-top: 16px;
  font-size: 10px; color: rgba(255,255,255,0.18); letter-spacing: 0.04em;
}

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: rgba(0,214,143,0.14); border: 1px solid rgba(0,214,143,0.35);
  backdrop-filter: blur(16px); color: var(--green); font-size: 13px; font-weight: 700;
  border-radius: 50px; padding: 10px 22px; white-space: nowrap; z-index: 999;
  opacity: 0; pointer-events: none; transition: all 0.3s cubic-bezier(0.22,1,0.36,1);
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── RESPONSIVE ── */
@media (max-width: 430px) {
  .card { padding: 20px 14px 18px; border-radius: 24px; }
  .merchant-name { font-size: 20px; }
  .amt-val { font-size: 22px; }

}

/* ── ACTION ROW ── */
.action-row {
  display: flex; gap: 8px; margin-bottom: 0;
}

.dl-btn {
  flex: 1; border: none; border-radius: 15px; padding: 15px;
  font-size: 14px; font-weight: 800; color: #fff; cursor: pointer;
  font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: -0.01em;
  background: var(--red); box-shadow: 0 8px 24px rgba(232,25,44,0.35);
  transition: all 0.2s; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.dl-btn::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.14) 0%, transparent 55%);
  pointer-events: none;
}
.dl-btn:hover:not(:disabled) { background: #ff2438; transform: translateY(-2px); box-shadow: 0 12px 32px rgba(232,25,44,0.45); }
.dl-btn:active:not(:disabled) { transform: translateY(0); }
.dl-btn:disabled { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.22); box-shadow: none; cursor: not-allowed; }

.reset-btn {
  flex: 0 0 auto;
  width: auto; padding: 15px 18px;
  margin-top: 0;
}
