/* ============================================================
   TOPUP v5 — gaya bersama halaman topup Fortune Hunter
   Letak: public/pages/topup-v4.css
   Dipakai oleh topup-v4.html (halaman game) dan topup-index-v4.html (pilih game)
   ============================================================ */
:root {
  --navy: #0a0f1c;
  --navy-2: #111a30;
  --navy-3: #1a2540;
  --gold: #FFD700;
  --gold-2: #DAA520;
  --line: rgba(255, 215, 0, .28);
  --line-2: rgba(255, 215, 0, .6);
  --txt: #e9edf5;
  --mut: #9fb0cc;
  --ok: #19c37d;
  --ok-bg: #0b3d2a;
  --bad: #ff6b6b;
  --bad-bg: #4a1717;
  --warn: #ffb74d;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--navy);
  color: var(--txt);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: 110px;
  overflow-x: hidden;
}
a { color: var(--gold); }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--ok); outline-offset: 2px; }

/* ---------- Kepala ---------- */
.kepala {
  text-align: center;
  padding: 14px 12px 12px;
  background: linear-gradient(180deg, #1a233a, var(--navy));
  border-bottom: 2px solid var(--gold);
}
.kepala img.logo {
  display: block;
  width: 100%;
  max-width: 340px;
  height: auto;
  margin: 0 auto 8px;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, .3));
}
.kepala h1 { font-size: 18px; color: var(--gold); letter-spacing: .3px; }
.kepala .rate { font-size: 12px; color: var(--mut); margin-top: 2px; }

.wrap { max-width: 520px; margin: 0 auto; padding: 14px 12px 0; }

