/* =============================================
   Zora Prediction — Main Stylesheet
   Mobile-first dark prediction market UI
   ============================================= */

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

/* ─── CSS Variables ─── */
:root {
  --bg-primary:    #08080f;
  --bg-card:       #111120;
  --bg-card2:      #181830;
  --bg-overlay:    rgba(10, 10, 25, 0.95);
  --border:        rgba(255,255,255,0.07);
  --border-glow:   rgba(99,102,241,0.3);
  --accent:        #6366f1;
  --accent2:       #818cf8;
  --accent-glow:   rgba(99,102,241,0.25);
  --green:         #22c55e;
  --green-bg:      #166534;
  --red:           #ef4444;
  --red-bg:        #7f1d1d;
  --text:          #f1f5f9;
  --text-muted:    #94a3b8;
  --text-dim:      #475569;
  --yellow:        #f59e0b;
  --radius:        14px;
  --radius-sm:     8px;
  --shadow:        0 4px 24px rgba(0,0,0,0.6);
  --shadow-card:   0 8px 32px rgba(0,0,0,0.7);
  --transition:    0.2s ease;
}

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text);
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }

/* ─── App Wrapper ─── */
#app { display: flex; flex-direction: column; min-height: 100vh; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HEADER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-overlay);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  gap: 10px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo img {
  height: 32px;
  width: auto;
  object-fit: contain;
}
.logo-text {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-wallet {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  border: none;
  border-radius: 20px;
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 0 16px var(--accent-glow);
}
.btn-wallet:hover { transform: scale(1.03); filter: brightness(1.1); }
.btn-wallet svg { width: 14px; height: 14px; }

.btn-icon {
  width: 36px;
  height: 36px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
}
.btn-icon:hover { background: var(--border-glow); color: var(--text); }

/* ─── Settings Dropdown ─── */
.settings-wrap { position: relative; }
.settings-dropdown {
  position: absolute; top: 120%; right: 0;
  width: 180px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column; overflow: hidden; z-index: 200;
}
.settings-dropdown.open {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.settings-item {
  padding: 12px 16px; font-size: 13px; font-weight: 500; color: var(--text-muted);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  cursor: pointer; background: transparent; border: none; text-align: left;
  transition: var(--transition); width: 100%; border-bottom: 1px solid rgba(255,255,255,0.02);
}
.settings-item:last-child { border-bottom: none; }
.settings-item:hover { background: var(--bg-card2); color: var(--text); }
.settings-item i { color: var(--accent); opacity: 0.8; font-size: 14px; width: 16px; text-align: center; }

/* ─── Nav Tabs ─── */
.nav-tabs {
  display: flex;
  padding: 0 12px 10px;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-tabs::-webkit-scrollbar { display: none; }

.nav-tab {
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  border: none;
  background: transparent;
}
.nav-tab:hover { color: var(--text); background: var(--bg-card2); }
.nav-tab.active {
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: white;
  font-weight: 600;
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MAIN CONTENT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.main-content {
  flex: 1;
  padding: 14px 14px 80px;
}

/* ─── Search Bar ─── */
.search-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.search-wrap {
  flex: 1;
  position: relative;
}

.search-wrap input {
  width: 100%;
  padding: 11px 16px 11px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}
.search-wrap input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.search-wrap input::placeholder { color: var(--text-dim); }

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.btn-add {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  border: none;
  border-radius: var(--radius);
  color: white;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: 0 0 12px var(--accent-glow);
  flex-shrink: 0;
}
.btn-add:hover { transform: scale(1.06); filter: brightness(1.1); }

/* ─── Section Label ─── */
.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* ─── Balance Card ─── */
.balance-card {
  background: linear-gradient(135deg, var(--bg-card2), #1e1e40);
  border: 1px solid var(--border-glow);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  position: relative;
  overflow: hidden;
}
.balance-label { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-muted); opacity: 0.8; }
.balance-amount { font-size: 32px; font-weight: 800; margin: 8px 0; font-family: 'Inter', sans-serif; }
.balance-amount small { font-size: 14px; font-weight: 600; color: var(--accent2); margin-left: 4px; }
.balance-actions { display: flex; gap: 12px; margin-top: 16px; }
.balance-actions .btn { flex: 1; padding: 10px; font-size: 13px; font-weight: 700; border-radius: 12px; border: none; cursor: pointer; transition: 0.2s; }
.btn-primary { background: var(--accent); color: white; }
.btn-secondary { background: rgba(255,255,255,0.08); color: white; }

/* ─── Profile Avatar Small ─── */
.user-avatar-mini {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: white;
  margin-right: -4px;
  border: 1px solid var(--bg-primary);
  object-fit: cover;
}

/* ─── Categories ─── */
.categories {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 20px;
  padding-bottom: 2px;
}
.categories::-webkit-scrollbar { display: none; }

.cat-btn {
  padding: 7px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-card2);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}
.cat-btn:hover { color: var(--text); border-color: var(--accent); }
.cat-btn.active {
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: white;
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 0 10px var(--accent-glow);
}

/* ─── Sort & Markets Header ─── */
.markets-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.sort-select {
  padding: 6px 10px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MARKET CARD
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.market-card {
  background: rgba(17, 17, 32, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 12px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  cursor: default;
}
.market-card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 0 20px rgba(99,102,241,0.1);
  transform: translateY(-1px);
}

.card-timer {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
  justify-content: flex-end;
}
.card-timer svg { color: var(--accent2); }

.card-top {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.card-img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-card2);
}

.card-img-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--bg-card2), #1e1e40);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}

.card-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
  background: var(--accent-glow);
  color: var(--accent2);
}

/* ─── Probability Bar ─── */
.prob-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 5px;
}
.prob-yes { color: var(--green); }
.prob-no  { color: var(--red); }

