/* TopupKing Custom — mobile-first, light background, purple theme */
:root {
  --purple: #6a1fb5;
  --purple2: #7b2ff7;
  --purple-soft: #f3eafd;
  --navy: #0f172a;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --card: #ffffff;
  --green: #15803d;
  --red: #b91c1c;
  --amber: #b45309;
  --gold1: #f6d365;
  --gold2: #c9920e;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Noto Sans Bengali", "Hind Siliguri", system-ui, -apple-system, "Segoe UI", sans-serif;
  padding-bottom: 76px; /* room for bottom nav */
}
a { color: var(--purple); text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; font-size: 16px; }

/* Header */
.site-header {
  background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
.header-inner {
  max-width: 960px; margin: 0 auto; padding: 10px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.logo {
  font-weight: 900; font-size: 22px; letter-spacing: 1px; line-height: 1;
  background: linear-gradient(180deg, var(--gold1), var(--gold2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 1px 0 rgba(0,0,0,.08);
}
.logo small { display: block; font-size: 10px; letter-spacing: 3px; color: var(--muted); -webkit-text-fill-color: var(--muted); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.wallet-chip {
  background: var(--purple-soft); color: var(--purple); border: 1px solid #ddd0f5;
  font-weight: 700; font-size: 14px; padding: 6px 10px; border-radius: 999px; white-space: nowrap;
}
.btn-login {
  background: var(--purple); color: #fff; border: 0; border-radius: 999px;
  padding: 8px 16px; font-weight: 700; font-size: 14px;
}

/* Notice bar */
.notice-bar {
  background: var(--purple); color: #fff; font-size: 13.5px;
  padding: 9px 38px 9px 14px; position: relative; line-height: 1.45;
}
.notice-bar button {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: transparent; border: 0; color: #fff; font-size: 18px; line-height: 1; padding: 4px 8px;
}

main { max-width: 960px; margin: 0 auto; padding: 14px; }
h1 { font-size: 21px; margin: 6px 0 4px; }
h2 { font-size: 18px; margin: 18px 0 8px; }
h3 { font-size: 16px; margin: 14px 0 6px; }
.sub { color: var(--muted); font-size: 14px; margin: 0 0 12px; }

/* Banner */
.banner {
  border-radius: 14px; overflow: hidden; position: relative; margin: 4px 0 14px;
  background: linear-gradient(120deg, #2a0a4a, var(--purple) 60%, var(--purple2));
  color: #fff; padding: 22px 18px; min-height: 132px;
  display: flex; flex-direction: column; justify-content: center;
}
.banner h1 { color: #fff; font-size: 24px; margin: 0 0 6px; }
.banner p { margin: 0; opacity: .92; font-size: 14.5px; }
.banner .gold { color: var(--gold1); }

/* Support buttons */
.support-row { display: flex; gap: 10px; margin: 0 0 16px; }
.support-row a {
  flex: 1; text-align: center; padding: 11px 6px; border-radius: 10px;
  font-weight: 700; font-size: 14.5px; color: #fff;
}
.support-row a.tg { background: #229ed9; }
.support-row a.wa { background: #25d366; }

/* Game cards */
.game-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 640px) { .game-grid { grid-template-columns: repeat(4, 1fr); } }
.game-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; display: block; color: var(--ink);
  box-shadow: 0 1px 3px rgba(15,23,42,.06);
}
.game-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.game-card .body { padding: 10px 12px 12px; }
.game-card .name { font-weight: 800; font-size: 16px; }
.game-card .tag { color: var(--muted); font-size: 13px; margin-top: 2px; }
.game-card .go { color: var(--purple); font-weight: 700; font-size: 13.5px; margin-top: 6px; }

/* Steps / cards */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; margin: 0 0 14px; box-shadow: 0 1px 3px rgba(15,23,42,.05);
}
.step-num {
  display: inline-flex; width: 28px; height: 28px; border-radius: 50%;
  background: var(--purple); color: #fff; font-weight: 800;
  align-items: center; justify-content: center; margin-right: 8px; font-size: 15px;
}
.step-title { font-size: 17px; font-weight: 800; margin: 0 0 10px; display: flex; align-items: center; }

/* Pack radio grid */
.pack-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 640px) { .pack-grid { grid-template-columns: repeat(3, 1fr); } }
.pack {
  border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 10px;
  display: flex; align-items: flex-start; gap: 8px; cursor: pointer; background: #fff;
}
.pack input { margin-top: 3px; accent-color: var(--purple); width: 17px; height: 17px; }
.pack .pname { font-weight: 700; font-size: 14.5px; line-height: 1.3; }
.pack .pprice { color: var(--purple); font-weight: 800; font-size: 15px; margin-top: 2px; }
.pack.selected { border-color: var(--purple); background: var(--purple-soft); }

/* Forms */
.field { margin: 0 0 12px; }
.field label { display: block; font-weight: 700; font-size: 14.5px; margin-bottom: 6px; }
.field input, .field select {
  width: 100%; padding: 12px; border: 1.5px solid var(--line); border-radius: 10px;
  background: #fff; outline: none;
}
.field input:focus, .field select:focus { border-color: var(--purple); }
.field .hint { color: var(--muted); font-size: 13px; margin-top: 5px; }
.field .error { color: var(--red); font-size: 13.5px; margin-top: 5px; display: none; }

.pay-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-opt {
  border: 1.5px solid var(--line); border-radius: 12px; padding: 14px 10px;
  text-align: center; cursor: pointer; background: #fff;
}
.pay-opt input { display: none; }
.pay-opt .t { font-weight: 800; font-size: 15.5px; }
.pay-opt .d { color: var(--muted); font-size: 13px; margin-top: 2px; }
.pay-opt.selected { border-color: var(--purple); background: var(--purple-soft); }

.btn-primary {
  width: 100%; background: var(--purple); color: #fff; border: 0; border-radius: 12px;
  padding: 14px; font-size: 17px; font-weight: 800;
}
.btn-primary:disabled { opacity: .55; cursor: wait; }
.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; background: #fff; color: #1f1f1f; border: 1.5px solid var(--line);
  border-radius: 12px; padding: 13px; font-size: 16.5px; font-weight: 700;
  text-decoration: none; box-sizing: border-box;
}
.btn-google .g-logo { flex: none; }
.btn-secondary {
  width: 100%; background: #fff; color: var(--purple); border: 1.5px solid var(--purple);
  border-radius: 12px; padding: 12px; font-size: 15.5px; font-weight: 700;
}
.btn-danger { background: var(--red); color: #fff; border: 0; border-radius: 10px; padding: 9px 14px; font-weight: 700; }
.btn-small { padding: 8px 12px; font-size: 13.5px; border-radius: 9px; }
.btn-ghost { background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 12px; font-weight: 700; color: var(--ink); }

.link-btn { background: none; border: 0; color: var(--purple); font-weight: 700; padding: 0; font-size: 14.5px; }
.msg { border-radius: 10px; padding: 11px 13px; font-size: 14.5px; margin: 0 0 12px; display: none; }
.msg.err { display: block; background: #fef2f2; color: var(--red); border: 1px solid #fecaca; }
.msg.ok { display: block; background: #f0fdf4; color: var(--green); border: 1px solid #bbf7d0; }
.msg.info { display: block; background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* Payment methods */
.method-list { display: grid; gap: 10px; }
.method {
  border: 1.5px solid var(--line); border-radius: 12px; padding: 13px;
  display: flex; align-items: center; gap: 10px; cursor: pointer; background: #fff;
}
.method input { accent-color: var(--purple); width: 18px; height: 18px; }
.method .mname { font-weight: 800; font-size: 16px; }
.method .mnum { font-weight: 700; color: var(--purple); font-size: 15px; letter-spacing: .5px; }
.method.selected { border-color: var(--purple); background: var(--purple-soft); }
.copy-btn {
  margin-left: auto; background: var(--purple); color: #fff; border: 0;
  border-radius: 8px; padding: 7px 12px; font-weight: 700; font-size: 13px; white-space: nowrap;
}
.pay-instructions {
  background: var(--purple-soft); border: 1px solid #e3d5fa; border-radius: 12px;
  padding: 13px 14px; font-size: 14.5px; line-height: 1.7; margin: 0 0 14px;
}
.pay-instructions b { color: var(--purple); }
.pay-instructions > div { margin-bottom: 8px; }
.pay-instructions > div:last-child { margin-bottom: 0; }

/* Bazar-style method buttons + checkout card */
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.method-btn {
  border: 1.5px solid var(--line); border-radius: 12px; padding: 16px 10px;
  text-align: center; cursor: pointer; background: #fff;
  font-weight: 800; font-size: 17px; color: var(--ink);
}
.method-btn .msub { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-top: 3px; }
.method-btn.selected { border-color: var(--purple); background: var(--purple-soft); color: var(--purple); }
.method-btn .mlogo { display: block; height: 42px; width: auto; max-width: 140px; object-fit: contain; margin: 0 auto 8px; }
.num-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
}
.num-row .num-big { font-size: 19px; font-weight: 900; color: var(--purple); letter-spacing: .5px; }
.num-row .copy-btn { margin-left: auto; }
.balance-line {
  display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  background: var(--purple-soft); border: 1px solid #e3d5fa; border-radius: 10px;
  padding: 10px 12px; font-size: 14.5px; font-weight: 700; margin: 0 0 12px;
}
.balance-line .short { color: var(--red); }
.buy-now { font-size: 18px; padding: 16px; }
.amount-line {
  display: flex; justify-content: space-between; font-size: 16px; font-weight: 800;
  padding: 4px 0 12px;
}
.amount-line .amt { color: var(--purple); font-size: 19px; }

/* Orders / lists */
.order {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 14px; margin: 0 0 10px;
}
.order .top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.order .pname { font-weight: 800; font-size: 15.5px; }
.order .price { font-weight: 800; color: var(--purple); white-space: nowrap; }
.order .meta { color: var(--muted); font-size: 13.5px; margin-top: 4px; line-height: 1.6; }
.badge {
  display: inline-block; font-size: 12.5px; font-weight: 800; padding: 3px 9px;
  border-radius: 999px; white-space: nowrap;
}
.badge.pending { background: #fef3c7; color: var(--amber); }
.badge.pending_payment { background: #ffedd5; color: #c2410c; }
.badge.delivered { background: #dcfce7; color: var(--green); }
.badge.cancelled { background: #fee2e2; color: var(--red); }
.badge.approved { background: #dcfce7; color: var(--green); }
.badge.rejected { background: #fee2e2; color: var(--red); }
.empty { text-align: center; color: var(--muted); padding: 34px 10px; font-size: 15px; }

/* How to buy */
.steps { counter-reset: s; padding: 0; margin: 0; list-style: none; }
.steps li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.steps li:last-child { border-bottom: 0; }
.steps li::before {
  counter-increment: s; content: counter(s); flex: 0 0 26px; height: 26px; border-radius: 50%;
  background: var(--purple); color: #fff; font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center; margin-top: 1px;
}

/* Rules */
.rules { font-size: 14px; line-height: 1.8; color: #334155; padding-left: 18px; margin: 4px 0; }
.rules li { margin-bottom: 2px; }

/* Bottom nav */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: #fff; border-top: 1px solid var(--line);
  display: flex; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.bottom-nav a {
  flex: 1; text-align: center; color: var(--muted); font-size: 12px; font-weight: 700;
  padding: 4px 2px; line-height: 1.3;
}
.bottom-nav a .ico { font-size: 20px; display: block; line-height: 1.2; }
.bottom-nav a.active { color: var(--purple); }

/* Footer */
.site-footer { background: var(--navy); color: #cbd5e1; margin-top: 26px; padding: 22px 14px 18px; }
.site-footer .inner { max-width: 960px; margin: 0 auto; font-size: 14px; line-height: 1.8; }
.site-footer h4 { color: #fff; margin: 0 0 6px; font-size: 15px; }
.site-footer a { color: #e9d5ff; }
.site-footer .cols { display: grid; gap: 16px; }
@media (min-width: 640px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }
.site-footer .copy { border-top: 1px solid #1e293b; margin-top: 16px; padding-top: 12px; font-size: 13px; color: #94a3b8; }

/* Admin */
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table th { color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; }
.admin-table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.tabs { display: flex; gap: 8px; margin: 0 0 14px; flex-wrap: wrap; }
.tabs button {
  border: 1.5px solid var(--line); background: #fff; border-radius: 999px;
  padding: 8px 15px; font-weight: 700; font-size: 14px; color: var(--ink);
}
.tabs button.active { background: var(--purple); color: #fff; border-color: var(--purple); }
.pack-edit { display: grid; grid-template-columns: 1fr 110px 40px; gap: 8px; align-items: center; margin-bottom: 8px; }
.pack-edit input { padding: 9px 10px; border: 1.5px solid var(--line); border-radius: 9px; width: 100%; }
.rank-row { display: flex; justify-content: space-between; padding: 8px 2px; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.rank-row:last-child { border-bottom: 0; }
.rank-row .on { color: var(--purple); font-weight: 800; }
.big-balance { font-size: 34px; font-weight: 900; color: var(--purple); margin: 2px 0 10px; }
.success-box { text-align: center; padding: 26px 10px 8px; }
.success-box .tick {
  width: 74px; height: 74px; border-radius: 50%; background: #dcfce7; color: var(--green);
  font-size: 40px; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px;
}
.muted { color: var(--muted); }
.small { font-size: 13px; }
