/* ═══════════════════════════════════════════════
   BITFOTGE — Mobile App UI · Complete Redesign
   Palette: Deep navy + electric green + soft white
   Font: Inter (system stack)
═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --g1: #00c853;          /* electric green */
  --g2: #00e676;          /* bright green */
  --g3: #69f0ae;          /* soft mint */
  --g-dark: #00952f;
  --navy: #0a0f1e;        /* deep background */
  --navy2: #111827;
  --navy3: #1f2937;
  --surface: #161d2f;     /* card surface */
  --surface2: #1e2a40;
  --border: rgba(255,255,255,0.08);
  --ink: #f0f4ff;
  --ink2: #94a3b8;
  --ink3: #64748b;
  --green: var(--g1);
  --green-d: var(--g-dark);
  --shadow-g: 0 0 24px rgba(0,200,83,0.25);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --radius: 16px;
  --radius-sm: 10px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--navy);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  padding-bottom: 84px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ── LAYOUT ─────────────────────────────────── */
.wrap {
  max-width: 480px;
  margin: 0 auto;
  background: var(--navy);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.pad { padding: 16px; }

/* ── TOPBAR ──────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
}

.topbar h1 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  background: linear-gradient(90deg, var(--g2), var(--g3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.topbar img.logo {
  height: 30px;
  border-radius: 8px;
}

.topbar .muted {
  font-size: 12px;
  color: var(--ink3);
  background: var(--navy3);
  padding: 4px 10px;
  border-radius: 20px;
}

/* ── CARDS ───────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,200,83,0.03), transparent 60%);
  pointer-events: none;
}

/* ── BUTTONS ─────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  text-align: center;
  background: linear-gradient(135deg, var(--g1), var(--g-dark));
  color: #fff;
  border: none;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(0,200,83,0.3);
  letter-spacing: 0.2px;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.15), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}

.btn:active { transform: scale(0.97); }
.btn:active::after { opacity: 1; }

.btn.outline {
  background: transparent;
  color: var(--g1);
  border: 1.5px solid var(--g1);
  box-shadow: none;
}

.btn.outline:active { background: rgba(0,200,83,0.08); }

.btn.sm {
  width: auto;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,200,83,0.25);
}

.btn.gray {
  background: var(--navy3);
  color: var(--ink2);
  box-shadow: none;
}

.btn.gray:active { background: var(--surface2); }

.btn.red {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  box-shadow: 0 4px 16px rgba(239,68,68,0.3);
}

/* ── FORMS ───────────────────────────────────── */
input, select, textarea {
  width: 100%;
  padding: 13px 16px;
  background: var(--navy3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  margin-bottom: 12px;
  transition: border-color 0.2s, background 0.2s;
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--g1);
  background: var(--surface2);
}

input::placeholder { color: var(--ink3); }

label {
  font-size: 12px;
  color: var(--ink2);
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* ── SLIDER ──────────────────────────────────── */
.slider {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--navy2);
  margin: 14px 16px;
  box-shadow: var(--shadow-card);
}

.slider .track {
  display: flex;
  transition: transform 0.5s cubic-bezier(.4,0,.2,1);
}

.slider .track img {
  flex: 0 0 100%;
  max-width: 100%;
  width: 100%;
  height: auto;
  aspect-ratio: 16/7;
  object-fit: cover;
  display: block;
}

@media (max-width: 520px) {
  .slider .track img { aspect-ratio: 16/9; }
}

/* ── QUICK ACTION GRID (4 icons) ─────────────── */
.grid4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 0 16px;
  margin: 16px 0;
}

.grid4 a {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 4px 12px;
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink2);
  transition: all 0.2s ease;
}

.grid4 a:active {
  background: var(--surface2);
  transform: scale(0.95);
}

.grid4 a .ico {
  width: 38px;
  height: 38px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0,200,83,0.15), rgba(0,200,83,0.05));
  border: 1px solid rgba(0,200,83,0.2);
  font-size: 16px !important;
  color: var(--g1) !important;
  margin: 0 !important;
  line-height: 1 !important;
  transition: transform 0.2s ease;
}

