/* ============================================================
   UpDown PRO — Unified Stylesheet
   ============================================================ */

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

:root {
  --bg: #f0f2f7;
  --bg2: #ffffff;
  --bg3: #f5f6fa;
  --card: #ffffff;
  --card2: #f0f2f7;
  --border: rgba(0, 0, 0, 0.08);
  --border2: rgba(0, 0, 0, 0.13);
  --text: #111827;
  --text1: #111827;
  --text2: #374151;
  --text3: #6b7280;
  --muted: #6b7280;
  --green: #059669;
  --green2: #047857;
  --red: #e11d48;
  --red2: #be123c;
  --blue: #2563eb;
  --gold: #d97706;
  --purple: #7c3aed;
  --gw-green: 0 0 20px rgba(5, 150, 105, 0.2);
  --gw-red: 0 0 20px rgba(225, 29, 72, 0.2);
  --gw-blue: 0 0 20px rgba(37, 99, 235, 0.2);
  --font: 'Inter', sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --r: 16px;
  --r-sm: 10px;
}

html,
body {
  height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* ── BACKGROUND ORBS ───────────────────────────────────────── */
.bg-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.06;
  animation: orbF 12s ease-in-out infinite;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: #3b82f6;
  top: -200px;
  left: -100px;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: #059669;
  bottom: -100px;
  right: -100px;
  animation-delay: -5s;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: #7c3aed;
  top: 50%;
  right: 30%;
  animation-delay: -8s;
}

@keyframes orbF {

  0%,
  100% {
    transform: translateY(0) scale(1)
  }

  50% {
    transform: translateY(-40px) scale(1.05)
  }
}

/* ── TOP BAR ───────────────────────────────────────────────── */
.top-bar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-decoration: none;
  color: var(--text);
}

.brand-icon {
  font-size: 26px;
  color: var(--green);
}

.brand-pro {
  background: linear-gradient(90deg, var(--green), #60efff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.top-nav {
  display: flex;
  gap: 4px;
}

.nav-link {
  padding: 7px 14px;
  border-radius: 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.nav-link:hover {
  color: var(--text);
  background: var(--card2);
}

.nav-link.active {
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border2);
}

.admin-link {
  color: var(--gold) !important;
}

.wallet-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.wallet-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.wallet-label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wallet-value {
  font-size: 14px;
  font-weight: 700;
  font-family: var(--mono);
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: white;
}

.logout-btn {
  color: var(--muted);
  text-decoration: none;
  font-size: 18px;
  transition: color 0.2s;
  cursor: pointer;
  background: none;
  border: none;
}

.logout-btn:hover {
  color: var(--red);
}

/* ── MAIN GAME LAYOUT ──────────────────────────────────────── */
.main-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 360px;
  height: calc(100vh - 53px - 36px);
}

/* ── CHART PANEL ───────────────────────────────────────────── */
.chart-panel {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  overflow: hidden;
}

.chart-header {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  gap: 12px;
  flex-shrink: 0;
}

.asset-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.asset-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #f7931a, #ffad3b);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: white;
  box-shadow: 0 4px 20px rgba(247, 147, 26, 0.4);
}

.asset-name {
  font-size: 15px;
  font-weight: 700;
}

.asset-sub {
  font-size: 11px;
  color: var(--muted);
}

.price-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 30px;
  background: var(--card);
  border: 1px solid var(--border2);
}

.price-pill span {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
}

.price-change {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 12px;
}

.price-change.positive {
  color: var(--green);
  background: rgba(0, 229, 160, 0.1);
}

.price-change.negative {
  color: var(--red);
  background: rgba(255, 77, 109, 0.1);
}

.chart-stats {
  display: flex;
  gap: 14px;
}

