@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Outfit:wght@400;500;600;700&display=swap');

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

:root {
  --white: #FFFFFF;
  --card-bg: #FFFDF5;
  --input-bg: #F9FAFB;
  --yellow: #F5C518;
  --yellow-dark: #D4A017;
  --yellow-light: #FFE566;
  --yellow-notice: #FFF9E0;
  --blue-dark: #1A1A2E;
  --blue-darker: #0D0D1A;
  --blue-mid: #16213E;
  --text-muted: rgba(26,26,46,0.55);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 2px 16px rgba(26,26,46,0.08);
}

html, body {
  font-family: 'Outfit', sans-serif;
  background: #F3F4F6;
  color: #1A1A2E;
  min-height: 100vh;
  overflow-x: hidden;
}

.app-wrapper {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--white);
  padding-bottom: 84px;
  position: relative;
}

/* ===== LOADING ===== */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--blue-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  gap: 16px;
}
.loading-logo {
  font-family: 'Bebas Neue', cursive;
  font-size: 42px;
  color: var(--yellow);
  letter-spacing: 2px;
}
.loading-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
}
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(245,197,24,0.2);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-top: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== TOPBAR ===== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--blue-dark);
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-logo {
  font-family: 'Bebas Neue', cursive;
  font-size: 22px;
  color: var(--yellow);
  letter-spacing: 1px;
}
.topbar-balance {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(245,197,24,0.12);
  border: 1px solid rgba(245,197,24,0.25);
  border-radius: 20px;
  padding: 5px 12px;
  color: var(--yellow);
  font-weight: 700;
  font-size: 15px;
}
.topbar-balance svg { color: var(--yellow); }
.topbar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--blue-dark);
  overflow: hidden;
  flex-shrink: 0;
}
.topbar-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ===== HERO / PROFILE CARD ===== */
.hero-card {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-mid) 100%);
  padding: 24px 20px;
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(245,197,24,0.08);
}
.hero-card::after {
  content: '';
  position: absolute;
  bottom: -20px; left: -20px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: rgba(245,197,24,0.05);
}
.hero-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}
.hero-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bebas Neue', cursive;
  font-size: 26px;
  color: var(--blue-dark);
  overflow: hidden;
  border: 2px solid rgba(245,197,24,0.4);
  flex-shrink: 0;
}
.hero-avatar img { width: 100%; height: 100%; object-fit: cover; }
.hero-name { color: #fff; font-weight: 700; font-size: 17px; }
.hero-uid { color: rgba(255,255,255,0.45); font-size: 11px; font-family: monospace; margin-top: 2px; }
.hero-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}
.badge-starter  { background: rgba(156,163,175,0.2); color: #9CA3AF; }
.badge-silver   { background: rgba(192,192,192,0.2); color: #C0C0C0; }
.badge-gold     { background: rgba(245,197,24,0.2); color: var(--yellow); }
.badge-diamond  { background: rgba(96,165,250,0.2); color: #60A5FA; }
.badge-legend   { background: rgba(244,114,182,0.2); color: #F472B6; }
.hero-balance {
  position: relative;
  z-index: 1;
  text-align: center;
}
.hero-balance-label { font-size: 12px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 1px; }
.hero-balance-amount { font-family: 'Bebas Neue', cursive; font-size: 52px; color: var(--yellow); letter-spacing: 2px; line-height: 1; margin: 4px 0; }
.hero-balance-unit { font-size: 14px; color: rgba(255,255,255,0.5); }
.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
  position: relative;
  z-index: 1;
}
.hero-stat {
  text-align: center;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  padding: 8px 6px;
}
.hero-stat-val { font-family: 'Bebas Neue', cursive; font-size: 20px; color: #fff; }
.hero-stat-key { font-size: 10px; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.5px; }

/* ===== NOTICE BAR ===== */
.notice-bar {
  background: var(--yellow-notice);
  border-bottom: 1px solid rgba(212,160,23,0.2);
  padding: 10px 18px;
  font-size: 13px;
  color: var(--blue-dark);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.notice-bar svg { color: var(--yellow-dark); flex-shrink: 0; margin-top: 1px; }

/* ===== SECTION ===== */
.section { padding: 20px 16px 0; }
.section-title {
  font-family: 'Bebas Neue', cursive;
  font-size: 20px;
  color: var(--blue-dark);
  letter-spacing: 1px;
  margin-bottom: 12px;
}

/* ===== CARDS ===== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid #F0F0F0;
}

/* ===== QUICK ACTIONS ===== */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 16px;
}
.quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--blue-dark);
  text-decoration: none;
}
.quick-btn-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--input-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.15s;
  border: 1.5px solid transparent;
}
.quick-btn:hover .quick-btn-icon,
.quick-btn:active .quick-btn-icon { background: var(--yellow-notice); border-color: rgba(212,160,23,0.3); transform: translateY(-2px); }
.quick-btn-label { font-size: 11px; font-weight: 600; color: var(--blue-dark); text-align: center; }

/* ===== DAILY BONUS CARD ===== */
.daily-bonus-card {
  margin: 0 16px;
  border-radius: var(--radius);
  background: linear-gradient(120deg, var(--blue-dark), var(--blue-mid));
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  position: relative;
}
.daily-bonus-card::before {
  content: '';
  position: absolute;
  right: -20px; top: -20px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: rgba(245,197,24,0.08);
}
.daily-bonus-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(245,197,24,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--yellow);
}
.daily-bonus-info { flex: 1; }
.daily-bonus-title { color: #fff; font-weight: 700; font-size: 15px; }
.daily-bonus-sub { color: rgba(255,255,255,0.5); font-size: 12px; margin-top: 2px; }
.btn-claim {
  background: var(--yellow);
  color: var(--blue-dark);
  border: none;
  border-radius: 10px;
  padding: 9px 16px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-claim:hover { opacity: 0.9; transform: scale(1.03); }
.btn-claim:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ===== AD SLOTS ===== */
.ad-slots { padding: 0 16px; display: flex; flex-direction: column; gap: 10px; }
.ad-slot-card {
  border-radius: 14px;
  border: 2px solid transparent;
  background: var(--white);
  box-shadow: 0 1px 8px rgba(26,26,46,0.06);
  overflow: hidden;
  transition: box-shadow 0.15s;
}
.ad-slot-card:hover { box-shadow: 0 4px 20px rgba(26,26,46,0.12); }
.ad-slot-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}
.ad-slot-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ad-slot-name { font-weight: 700; font-size: 14px; flex: 1; }
.ad-slot-reward {
  font-family: 'Bebas Neue', cursive;
  font-size: 20px;
  color: var(--yellow-dark);
}
.ad-slot-reward span { font-family: 'Outfit', sans-serif; font-size: 11px; color: var(--text-muted); font-weight: 400; }
.ad-slot-progress-bar {
  height: 3px;
  background: #F3F4F6;
}
.ad-slot-progress-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--yellow);
  transition: width 0.4s;
}
.ad-slot-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 14px;
}
.ad-slot-count { font-size: 12px; color: var(--text-muted); }
.btn-watch {
  background: var(--yellow);
  color: var(--blue-dark);
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.15s, transform 0.1s;
}
.btn-watch:hover { opacity: 0.9; transform: scale(1.03); }
.btn-watch:disabled { opacity: 0.4; cursor: not-allowed; transform: none; background: #E5E7EB; color: var(--text-muted); }

/* ===== TASKS ===== */
.tasks-list { padding: 0 16px; display: flex; flex-direction: column; gap: 10px; }
.task-card {
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 1px 8px rgba(26,26,46,0.06);
  border: 1px solid #F0F0F0;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.task-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--yellow-notice);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--yellow-dark);
}
.task-info { flex: 1; }
.task-name { font-weight: 600; font-size: 14px; }
.task-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.task-reward { font-family: 'Bebas Neue', cursive; font-size: 18px; color: var(--yellow-dark); white-space: nowrap; }
.btn-task {
  background: var(--blue-dark);
  color: var(--yellow);
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.btn-task:hover { opacity: 0.85; }
.btn-task.done { background: #F0F0F0; color: var(--text-muted); cursor: not-allowed; }

/* ===== BOTTOMNAV ===== */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--white);
  border-top: 1px solid #F0F0F0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(26,26,46,0.08);
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 6px 12px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  transition: color 0.15s;
  position: relative;
}
.nav-item.active { color: var(--blue-dark); }
.nav-item.active::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 2px;
  background: var(--yellow);
  border-radius: 0 0 3px 3px;
}
.nav-item:hover { color: var(--blue-dark); }
.nav-item svg { transition: transform 0.1s; }
.nav-item.active svg { color: var(--blue-dark); }
.nav-item:active svg { transform: scale(0.9); }