.grid4 a:active .ico { transform: scale(0.9); }

/* ── 2-COL GRID ──────────────────────────────── */
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── BALANCE BOX ─────────────────────────────── */
.balbox {
  margin: 14px 16px;
  background: linear-gradient(135deg, var(--surface), var(--surface2));
  border: 1px solid rgba(0,200,83,0.2);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-g);
}

.balbox .n {
  font-size: 34px;
  font-weight: 900;
  color: var(--g2);
  letter-spacing: -1px;
  text-shadow: 0 0 30px rgba(0,230,118,0.3);
}

/* ── TICKER ──────────────────────────────────── */
.ticker {
  height: 36px;
  overflow: hidden;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-top: 14px;
}

.ticker ul { list-style: none; animation: roll 18s linear infinite; }
.ticker li { height: 36px; line-height: 36px; padding: 0 16px; font-size: 13px; color: var(--ink2); }
@keyframes roll { 0% { transform: translateY(0) } 100% { transform: translateY(-100%) } }

/* ── BOTTOM NAV ──────────────────────────────── */
.nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 32px rgba(0,0,0,0.5);
  padding: 10px 16px calc(16px + env(safe-area-inset-bottom));
  z-index: 50;
  backdrop-filter: blur(12px);
}

.nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: 10px;
  font-weight: 500;
  color: var(--ink3);
  text-decoration: none;
  position: relative;
  transition: color 0.2s ease;
}

.nav a .ico { font-size: 20px; line-height: 1; }
.nav a.on { color: var(--g1); font-weight: 700; }

.nav a.on::before {
  content: '';
  position: absolute;
  top: -10px;
  width: 24px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--g1), var(--g2));
}

/* CENTER NAV BUTTON */
.nav .nav-center {
  flex: 0 0 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin-top: -26px;
  text-decoration: none;
  color: var(--g1);
  font-weight: 700;
}

.nav .center-ring {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--g1), var(--g-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 5px var(--surface), var(--shadow-g);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.nav .center-ring i { font-size: 24px; color: #fff; }

.nav .nav-center:active .center-ring {
  transform: scale(0.92);
  box-shadow: 0 0 0 5px var(--surface), 0 2px 8px rgba(0,200,83,0.3);
}

/* ── VIDEO CARDS ─────────────────────────────── */
.vgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 480px) {
  .vgrid { grid-template-columns: repeat(2, 1fr); }
}

.vcard {
  display: flex;
  align-items: stretch;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.vcard:active { transform: scale(0.98); }

.vcard .cover-wrap {
  position: relative;
  flex: 0 0 110px;
  width: 110px;
  aspect-ratio: 1/1;
  background: var(--navy2);
}

.vcard .cover-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.vcard .b {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  overflow: hidden;
}

.vcard .t {
  font-size: 14px;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--ink);
}

.vcard .icon-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0;
}

.vcard .icon-row i { font-size: 13px; }
.vcard .icon-row .ic-love { color: #f43f5e; }
.vcard .icon-row .ic-coin { color: var(--g1); }

.vcard .plan-earn {
  font-size: 11px;
  color: var(--ink3);
  font-weight: 600;
}

.vcard .plan-earn b { color: var(--g1); }
.vcard .plan-name { font-size: 11px; color: var(--ink3); font-weight: 500; }
.vcard .b .btn { margin-top: 6px; align-self: flex-start; min-width: 100px; }

/* ── VIDEO MODAL ─────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99;
  padding: 16px;
  backdrop-filter: blur(4px);
}

.modal.on { display: flex; }

.modal .box {
  background: var(--surface);
  width: 100%;
  max-width: 460px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.modal video, .modal iframe {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border: 0;
  display: block;
}

.timer {
  color: var(--ink2);
  text-align: center;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
}

/* ── TABLE ───────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; }
th { color: var(--ink3); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
td { color: var(--ink); }

/* ── BADGES ──────────────────────────────────── */
.badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.badge.pending { background: rgba(251,191,36,0.15); color: #fbbf24; }
.badge.approved { background: rgba(0,200,83,0.15); color: var(--g1); }
.badge.rejected { background: rgba(239,68,68,0.15); color: #ef4444; }

/* ── MESSAGES ─────────────────────────────────── */
.msg {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 500;
}

.msg.ok { background: rgba(0,200,83,0.12); color: var(--g2); border: 1px solid rgba(0,200,83,0.2); }
.msg.err { background: rgba(239,68,68,0.12); color: #f87171; border: 1px solid rgba(239,68,68,0.2); }

/* ── UTILITY ─────────────────────────────────── */
.center { text-align: center; }
.muted { color: var(--ink3); font-size: 13px; }

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.row:last-child { border-bottom: none; }
.row b { color: var(--ink); font-weight: 600; }

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--g1);
  background: var(--navy3);
  box-shadow: 0 0 20px rgba(0,200,83,0.25);
}

/* ── PROGRESS BAR ───────────────────────────── */
.progress-track {
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  margin-top: 10px;
}

.progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--g1), var(--g2));
  transition: width 0.4s ease;
  box-shadow: 0 0 8px rgba(0,200,83,0.5);
}