.stat-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.stat-l {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-v {
  font-size: 12px;
  font-weight: 600;
  font-family: var(--mono);
}

.stat-v.green {
  color: var(--green);
}

.stat-v.red {
  color: var(--red);
}

.chart-wrapper {
  flex: 1;
  position: relative;
  background: #f8faff;
  overflow: hidden;
  min-height: 0;
}

#tradingChart {
  width: 100%;
  height: 100%;
  display: block;
}

.result-banner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  font-weight: 900;
  animation: bannerPop 0.4s ease;
  pointer-events: none;
}

@keyframes bannerPop {
  0% {
    transform: scale(0.5);
    opacity: 0
  }

  100% {
    transform: scale(1);
    opacity: 1
  }
}

/* ── TIME SELECTOR ─────────────────────────────────────────── */
.time-selector-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.ts-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}

.time-options {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.time-btn {
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}

.time-btn:hover {
  border-color: var(--blue);
  color: var(--text);
}

.time-btn.active {
  background: linear-gradient(135deg, #1a3a7c, #2563eb);
  border-color: var(--blue);
  color: white;
  box-shadow: var(--gw-blue);
}

.round-id-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  font-family: var(--mono);
  background: var(--card);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  white-space: nowrap;
}

/* ── RESULTS TABS ──────────────────────────────────────────── */
.results-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg3);
  border-top: 1px solid var(--border);
  min-height: 0;
  overflow: hidden;
}

.results-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  flex-shrink: 0;
}

.rtab {
  flex: 1;
  padding: 11px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}

.rtab:hover {
  color: var(--text);
}

.rtab.active {
  color: var(--text);
  border-bottom-color: var(--blue);
  background: var(--card);
}

.results-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--card2) transparent;
}