.prob-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--red);
  overflow: hidden;
  margin-bottom: 12px;
  position: relative;
}
.prob-bar-yes {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--green), #4ade80);
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
}

/* ─── Bet Buttons ─── */
.bet-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.btn-yes, .btn-no {
  padding: 10px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-yes {
  background: var(--green);
  color: white;
  box-shadow: 0 4px 14px rgba(34,197,94,0.25);
}
.btn-yes:hover { background: #16a34a; transform: scale(1.02); }
.btn-yes:active { transform: scale(0.97); }

.btn-no {
  background: var(--red);
  color: white;
  box-shadow: 0 4px 14px rgba(239,68,68,0.25);
}
.btn-no:hover { background: #dc2626; transform: scale(1.02); }
.btn-no:active { transform: scale(0.97); }

.card-footer {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-dim);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BOTTOM NAV BAR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--bg-overlay);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
}

.bnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 8px;
  cursor: pointer;
  transition: var(--transition);
  gap: 3px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-family: inherit;
}
.bnav-item svg { transition: var(--transition); }
.bnav-item.active { color: var(--accent); }
.bnav-item.active svg { filter: drop-shadow(0 0 6px var(--accent)); }
.bnav-item span { font-size: 10px; font-weight: 500; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MODAL
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.modal-bg {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 200;
  backdrop-filter: blur(4px);
  align-items: flex-end;
  justify-content: center;
}
.modal-bg.open { display: flex; animation: fadeIn 0.2s ease; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.modal {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid var(--border);
  padding: 0 0 32px;
  animation: slideUp 0.3s cubic-bezier(0.4,0,0.2,1);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--text-dim);
  border-radius: 2px;
  margin: 12px auto 16px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 16px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.modal-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-card2);
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: var(--transition);
}
.modal-close:hover { background: var(--red-bg); color: var(--red); }

.modal-body { padding: 20px; }

/* ─── Form Elements ─── */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-input::placeholder { color: var(--text-dim); }

select.form-input { cursor: pointer; }
select.form-input option { background: var(--bg-card2); }

textarea.form-input { resize: vertical; min-height: 80px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  box-shadow: 0 0 20px var(--accent-glow);
}
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
  width: 100%;
  padding: 13px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
  margin-top: 10px;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.form-divider {
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  margin: 12px 0;
  position: relative;
}
.form-divider::before, .form-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}
.form-divider::before { left: 0; }
.form-divider::after { right: 0; }