/* ── AUTH PAGES ──────────────────────────────── */
.auth { max-width: 420px; margin: 0 auto; padding: 40px 22px; }
.auth h2 { text-align: center; margin-bottom: 6px; }

/* ── STAT CARDS ──────────────────────────────── */
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.stat b {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--g1);
}

/* ── ADMIN ───────────────────────────────────── */
.adm { max-width: 1100px; margin: 0 auto; font-family: 'Inter', system-ui, sans-serif; }
.adm-nav { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; border-bottom: 2px solid var(--g1); background: #fafafa; }
.adm-nav a { padding: 7px 12px; border: 1px solid #e5e5e5; border-radius: 6px; font-size: 13px; background: #fff; color: #000; }
.adm-nav a.on { background: var(--g1); color: #fff; border-color: var(--g1); }
.adm .pad { padding: 18px; }
.adm table { font-size: 13px; color: #000; }
.adm table th, .adm table td { border-bottom: 1px solid #e5e5e5; color: #000; }
.adm input, .adm select { margin-bottom: 8px; background: #fff; border: 1px solid #ccc; color: #000; border-radius: 6px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }

/* ── METHOD SELECT (Withdraw) ─────────────────── */
.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
  margin: 8px 0 4px;
}

.method-option { position: absolute; opacity: 0; width: 0; height: 0; }

.method-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  background: var(--navy3);
  transition: border-color 0.15s, background 0.15s;
}

.method-option:checked + .method-label {
  border-color: var(--g1);
  background: rgba(0,200,83,0.08);
}

.method-icon { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; }
.method-icon-fallback {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--ink2);
}

.method-name { font-size: 11px; font-weight: 600; color: var(--ink); line-height: 1.2; word-break: break-word; }

/* ── DEPOSIT ACCOUNT BOX ─────────────────────── */
.hc-acct-box {
  margin: 10px 0 16px;
  padding: 14px 16px;
  background: var(--navy3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.hc-row { padding: 8px 0; border-bottom: 1px solid var(--border); }
.hc-row:last-child { border-bottom: none; padding-bottom: 2px; }
.hc-label { font-size: 11px; color: var(--ink3); text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 3px; }
.hc-value { font-size: 15px; font-weight: 600; color: var(--ink); }
.hc-account-row { display: flex; align-items: center; gap: 10px; }
.hc-account-num {
  flex: 1 1 auto; min-width: 0;
  font-size: 17px; font-weight: 700; letter-spacing: 0.3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--g2);
}

/* ── TX TABLE (compact) ──────────────────────── */
.tx-table table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.tx-table th, .tx-table td { font-size: 12px; padding: 8px 4px; text-align: left; word-break: break-word; overflow-wrap: anywhere; }
.tx-table .badge { font-size: 10px; padding: 2px 6px; }

/* ── SPIN / PROMO ────────────────────────────── */
.spin-wrap, .promo-wrap { padding: 20px; }