.results-loading,
.results-empty {
  padding: 30px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.rtable-wrap {
  overflow-x: auto;
}

.rtable {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.rtable th {
  padding: 10px 12px;
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.rtable td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.rtable tr:hover td {
  background: rgba(0, 0, 0, 0.02);
}

.rtable tr:last-child td {
  border-bottom: none;
}

.badge-result {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

.badge-result.up {
  background: rgba(0, 229, 160, 0.15);
  color: var(--green);
  border: 1px solid rgba(0, 229, 160, 0.3);
}

.badge-result.down {
  background: rgba(255, 77, 109, 0.15);
  color: var(--red);
  border: 1px solid rgba(255, 77, 109, 0.3);
}

.green-text {
  color: var(--green);
}

.red-text {
  color: var(--red);
}

.muted-text {
  color: var(--muted);
}

.mono-text {
  font-family: var(--mono);
}

/* ── BET PANEL ─────────────────────────────────────────────── */
.bet-panel {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: var(--bg3);
  scrollbar-width: thin;
  scrollbar-color: var(--card2) transparent;
}

.bet-panel::-webkit-scrollbar {
  width: 3px;
}

.bet-panel::-webkit-scrollbar-thumb {
  background: var(--card2);
  border-radius: 3px;
}

.round-card {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}

.round-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.round-label {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.round-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 1px;
}

.round-badge.open {
  background: rgba(0, 229, 160, 0.15);
  color: var(--green);
  border: 1px solid rgba(0, 229, 160, 0.3);
}

.round-badge.closed {
  background: rgba(255, 77, 109, 0.15);
  color: var(--red);
  border: 1px solid rgba(255, 77, 109, 0.3);
}

.round-badge.processing {
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.timer-display {
  display: flex;
  justify-content: center;
}

.timer-circle {
  position: relative;
  width: 100px;
  height: 100px;
}

.timer-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-bg-circle {
  fill: none;
  stroke: var(--card2);
  stroke-width: 6;
}

.timer-progress-circle {
  fill: none;
  stroke: var(--green);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke 0.5s;
}

.timer-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.timer-num {
  font-size: 24px;
  font-weight: 800;
  font-family: var(--mono);
  line-height: 1;
}

.timer-unit {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
}

.pool-card {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.pool-title {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.pool-bars {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pool-side {
  flex: 1;
}

.pool-label-top {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 5px;
}

.up-side .pool-icon {
  color: var(--green);
}

.down-side .pool-icon {
  color: var(--red);
}

.pool-bar-wrap {
  height: 7px;
  background: var(--card2);
  border-radius: 4px;
  overflow: hidden;
}

.pool-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.up-bar {
  background: linear-gradient(90deg, var(--green2), var(--green));
}

.down-bar {
  background: linear-gradient(90deg, var(--red2), var(--red));
}

.pool-amount {
  font-size: 12px;
  font-weight: 700;
  font-family: var(--mono);
  margin-top: 3px;
}

.up-side .pool-amount {
  color: var(--green);
}

.down-side .pool-amount {
  color: var(--red);
}

.pool-vs {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  padding-top: 12px;
}

.payout-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding: 7px 10px;
  background: var(--card2);
  border-radius: 8px;
  font-size: 11px;
  color: var(--muted);
}

.payout-mult {
  font-size: 14px;
  font-weight: 800;
  color: var(--gold);
  font-family: var(--mono);
}

.bet-input-card {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.bet-input-title {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.amount-input-wrap {
  display: flex;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  overflow: hidden;
  margin-bottom: 8px;
  transition: border-color 0.2s;
}

.amount-input-wrap:focus-within {
  border-color: var(--blue);
}

.currency-sym {
  padding: 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--muted);
  border-right: 1px solid var(--border);
}

.amount-input {
  flex: 1;
  padding: 10px 12px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  font-family: var(--mono);
}

.quick-amounts {
  display: flex;
  gap: 5px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.qa-btn {
  flex: 1;
  padding: 6px;
  min-width: 55px;
  background: var(--card2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}

.qa-btn:hover {
  border-color: var(--blue);
  color: var(--text);
}

.qa-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.bet-actions {
  display: flex;
  gap: 8px;
}

.bet-btn {
  flex: 1;
  padding: 12px 8px;
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-family: var(--font);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.bet-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s;
}

.bet-btn:hover::before {
  opacity: 1;
}

.up-btn {
  background: linear-gradient(145deg, #d1fae5, #a7f3d0);
  border: 1px solid rgba(5, 150, 105, 0.3);
  color: var(--green);
}

.up-btn::before {
  background: linear-gradient(145deg, rgba(5, 150, 105, 0.08), rgba(5, 150, 105, 0.18));
}

.up-btn:hover {
  border-color: var(--green);
  box-shadow: var(--gw-green);
  transform: translateY(-2px);
}

.down-btn {
  background: linear-gradient(145deg, #ffe4e6, #fecdd3);
  border: 1px solid rgba(225, 29, 72, 0.3);
  color: var(--red);
}

.down-btn::before {
  background: linear-gradient(145deg, rgba(225, 29, 72, 0.08), rgba(225, 29, 72, 0.18));
}

.down-btn:hover {
  border-color: var(--red);
  box-shadow: var(--gw-red);
  transform: translateY(-2px);
}

.bet-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.bet-arrow {
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.bet-label {
  font-size: 15px;
  font-weight: 800;
}

.bet-sub {
  font-size: 9px;
  opacity: 0.7;
}

.user-bet-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  background: var(--card2);
  border-radius: 10px;
  border: 1px solid var(--border2);
}

.ubs-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  flex-shrink: 0;
}

.ubs-icon.up {
  background: rgba(0, 229, 160, 0.15);
  color: var(--green);
  border: 1px solid rgba(0, 229, 160, 0.3);
}

.ubs-icon.down {
  background: rgba(255, 77, 109, 0.15);
  color: var(--red);
  border: 1px solid rgba(255, 77, 109, 0.3);
}

.ubs-text {
  flex: 1;
}

.ubs-title {
  font-size: 12px;
  font-weight: 700;
}

.ubs-detail {
  font-size: 10px;
  color: var(--muted);
}

.ubs-potential {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  font-family: var(--mono);
  white-space: nowrap;
}

.quick-links-card {
  display: flex;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}

.ql-btn {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid;
}

.deposit-ql {
  background: rgba(0, 229, 160, 0.08);
  color: var(--green);
  border-color: rgba(0, 229, 160, 0.25);
}

.deposit-ql:hover {
  background: rgba(0, 229, 160, 0.15);
}

.withdraw-ql {
  background: rgba(255, 77, 109, 0.08);
  color: var(--red);
  border-color: rgba(255, 77, 109, 0.25);
}

.withdraw-ql:hover {
  background: rgba(255, 77, 109, 0.15);
}

.history-card {
  padding: 14px 18px;
  flex: 1;
}

.history-title {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.history-empty {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: 16px 0;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--border);
}

.hi-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.hi-badge.win {
  background: rgba(0, 229, 160, 0.15);
  color: var(--green);
}

.hi-badge.loss {
  background: rgba(255, 77, 109, 0.15);
  color: var(--red);
}

.hi-info {
  flex: 1;
}

.hi-main {
  font-size: 11px;
  font-weight: 600;
}

.hi-sub {
  font-size: 10px;
  color: var(--muted);
}

.hi-amount {
  font-size: 12px;
  font-weight: 700;
  font-family: var(--mono);
}

.hi-amount.win {
  color: var(--green);
}

.hi-amount.loss {
  color: var(--red);
}

/* ── RESULT MODAL ──────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

.modal-box {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 22px;
  padding: 36px 32px;
  width: 370px;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: modalPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
  from {
    transform: scale(0.7) translateY(30px);
    opacity: 0
  }

  to {
    transform: scale(1) translateY(0);
    opacity: 1
  }
}

.modal-box.win-modal::before {
  content: '';
  position: absolute;
  top: -100px;
  left: -100px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: var(--green);
  opacity: 0.06;
}

.modal-box.loss-modal::before {
  content: '';
  position: absolute;
  top: -100px;
  left: -100px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: var(--red);
  opacity: 0.06;
}

.modal-emoji {
  font-size: 52px;
  margin-bottom: 10px;
  animation: bounce 0.6s ease;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0)
  }

  40% {
    transform: translateY(-14px)
  }
}

.modal-title {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 6px;
}

.modal-title.win {
  color: var(--green);
}

.modal-title.loss {
  color: var(--red);
}

.modal-amount {
  font-size: 38px;
  font-weight: 900;
  font-family: var(--mono);
  margin-bottom: 5px;
}

.modal-amount.win {
  color: var(--green);
  text-shadow: var(--gw-green);
}

.modal-amount.loss {
  color: var(--red);
}

.modal-detail {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 20px;
}

.modal-stats {
  display: flex;
  background: var(--bg2);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

.ms-item {
  flex: 1;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-right: 1px solid var(--border);
}

.ms-item:last-child {
  border-right: none;
}

.ms-l {
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
}

.ms-v {
  font-size: 13px;
  font-weight: 700;
  font-family: var(--mono);
}

.ms-v.green {
  color: var(--green);
}

.modal-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #1a3a7c, #2563eb);
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.25s;
  text-decoration: none;
  display: block;
}

.modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--gw-blue);
}

/* ── DISCLAIMER ────────────────────────────────────────────── */
.disclaimer-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 7px 20px;
  background: rgba(245, 158, 11, 0.07);
  border-top: 1px solid rgba(245, 158, 11, 0.2);
  text-align: center;
  font-size: 10px;
  color: rgba(245, 158, 11, 0.75);
  font-weight: 500;
}

/* ── AUTH PAGES ────────────────────────────────────────────── */
.auth-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 16px;
  position: relative;
  z-index: 1;
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 24px;
  padding: 40px 36px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 20px;
  text-decoration: none;
  color: var(--text);
}

.auth-title {
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 6px;
}

.auth-sub {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 24px;
}

.auth-footer {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 20px;
}

.auth-link {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  flex: 1;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus {
  border-color: var(--blue);
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

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

.btn-primary {
  padding: 12px 20px;
  background: linear-gradient(135deg, #1a3a7c, #2563eb);
  border: none;
  border-radius: var(--r-sm);
  color: white;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.25s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--gw-blue);
}

.btn-full {
  width: 100%;
}

.btn-danger {
  background: linear-gradient(135deg, #7c1a1a, #dc2626) !important;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
}

.alert-success {
  background: rgba(0, 229, 160, 0.1);
  color: var(--green);
  border: 1px solid rgba(0, 229, 160, 0.25);
}

.alert-error {
  background: rgba(255, 77, 109, 0.1);
  color: var(--red);
  border: 1px solid rgba(255, 77, 109, 0.25);
}

/* ── PAGE (DEPOSIT/WITHDRAW/WALLET) ──────────────────────────── */
.page-wrap {
  position: relative;
  z-index: 1;
}

.page-title-box {
  margin-bottom: 24px;
}

.page-title {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
}

.page-sub {
  color: var(--muted);
  font-size: 13px;
}

.dp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.info-card,
.form-card,
.table-card {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  padding: 24px;
}

.info-card-header,
.form-card-header,
.table-card-header {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.see-all {
  font-size: 12px;
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}

.upi-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg2);
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

.upi-icon {
  font-size: 28px;
  color: var(--green);
}

.upi-details {
  flex: 1;
}

.upi-label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.upi-value {
  font-size: 15px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--text);
}

.upi-name {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.upi-note {
  font-size: 12px;
  color: var(--gold);
  background: rgba(245, 158, 11, 0.08);
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
}

.copy-btn {
  padding: 7px 12px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--blue);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.copy-btn:hover {
  background: rgba(59, 130, 246, 0.25);
}

.amount-chips {
  margin-top: 4px;
}

.chip-label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}

.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  padding: 5px 12px;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.chip:hover {
  border-color: var(--blue);
  color: var(--text);
}

.balance-preview {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg2);
  border-radius: 10px;
  margin-bottom: 4px;
  font-size: 13px;
  color: var(--muted);
}

.balance-after {
  font-weight: 700;
  font-family: var(--mono);
  color: var(--text);
}

.status-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.status-pending {
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-approved {
  background: rgba(0, 229, 160, 0.15);
  color: var(--green);
  border: 1px solid rgba(0, 229, 160, 0.3);
}

.status-rejected {
  background: rgba(255, 77, 109, 0.15);
  color: var(--red);
  border: 1px solid rgba(255, 77, 109, 0.3);
}

/* ── WALLET PAGE ───────────────────────────────────────────── */
.wallet-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.wstat-card {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.wstat-card.balance-card {
  border-color: rgba(0, 229, 160, 0.3);
  background: linear-gradient(135deg, rgba(0, 229, 160, 0.05), var(--card));
}

.wstat-icon {
  font-size: 28px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card2);
  border-radius: 12px;
  flex-shrink: 0;
}

.wstat-label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}

.wstat-value {
  font-size: 20px;
  font-weight: 800;
  font-family: var(--mono);
}

.pending-alerts {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pending-alert {
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
}

.deposit-alert {
  background: rgba(0, 229, 160, 0.08);
  color: var(--green);
  border: 1px solid rgba(0, 229, 160, 0.2);
}

.withdraw-alert {
  background: rgba(245, 158, 11, 0.08);
  color: var(--gold);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.wallet-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.wallet-action-btn {
  flex: 1;
  min-width: 160px;
  padding: 18px;
  border-radius: var(--r);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.25s;
  border: 1px solid;
}

.wa-icon {
  font-size: 28px;
}

.wa-text {
  font-size: 14px;
  font-weight: 700;
}

.deposit-action {
  background: rgba(0, 229, 160, 0.08);
  color: var(--green);
  border-color: rgba(0, 229, 160, 0.3);
}

.deposit-action:hover {
  background: rgba(0, 229, 160, 0.15);
  transform: translateY(-3px);
}

.withdraw-action {
  background: rgba(255, 77, 109, 0.08);
  color: var(--red);
  border-color: rgba(255, 77, 109, 0.3);
}

.withdraw-action:hover {
  background: rgba(255, 77, 109, 0.15);
  transform: translateY(-3px);
}

.play-action {
  background: rgba(59, 130, 246, 0.08);
  color: var(--blue);
  border-color: rgba(59, 130, 246, 0.3);
}

.play-action:hover {
  background: rgba(59, 130, 246, 0.15);
  transform: translateY(-3px);
}

/* ── ADMIN PANEL ───────────────────────────────────────────── */
.admin-body {
  background: var(--bg);
}

.admin-top-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
}

.admin-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.admin-layout {
  display: grid;
  grid-template-columns: 210px 1fr;
  min-height: calc(100vh - 53px);
  position: relative;
  z-index: 1;
}

.admin-sidebar {
  background: var(--bg2);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  position: sticky;
  top: 53px;
  height: calc(100vh - 53px);
  overflow-y: auto;
}

.sidebar-brand {
  font-size: 18px;
  font-weight: 800;
  padding: 0 20px 16px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 10px;
}

.snav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
}

.snav:hover {
  background: var(--card);
  color: var(--text);
}

.snav.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(37, 99, 235, 0.1));
  color: var(--text);
  border-left: 3px solid var(--blue);
}

.badge-cnt {
  background: var(--red);
  color: white;
  font-size: 10px;
  font-weight: 700;
  border-radius: 20px;
  padding: 1px 6px;
  margin-left: auto;
}

.admin-main {
  padding: 24px;
  overflow-x: hidden;
}

.admin-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.admin-page-title {
  font-size: 22px;
  font-weight: 800;
}

.admin-date {
  font-size: 12px;
  color: var(--muted);
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.astat {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.2s;
}

.astat:hover {
  border-color: var(--border2);
}

.astat.pending-highlight {
  border-color: rgba(245, 158, 11, 0.3);
}

.astat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.astat-icon.blue {
  background: rgba(59, 130, 246, 0.15);
}

.astat-icon.green {
  background: rgba(0, 229, 160, 0.15);
  font-size: 16px;
  font-weight: 700;
  color: var(--green);
  font-family: var(--mono);
}

.astat-icon.gold {
  background: rgba(245, 158, 11, 0.15);
}

.astat-icon.red {
  background: rgba(255, 77, 109, 0.15);
}

.astat-num {
  font-size: 20px;
  font-weight: 800;
  font-family: var(--mono);
  line-height: 1;
}

.astat-num small {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}

.astat-lbl {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.admin-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.filter-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
}

.ftab {
  padding: 7px 16px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--border);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ftab:hover {
  color: var(--text);
}

.ftab.active {
  color: var(--text);
  background: linear-gradient(135deg, #1a3a7c, #2563eb);
  border-color: var(--blue);
}

.action-btn {
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s;
}

.approve-btn {
  background: rgba(0, 229, 160, 0.1);
  color: var(--green);
  border-color: rgba(0, 229, 160, 0.3);
}

.approve-btn:hover {
  background: rgba(0, 229, 160, 0.2);
}

.reject-btn {
  background: rgba(255, 77, 109, 0.1);
  color: var(--red);
  border-color: rgba(255, 77, 109, 0.3);
}

.reject-btn:hover {
  background: rgba(255, 77, 109, 0.2);
}

/* ── SCROLLBAR ─────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--card2);
  border-radius: 4px;
}

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .main-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .chart-panel {
    height: 60vh;
  }

  .chart-stats,
  .top-nav {
    display: none;
  }

  .dp-grid {
    grid-template-columns: 1fr;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }

  .admin-two-col {
    grid-template-columns: 1fr;
  }
}