/* ===== WALLET PAGE ===== */
.wallet-summary {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-mid));
  padding: 28px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.wallet-summary::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(245,197,24,0.07);
}
.wallet-summary-label { font-size: 12px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.wallet-amount { font-family: 'Bebas Neue', cursive; font-size: 56px; color: var(--yellow); letter-spacing: 2px; line-height: 1; }
.wallet-unit { font-size: 14px; color: rgba(255,255,255,0.45); margin-top: 4px; }
.wallet-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px;
}
.wallet-stat {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 14px;
  border: 1px solid #F0F0F0;
}
.wallet-stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.wallet-stat-val { font-family: 'Bebas Neue', cursive; font-size: 24px; color: var(--blue-dark); }

/* ===== WITHDRAW FORM ===== */
.section-card {
  margin: 0 16px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid #F0F0F0;
  padding: 18px;
}
.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--blue-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: block;
}
.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #E5E7EB;
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  color: var(--blue-dark);
  background: var(--input-bg);
  transition: border-color 0.15s;
  outline: none;
}
.form-input:focus { border-color: var(--yellow); background: var(--white); }
.form-group { margin-bottom: 14px; }
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231A1A2E' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.btn-primary {
  width: 100%;
  background: var(--yellow);
  color: var(--blue-dark);
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ===== HISTORY ===== */
.history-list { padding: 0 16px; display: flex; flex-direction: column; gap: 8px; }
.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid #F0F0F0;
  box-shadow: 0 1px 4px rgba(26,26,46,0.04);
}
.history-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.history-icon.credit { background: rgba(34,197,94,0.1); color: #16A34A; }
.history-icon.debit { background: rgba(239,68,68,0.1); color: #DC2626; }
.history-icon.pending { background: rgba(245,197,24,0.1); color: var(--yellow-dark); }
.history-info { flex: 1; }
.history-title { font-weight: 600; font-size: 13px; }
.history-date { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.history-amount { font-family: 'Bebas Neue', cursive; font-size: 20px; }
.history-amount.credit { color: #16A34A; }
.history-amount.debit { color: #DC2626; }
.history-status {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.history-status.approved { background: rgba(34,197,94,0.1); color: #16A34A; }
.history-status.pending { background: rgba(245,197,24,0.1); color: var(--yellow-dark); }
.history-status.rejected { background: rgba(239,68,68,0.1); color: #DC2626; }

/* ===== LEADERBOARD ===== */
.leaderboard-header {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-mid));
  padding: 24px 20px;
  text-align: center;
}
.leaderboard-title { font-family: 'Bebas Neue', cursive; font-size: 28px; color: var(--yellow); letter-spacing: 2px; }
.leaderboard-sub { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 4px; }
.top3-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  padding: 16px;
}
.podium-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.podium-rank {
  font-family: 'Bebas Neue', cursive;
  font-size: 28px;
  color: var(--yellow);
}
.podium-rank.r2 { font-size: 22px; color: #9CA3AF; }
.podium-rank.r3 { font-size: 22px; color: #CD7F32; }
.podium-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--blue-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bebas Neue', cursive;
  font-size: 24px;
  color: #fff;
  border: 3px solid var(--yellow);
}
.podium-avatar.r2 { width: 46px; height: 46px; border-color: #9CA3AF; }
.podium-avatar.r3 { width: 46px; height: 46px; border-color: #CD7F32; }
.podium-name { font-size: 11px; font-weight: 700; text-align: center; max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-score { font-family: 'Bebas Neue', cursive; font-size: 16px; color: var(--yellow-dark); }
.leaderboard-list { padding: 0 16px; display: flex; flex-direction: column; gap: 8px; }
.lb-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid #F0F0F0;
}
.lb-rank { font-family: 'Bebas Neue', cursive; font-size: 20px; width: 28px; text-align: center; flex-shrink: 0; }
.lb-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--blue-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bebas Neue', cursive;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
}
.lb-name { flex: 1; font-weight: 600; font-size: 13px; }
.lb-score { font-family: 'Bebas Neue', cursive; font-size: 22px; color: var(--yellow-dark); }
.lb-self { border: 2px solid var(--yellow); }

/* ===== REFERRAL PAGE ===== */
.referral-header {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-mid));
  padding: 24px 20px;
}
.referral-title { font-family: 'Bebas Neue', cursive; font-size: 26px; color: var(--yellow); letter-spacing: 1px; }
.referral-sub { font-size: 13px; color: rgba(255,255,255,0.55); margin-top: 4px; }
.referral-stats-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 16px; }
.referral-stat {
  text-align: center;
  background: rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 8px 4px;
}
.referral-stat-val { font-family: 'Bebas Neue', cursive; font-size: 24px; color: var(--yellow); }
.referral-stat-key { font-size: 10px; color: rgba(255,255,255,0.4); }
.link-box {
  background: var(--input-bg);
  border: 1.5px solid #E5E7EB;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--blue-dark);
  word-break: break-all;
  font-family: monospace;
}
.btn-copy {
  background: var(--blue-dark);
  color: var(--yellow);
  border: none;
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  transition: opacity 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.btn-copy:hover { opacity: 0.85; }
.btn-share {
  background: var(--yellow);
  color: var(--blue-dark);
  border: none;
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  transition: opacity 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.btn-share:hover { opacity: 0.9; }
.level-reward-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #F3F4F6;
}
.level-reward-item:last-child { border-bottom: none; }
.level-reward-check {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.level-reward-check.done { background: rgba(34,197,94,0.1); color: #16A34A; }
.level-reward-check.pending { background: rgba(245,197,24,0.1); color: var(--yellow-dark); }
.level-reward-name { flex: 1; font-weight: 600; font-size: 13px; }
.level-reward-refs { font-size: 11px; color: var(--text-muted); }
.level-reward-bonus { font-family: 'Bebas Neue', cursive; font-size: 18px; color: var(--yellow-dark); }
.ref-member-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #F3F4F6;
}
.ref-member-item:last-child { border-bottom: none; }
.ref-member-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--blue-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}
.ref-member-name { flex: 1; font-size: 13px; font-weight: 600; }
.ref-member-bonus { font-size: 12px; color: #16A34A; font-weight: 700; }

/* ===== POPUP MODAL ===== */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.popup-box {
  background: var(--white);
  border-radius: 20px;
  padding: 24px 20px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: popIn 0.25s ease;
}
@keyframes popIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.popup-title { font-family: 'Bebas Neue', cursive; font-size: 24px; margin-bottom: 10px; }
.popup-content { font-size: 14px; color: var(--text-muted); margin-bottom: 18px; line-height: 1.6; }
.popup-btn {
  background: var(--yellow);
  color: var(--blue-dark);
  border: none;
  border-radius: 10px;
  padding: 12px 28px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  top: 20px; left: 50%;
  transform: translateX(-50%) translateY(-80px);
  background: var(--blue-dark);
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  z-index: 9999;
  transition: transform 0.3s ease;
  max-width: 340px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: #16A34A; }
.toast.error { background: #DC2626; }
.toast.warning { background: var(--yellow-dark); color: var(--blue-dark); }

/* ===== AD OVERLAY ===== */
.ad-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}
.ad-loading-box {
  background: var(--white);
  border-radius: 20px;
  padding: 32px 24px;
  text-align: center;
  max-width: 300px;
  width: 100%;
}
.ad-loading-spinner {
  width: 50px; height: 50px;
  border: 4px solid rgba(245,197,24,0.2);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
.ad-loading-title { font-family: 'Bebas Neue', cursive; font-size: 22px; }
.ad-loading-sub { font-size: 13px; color: var(--text-muted); margin-top: 6px; }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-state svg { opacity: 0.3; margin-bottom: 12px; }
.empty-state-title { font-weight: 700; font-size: 16px; color: var(--blue-dark); margin-bottom: 6px; }
.empty-state-sub { font-size: 13px; }

/* ===== SEND BALANCE ===== */
.send-steps { display: flex; flex-direction: column; gap: 0; }
.step-indicator { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; }
.step-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #E5E7EB;
}
.step-dot.active { background: var(--yellow); }
.step-dot.done { background: #16A34A; }

/* ===== FAQ ===== */
.faq-item { border-bottom: 1px solid #F0F0F0; }
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  gap: 10px;
}
.faq-question svg { flex-shrink: 0; transition: transform 0.2s; color: var(--text-muted); }
.faq-question.open svg { transform: rotate(180deg); }
.faq-answer { display: none; padding: 0 18px 14px; font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.faq-answer.open { display: block; }

/* ===== MISC ===== */
.divider { height: 1px; background: #F0F0F0; margin: 4px 0; }
.text-center { text-align: center; }
.text-yellow { color: var(--yellow-dark); }
.font-bebas { font-family: 'Bebas Neue', cursive; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.p-4 { padding: 16px; }

/* ===== AD TIMER ===== */
.ad-timer-ring { position: relative; }
.ad-timer-count {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bebas Neue', cursive;
  font-size: 24px;
  color: var(--blue-dark);
}

/* ===== ANNOUNCEMENT BANNER ===== */
.announcement-banner {
  background: var(--blue-dark);
  color: #fff;
  padding: 10px 16px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.announcement-banner svg { color: var(--yellow); flex-shrink: 0; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(26,26,46,0.15); border-radius: 2px; }

/* ===== SAFE AREA ===== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottom-nav { padding-bottom: env(safe-area-inset-bottom); }
  .app-wrapper { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
}