.form-error {
  color: var(--red);
  font-size: 12px;
  margin-top: 8px;
  display: none;
}
.form-error.show { display: block; }

/* ─── Bet Modal ─── */
.bet-modal-question {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.5;
}

.bet-choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.choice-btn {
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.choice-btn.yes { background: rgba(34,197,94,0.15); color: var(--green); border-color: var(--green); }
.choice-btn.no  { background: rgba(239,68,68,0.15);  color: var(--red);   border-color: var(--red); }
.choice-btn.yes.selected { background: var(--green); color: white; }
.choice-btn.no.selected  { background: var(--red);   color: white; }

.amount-presets {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.preset-btn {
  padding: 6px 14px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}
.preset-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

.payout-info {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.payout-label { font-size: 12px; color: var(--text-muted); }
.payout-value { font-size: 16px; font-weight: 700; color: var(--green); }

.balance-info {
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.balance-info strong { color: var(--accent2); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PAGES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.page { display: none; animation: fadeIn 0.3s ease; }
.page.active { display: block; }

/* ─── Leaderboard ─── */
.leaderboard-list { margin-top: 8px; }

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  transition: var(--transition);
}
.leaderboard-item:hover { border-color: var(--border-glow); }

.lb-rank {
  font-size: 16px;
  font-weight: 800;
  width: 28px;
  text-align: center;
  color: var(--text-dim);
}
.leaderboard-item:nth-child(1) .lb-rank { color: #f59e0b; }
.leaderboard-item:nth-child(2) .lb-rank { color: #94a3b8; }
.leaderboard-item:nth-child(3) .lb-rank { color: #cd7c2f; }

.lb-avatar {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: white;
  flex-shrink: 0;
}

.lb-info { flex: 1; }
.lb-name { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.lb-stats { font-size: 11px; color: var(--text-dim); }

.lb-balance {
  font-size: 15px;
  font-weight: 700;
  color: var(--green);
}

/* ─── My Bets ─── */
.bet-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
}

.bet-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.bet-choice-badge {
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.bet-choice-badge.yes { background: rgba(34,197,94,0.15); color: var(--green); }
.bet-choice-badge.no  { background: rgba(239,68,68,0.15);  color: var(--red); }

.bet-status-badge {
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}
.bet-status-badge.active  { background: rgba(99,102,241,0.2); color: var(--accent2); }
.bet-status-badge.won     { background: rgba(34,197,94,0.15);  color: var(--green); }
.bet-status-badge.lost    { background: rgba(239,68,68,0.15);  color: var(--red); }

.bet-title { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; line-height: 1.4; }

.bet-amounts {
  display: flex;
  gap: 16px;
}
.bet-amount-item { font-size: 12px; color: var(--text-dim); }
.bet-amount-item strong { display: block; font-size: 14px; color: var(--text); font-weight: 600; }

/* ─── Profile ─── */
.profile-header {
  text-align: center;
  padding: 24px 0 20px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: white;
  margin: 0 auto 12px;
  box-shadow: 0 0 24px var(--accent-glow);
}

.profile-name { font-size: 20px; font-weight: 700; color: var(--text); }
.profile-email { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

.profile-balance-card {
  background: linear-gradient(135deg, #1e1e40, #1a1a35);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  margin: 16px 0;
}
.profile-balance-label { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.profile-balance-amount { font-size: 32px; font-weight: 800; color: var(--green); }
.profile-balance-sub { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
}
.stat-value { font-size: 20px; font-weight: 700; color: var(--text); }
.stat-label { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

.btn-logout {
  width: 100%;
  padding: 14px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-sm);
  color: var(--red);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}
.btn-logout:hover { background: rgba(239,68,68,0.2); }

/* ─── Earn Page ─── */
.earn-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  display: flex;
  gap: 14px;
  align-items: center;
  transition: var(--transition);
}
.earn-card:hover { border-color: var(--border-glow); }
.earn-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.earn-info { flex: 1; }
.earn-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.earn-desc  { font-size: 12px; color: var(--text-muted); }
.earn-reward { font-size: 14px; font-weight: 700; color: var(--yellow); white-space: nowrap; }

/* ─── Exchange Page ─── */
.exchange-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
}
.exchange-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 16px; }
.swap-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.swap-input {
  flex: 1;
  padding: 12px 14px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}
.swap-input:focus { border-color: var(--accent); }
.swap-currency {
  padding: 12px 14px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--accent2);
  font-size: 14px;
  font-weight: 700;
  min-width: 72px;
  text-align: center;
}
.swap-divider {
  text-align: center;
  color: var(--text-dim);
  font-size: 20px;
  padding: 4px 0;
}

/* ─── Toast ─── */
.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  z-index: 999;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  box-shadow: var(--shadow-card);
  max-width: 90vw;
  text-overflow: ellipsis;
  overflow: hidden;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { border-color: var(--green); color: var(--green); }
.toast.error   { border-color: var(--red);   color: var(--red); }

/* ─── Loading ─── */
.loading-wrap {
  padding: 40px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  font-size: 13px;
}
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Empty State ─── */
.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-dim);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; line-height: 1.6; }

/* ─── Category color mapping ─── */
.cat-sport    { background: rgba(249,115,22,0.15); color: #fb923c; }
.cat-crypto   { background: rgba(234,179,8,0.15);  color: #eab308; }
.cat-culture  { background: rgba(168,85,247,0.15); color: #a855f7; }
.cat-politics { background: rgba(99,102,241,0.15); color: var(--accent2); }
.cat-other    { background: rgba(148,163,184,0.15);color: var(--text-muted); }

/* ─── Pulse animation for live markets ─── */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}
.live-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 1.5s infinite;
  margin-right: 5px;
}

/* ─── Wallet connect badge ─── */
.wallet-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--bg-card2);
  border: 1px solid var(--border-glow);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent2);
}

.my-choice-badge {
  text-align: center;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid var(--border);
  margin-top: 10px;
}
.my-choice-badge.yes { background: rgba(34,197,94,0.1); color: var(--green); border-color: var(--green); }
.my-choice-badge.no  { background: rgba(239,68,68,0.1); color: var(--red); border-color: var(--red); }

/* ─── Shimmer skeleton ─── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card2) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ─── Profile Pro ─── */
.profile-card {
  background: var(--bg-card);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}
.profile-main { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.profile-avatar-wrap { 
  position: relative; width: 56px; height: 56px; cursor: pointer; flex-shrink: 0;
}
.profile-avatar { 
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 1px solid var(--border);
}
.profile-avatar-placeholder { 
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover; 
}
.lb-avatar {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.profile-avatar-placeholder {
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; color: white;
}
.avatar-edit-overlay {
  position: absolute; bottom: 0; right: 0; background: var(--accent); width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 8px; border: 2px solid var(--bg-card);
}
.profile-meta { flex: 1; min-width: 0; }
.profile-name-input { background: transparent; border: none; border-bottom: 1px solid var(--border); color: white; font-size: 16px; font-weight: 700; width: 100%; padding: 2px 0; outline: none; }
.profile-name-input:focus { border-bottom-color: var(--accent); }
.profile-phone-locked { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.btn-save-profile { width: 100%; padding: 10px; border-radius: 12px; border: none; background: var(--bg-card2); color: white; font-weight: 700; font-size: 12px; margin-bottom: 16px; cursor: pointer; }

.profile-balance-pro { background: var(--bg-card2); border-radius: 16px; padding: 14px; border: 1px solid var(--border-glow); }
.pbp-label { font-size: 10px; text-transform: uppercase; color: var(--text-muted); font-weight: 700; margin-bottom: 4px; }
.pbp-value { font-size: 22px; font-weight: 800; color: white; margin-bottom: 12px; }
.pbp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pbp-btn { padding: 8px; background: rgba(255,255,255,0.05); border: none; border-radius: 10px; color: white; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; font-weight: 600; cursor: pointer; transition: 0.2s; }
.pbp-deposit { background: rgba(34,197,94,0.15); color: var(--green); border: 1px solid rgba(34,197,94,0.3); }
.pbp-deposit:hover { background: var(--green) !important; color: white !important; }
.pbp-btn:hover { background: var(--accent); }
.profile-menu { background: var(--bg-card); border-radius: 16px; padding: 6px; border: 1px solid var(--border); }
.menu-item { display: flex; align-items: center; gap: 12px; padding: 12px; cursor: pointer; transition: 0.2s; border-radius: 12px; }
.menu-item:hover { background: var(--bg-card2); }
.menu-icon { width: 32px; height: 32px; border-radius: 8px; background: rgba(99,102,241,0.1); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 14px; }
/* ─── NEW ULTRA MINIMAL FINANCE ─── */
.ultra-compact {
  width: 100%; max-width: 400px; background: rgba(15,23,42,0.95);
  backdrop-filter: blur(16px); border-radius: 28px 28px 0 0;
  border: 1px solid rgba(255,255,255,0.08); padding-bottom: 24px;
}
.finance-view { display: none; }
.finance-view.active { display: block; animation: slideFade 0.3s ease; }
@keyframes slideFade { from { opacity:0; transform: translateY(10px); } to { opacity:1; transform:0; } }

.ultra-title { font-size: 20px; font-weight: 800; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; }
.tiny-bal { font-size: 13px; font-weight: 600; color: var(--accent); background: rgba(99,102,241,0.1); padding: 4px 10px; border-radius: 20px; }

.minimal-input-wrap { position: relative; margin-bottom: 20px; }
.minimal-input {
  width: 100%; background: transparent; border: none; border-bottom: 2px solid var(--border);
  color: white; font-size: 24px; font-weight: 700; padding: 10px 40px 10px 0; outline: none; transition: 0.3s;
}
.minimal-input:focus { border-bottom-color: var(--accent); }
.currency-tag { position: absolute; right: 0; bottom: 15px; font-size: 14px; font-weight: 800; color: var(--text-dim); }

.locked-pill {
  background: rgba(255,255,255,0.05); padding: 12px; border-radius: 14px;
  display: flex; align-items: center; gap: 10px; margin-bottom: 20px; font-weight: 700; color: var(--text-muted);
}
.locked-pill i { color: var(--accent); font-size: 14px; }

.instructions-pill { background: rgba(0,0,0,0.2); border-radius: 20px; padding: 16px; margin-top: 20px; border: 1px solid var(--border); }
.tele-glow-box {
  background: linear-gradient(135deg, #1e293b, #0f172a); border: 1px solid var(--accent);
  padding: 12px; border-radius: 12px; display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; cursor: pointer; box-shadow: 0 0 15px rgba(99,102,241,0.2);
}
.tele-val { font-size: 16px; font-weight: 800; color: white; }
.step-txt { font-size: 12px; color: var(--text-dim); margin-bottom: 8px; }
.sms-input {
  width: 100%; background: rgba(0,0,0,0.3); border: 1px solid var(--border);
  border-radius: 12px; color: white; padding: 10px; font-size: 13px; margin: 10px 0; outline: none;
}

.btn-action-main {
  width: 100%; padding: 15px; border-radius: 16px; border: none; background: var(--accent);
  color: white; font-weight: 800; font-size: 15px; cursor: pointer; transition: 0.2s;
}
.btn-confirm { width:100%; padding:12px; border-radius:12px; border:none; background:var(--green); color:white; font-weight:700; margin-top:10px; }
.btn-close-minimal {
  width: 100%; background: transparent; border: none; color: var(--text-dim);
  font-size: 13px; font-weight: 600; margin-top: 15px; cursor: pointer;
}
.note-tiny { font-size: 11px; color: var(--text-muted); text-align: center; margin-bottom: 15px; }
.menu-label { flex: 1; font-weight: 600; font-size: 13px; }
/* ─── Bottom Sheet Modal ─── */
.bottom-sheet-bg {
  display: none !important; /* Hide by default */
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  z-index: 500;
  align-items: flex-end;
  justify-content: center;
  transition: opacity 0.3s ease;
}
.bottom-sheet-bg.active {
  display: flex !important;
}
.bottom-sheet {
  width: 100%;
  max-width: 440px;
  background: #0f172a;
  border-radius: 20px 20px 0 0;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.7);
  margin: 0 auto;
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  flex-direction: column;
  max-height: 85vh;
}
.bottom-sheet-bg.active .bottom-sheet { transform: translateY(0); }

.modal-handle {
  width: 40px; height: 5px; background: rgba(255,255,255,0.2);
  border-radius: 10px; margin: 12px auto; flex-shrink: 0;
  cursor: grab; user-select: none;
  border-top: 10px solid transparent; border-bottom: 20px solid transparent; /* Wider hit area */
}
.modal-handle:active { cursor: grabbing; }

.modal-header { padding: 0 16px 12px; border: none; align-items: center; }
.modal-title { font-size: 16px; font-weight: 800; }
.modal-close { width: 28px; height: 28px; font-size: 14px; background: rgba(255,255,255,0.05); }

.modal-body { 
  padding: 0 16px 20px; 
  overflow-y: auto; 
  flex: 1;
}

.finance-balance-row {
  border-radius: 12px;
  margin-bottom: 20px;
}
.tab-btn {
  padding: 10px;
  font-size: 13px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
}
.tab-btn.active {
  background: var(--bg-card);
  color: white;
}

.form-group { margin-bottom: 14px; }
.form-label { font-size: 11px; font-weight: 700; color: var(--text-muted); margin-bottom: 4px; display: block; }
.form-input { padding: 10px; font-size: 14px; }
.form-hint { font-size: 10px; margin-top: 4px; }

.locked-input {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  color: white;
  text-align: center;
  margin-bottom: 4px;
}

.tele-number-box { padding: 12px; border-radius: 12px; }
.tele-row { font-size: 16px; gap: 10px; }
.btn-copy { padding: 4px 10px; font-size: 10px; }

.instructions-list { margin-top: 12px; font-size: 12px; }
.instructions-list p { margin-bottom: 6px; }

.note-box { padding: 10px; border-radius: 10px; font-size: 12px; margin: 14px 0; }
.btn-primary { padding: 12px; font-size: 14px; border-radius: 12px; }
.btn-secondary { padding: 10px; font-size: 13px; border-radius: 12px; }
/* ─── Simplified Leaderboard ─── */
.lb-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.lb-item {
  display: flex; align-items: center; gap: 15px;
  background: rgba(255,255,255,0.03); padding: 16px; border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.05);
}
.lb-rank { width: 24px; font-weight: 800; font-size: 16px; text-align: center; color: var(--text-dim); }
.lb-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: white; flex-shrink: 0;
}
.lb-info { flex: 1; min-width: 0; }
.lb-user { font-weight: 700; color: white; display: block; font-size: 14px; }
.lb-stat { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.lb-val { font-size: 15px; font-weight: 700; color: white; white-space: nowrap; }
/* ─── Netflix Games Grid ─── */
.games-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px;
}
.game-card {
  position: relative; border-radius: 14px; overflow: hidden;
  aspect-ratio: 2 / 2.8; background: #1e1e1e;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(255,255,255,0.05);
}
.game-card:hover { transform: scale(1.04); z-index: 2; box-shadow: 0 15px 40px rgba(99,102,241,0.4); }

.game-poster {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease;
}
.game-card:hover .game-poster { transform: scale(1.1); }

.game-overlay {
  position: absolute; bottom: 0; left: 0; right: 0; height: 50%;
  background: linear-gradient(transparent, rgba(0,0,0,0.9));
  display: flex; align-items: flex-end; padding: 12px;
}
.game-name {
  color: white; font-size: 14px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.5px; text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.game-tag {
  position: absolute; top: 10px; right: 10px; padding: 4px 8px;
  background: var(--accent); color: white; border-radius: 6px;
  font-size: 9px; font-weight: 800; text-transform: uppercase;
}

/* ─── Leaderboard Tabs ─── */
.lb-tabs {
  display: flex; gap: 8px; margin-bottom: 20px;
  background: rgba(255,255,255,0.05); padding: 5px; border-radius: 12px;
}
.ltab-btn {
  flex: 1; padding: 10px; border-radius: 8px; font-size: 13px; font-weight: 700;
  color: var(--text-dim); cursor: pointer; text-align: center; transition: 0.3s;
}
.ltab-btn.active { background: var(--accent); color: white; }