/* ---------- Kartu dan judul langkah ---------- */
.kartu {
  background: var(--navy-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}
.langkah { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.langkah .no {
  flex: 0 0 26px; height: 26px; border-radius: 50%;
  background: var(--gold); color: #1b1400;
  font-weight: 800; font-size: 13px;
  display: grid; place-items: center;
}
.langkah h2 { font-size: 15px; color: #fff; font-weight: 700; }
.bantu { font-size: 12.5px; color: var(--mut); margin-top: 6px; }

/* ---------- Isian ---------- */
.isian {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  font-weight: 600;
  color: var(--gold);
  background: #000;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  text-align: center;
}
.isian::placeholder { color: #6b7a99; font-weight: 400; }
.isian:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(255, 215, 0, .18); }

/* ---------- Paket ---------- */
.grid-paket { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pkt {
  text-align: left;
  background: var(--navy-3);
  color: var(--txt);
  border: 1px solid #2b3b5e;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.pkt .rp { display: block; font-weight: 700; font-size: 15px; color: #fff; }
.pkt .kn { display: block; font-size: 12.5px; color: var(--gold); margin-top: 1px; }
.pkt[aria-pressed="true"] { background: #2a3a5a; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(255, 215, 0, .25); }
.pkt:active { transform: scale(.98); }
.lebih {
  width: 100%; margin-top: 8px; padding: 10px;
  background: transparent; color: var(--gold);
  border: 1px dashed var(--line-2); border-radius: 10px; cursor: pointer; font-size: 13.5px;
}

/* ---------- Kalkulator ---------- */
.kalk-judul { font-size: 13px; color: var(--mut); margin: 14px 0 6px; }
.kalk { display: grid; grid-template-columns: 1fr 24px 1fr; gap: 6px; align-items: center; }
.kalk .sama { text-align: center; color: var(--gold); font-weight: 800; }
.kalk-info { min-height: 18px; text-align: center; font-size: 12.5px; margin-top: 6px; color: var(--mut); }
.kalk-info.salah { color: var(--warn); }

/* ---------- Ringkasan dan tombol ---------- */
.ringkas {
  background: #0d1528; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 10px;
}
.ringkas .baris { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 2px 0; }
.ringkas .baris span:first-child { color: var(--mut); }
.ringkas .baris b { color: #fff; text-align: right; }
.ringkas .kosong { color: var(--mut); font-size: 13.5px; text-align: center; }

.tombol {
  width: 100%; padding: 15px; border: 0; border-radius: 12px;
  font-weight: 800; font-size: 15px; cursor: pointer;
  background: linear-gradient(90deg, var(--gold), var(--gold-2)); color: #1b1400;
  transition: transform .1s, opacity .15s;
}
.tombol:active { transform: scale(.98); }
.tombol[disabled] { opacity: .45; cursor: not-allowed; }
.tombol.sekunder {
  background: transparent; color: var(--gold); border: 1px solid var(--line-2);
  padding: 12px; font-size: 14px; font-weight: 700;
}

/* ---------- Panel pembayaran ---------- */
.bayar { display: none; background: #fff; color: #111; border: 3px solid var(--gold); border-radius: 16px; padding: 16px; text-align: center; margin-bottom: 12px; }
.bayar.tampil { display: block; }
.bayar .judul { font-size: 13px; color: #555; }
.bayar .total { font-size: 28px; font-weight: 800; letter-spacing: .3px; margin: 2px 0; }
.bayar .rincian { font-size: 12.5px; color: #555; }
.bayar .qr { display: flex; justify-content: center; padding: 12px 0 6px; min-height: 304px; align-items: center; }
.bayar .qr img, .bayar .qr canvas { max-width: 100%; height: auto; }
.bayar .qr.mati { min-height: 0; }
.hitung { margin: 4px 0 10px; font-weight: 700; color: #b45309; font-size: 14px; }
.bar { height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden; margin: 0 auto 10px; max-width: 280px; }
.bar i { display: block; height: 100%; width: 100%; background: #f59e0b; transform-origin: left; transition: transform 1s linear; }
.aksi-qr { display: flex; gap: 8px; margin-top: 6px; }
.aksi-qr button {
  flex: 1; padding: 11px 8px; border-radius: 10px; cursor: pointer;
  background: #fff7d6; color: #5b4300; border: 1px solid #e0b400; font-weight: 700; font-size: 13.5px;
}
.cara { text-align: left; font-size: 13px; color: #333; margin-top: 12px; padding-left: 18px; }
.cara li { margin: 3px 0; }

/* ---------- Status ---------- */
.status { display: none; border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; font-size: 14px; }
.status.tampil { display: block; }
.status b { display: block; margin-bottom: 2px; font-size: 15px; }
.status.menunggu { background: #172036; border: 1px solid var(--line-2); color: var(--txt); }
.status.sukses { background: var(--ok-bg); border: 1px solid var(--ok); color: #d6ffe9; }
.status.gagal { background: var(--bad-bg); border: 1px solid var(--bad); color: #ffe0e0; }
.status .kecil { font-size: 12.5px; opacity: .9; margin-top: 4px; }

/* ---------- Jaminan dan kaki ---------- */
.jaminan { list-style: none; font-size: 13px; color: var(--mut); }
.jaminan li { padding: 4px 0 4px 22px; position: relative; }
.jaminan li::before { content: "\2713"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }
.kaki { text-align: center; margin: 18px 0 8px; font-size: 14px; }
.kaki a { display: inline-block; margin: 4px 10px; text-decoration: none; font-weight: 700; }
.kaki a:hover { text-decoration: underline; }
.muat { text-align: center; color: var(--mut); padding: 40px 0; }

/* ---------- Halaman pilih game ---------- */
.judul-hub { text-align: center; padding: 16px 12px 4px; }
.judul-hub h1 { color: var(--gold); font-size: 22px; }
.judul-hub p { color: var(--mut); font-size: 13.5px; margin-top: 2px; }
.grid-game { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 520px; margin: 14px auto; padding: 0 12px; }
.game {
  display: block; text-decoration: none; background: var(--navy-2);
  border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden;
  text-align: center; transition: transform .12s, box-shadow .12s;
}
.game:active { transform: scale(.98); }
.game img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; background: #000; }
.game .nama { color: var(--gold); font-weight: 800; padding: 8px 6px 0; font-size: 14.5px; }
.game .ket { color: var(--mut); font-size: 12px; padding: 0 6px 10px; }
.kolom-hub { max-width: 520px; margin: 0 auto; padding: 0 12px; }

@media (min-width: 700px) {
  .wrap, .kolom-hub { max-width: 560px; }
  .grid-game { max-width: 560px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}


/* ============================================================
   v5 — tombol 3D dan garis pemisah
   ============================================================ */
.baris-3d { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0 20px; }
.baris-3d.tiga { grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tb3d {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; padding: 10px 12px;
  border-radius: 15px; border: 2px solid var(--gold);
  text-decoration: none; text-align: center;
  font-weight: 800; font-size: 15px; letter-spacing: .2px; line-height: 1.2;
  cursor: pointer; font-family: inherit;
  color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .65);
  background: linear-gradient(180deg, #6db4ff 0%, #2d75e0 46%, #174aac 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, .55),
    inset 0 -3px 6px rgba(0, 0, 0, .35),
    0 6px 0 #0c2a6b,
    0 11px 14px rgba(0, 0, 0, .55);
  transition: transform .08s, box-shadow .08s;
}
.tb3d:active {
  transform: translateY(5px);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, .4),
    inset 0 -2px 4px rgba(0, 0, 0, .4),
    0 1px 0 #0c2a6b,
    0 3px 6px rgba(0, 0, 0, .5);
}
.tb3d.emas {
  color: #1b1400; text-shadow: 0 1px 0 rgba(255, 255, 255, .55);
  background: linear-gradient(180deg, #fff3b0 0%, #FFD700 46%, #c99700 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, .8),
    inset 0 -3px 6px rgba(120, 80, 0, .35),
    0 6px 0 #7a5a00,
    0 11px 14px rgba(0, 0, 0, .55);
}
.tb3d.emas:active {
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, .6),
    inset 0 -2px 4px rgba(120, 80, 0, .4),
    0 1px 0 #7a5a00,
    0 3px 6px rgba(0, 0, 0, .5);
}
.tb3d.tegak { flex-direction: column; min-height: 104px; font-size: 13px; padding: 10px 6px; }
.tb3d.tegak .ikon { font-size: 28px; line-height: 1; }
.tb3d.lebar { grid-column: 1 / -1; min-height: 58px; font-size: 16px; }
.panah { font-family: 'Segoe UI Symbol', sans-serif; }
.garis { border: 0; height: 2px; margin: 20px 0 16px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
body { padding-bottom: 120px; }

/* Kotak bantuan: muncul bila pesanan belum beres setelah 5 menit */
.bantuan { background: #2a1d05; border: 1px solid var(--warn); border-radius: 14px; padding: 12px 14px 4px; margin: 0 0 12px; }
.bantuan p { font-size: 14px; color: #ffe2b0; margin: 0; }
.bantuan[hidden] { display: none; }

/* ---------- Pemberitahuan khusus game ---------- */
.pemberitahuan { background: rgba(255, 215, 0, .09); border: 1px solid var(--line-2); border-left: 4px solid var(--gold); border-radius: 12px; padding: 11px 13px; margin-bottom: 12px; font-size: 13.5px; line-height: 1.5; color: var(--txt); }
.pemberitahuan[hidden] { display: none; }
