/* ── Wallet trigger button ─────────────────────────── */
.wallet-trigger {
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.wallet-trigger:hover {
  border-color: rgba(124,58,237,0.4) !important;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.08);
}

/* ── Overlay ──────────────────────────────────────── */
.wallet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.wallet-overlay.hidden { display: none; }

/* ── Modal ────────────────────────────────────────── */
.wallet-modal {
  background: #0f0f1a;
  border: 1px solid #1e1e30;
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(124,58,237,0.1);
  animation: modalIn 0.2s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Header */
.wm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #1e1e30;
}
.wm-header-left { display: flex; align-items: center; gap: 10px; }
.wm-icon {
  width: 32px; height: 32px;
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #a78bfa;
}
.wm-title { font-size: 15px; font-weight: 800; color: #f1f5f9; }
.wm-close {
  background: rgba(255,255,255,0.05);
  border: 1px solid #1e1e30;
  border-radius: 8px;
  color: #94a3b8;
  cursor: pointer;
  padding: 7px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.wm-close:hover { background: rgba(255,255,255,0.08); color: #f1f5f9; }

/* Balance */
.wm-balance {
  text-align: center;
  padding: 24px 20px 20px;
  border-bottom: 1px solid #1e1e30;
}
.wm-balance-usd {
  font-size: 36px;
  font-weight: 900;
  color: #f1f5f9;
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 4px;
}
.wm-balance-sol { font-size: 14px; color: #94a3b8; margin-bottom: 10px; }
.wm-network {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #22c55e;
}
.wm-net-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 5px #22c55e;
}

/* Tabs */
.wm-tabs {
  display: flex;
  padding: 12px 16px 0;
  gap: 4px;
  border-bottom: 1px solid #1e1e30;
}
.wm-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #64748b;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 4px 12px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.wm-tab:hover { color: #94a3b8; }
.wm-tab.active {
  color: #f1f5f9;
  border-bottom-color: #7c3aed;
}

/* Panels */
.wm-panel { padding: 20px; }
.wm-panel.hidden { display: none; }

.wm-hint {
  font-size: 12px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 18px;
  text-align: center;
}

/* QR code */
.wm-qr-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}
#qr-code {
  background: #fff;
  padding: 12px;
  border-radius: 12px;
  display: inline-block;
  box-shadow: 0 0 0 1px #1e1e30;
}
#qr-code canvas, #qr-code img { display: block; border-radius: 4px; }

/* Address box */
.wm-address-box {
  display: flex;
  align-items: center;
  background: #0a0a12;
  border: 1px solid #1e1e30;
  border-radius: 10px;
  padding: 10px 12px;
  gap: 10px;
  margin-bottom: 12px;
}
.wm-address-text {
  flex: 1;
  font-size: 11px;
  font-family: monospace;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wm-copy-btn {
  background: rgba(124,58,237,0.12);
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: 7px;
  color: #a78bfa;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  cursor: pointer;
  display: flex; align-items: center; gap: 5px;
  flex-shrink: 0;
  transition: background 0.15s;
}
.wm-copy-btn:hover { background: rgba(124,58,237,0.2); }
.wm-copy-btn.copied { color: #22c55e; border-color: rgba(34,197,94,0.3); background: rgba(34,197,94,0.08); }

/* Info row */
.wm-info-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.wm-info-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #475569;
  font-weight: 500;
}

/* Withdraw form */
.wm-field { margin-bottom: 16px; }
.wm-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.wm-input-wrap { position: relative; }
.wm-input {
  width: 100%;
  background: #0a0a12;
  border: 1px solid #1e1e30;
  border-radius: 10px;
  color: #f1f5f9;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.15s;
}
.wm-input:focus { border-color: rgba(124,58,237,0.5); }
.wm-input::placeholder { color: #334155; }
.wm-max-btn {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  background: rgba(124,58,237,0.12);
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: 5px;
  color: #a78bfa;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  cursor: pointer;
}
.wm-field-hint { font-size: 11px; color: #475569; margin-top: 5px; display: block; }

.wm-fee-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid #1e1e30;
  border-bottom: 1px solid #1e1e30;
  margin-bottom: 16px;
  font-size: 12px;
}
.wm-fee-label { color: #64748b; font-weight: 600; }
.wm-fee-val { color: #94a3b8; font-weight: 700; }

.wm-withdraw-btn {
  width: 100%;
  background: #7c3aed;
  border: none;
  border-radius: 10px;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 800;
  padding: 13px;
  cursor: pointer;
  margin-bottom: 12px;
  transition: background 0.15s;
}
.wm-withdraw-btn:hover { background: #6d28d9; }

.wm-warn {
  font-size: 11px;
  color: #475569;
  line-height: 1.6;
  text-align: center;
}

/* History */
.wm-tx-list { display: flex; flex-direction: column; gap: 6px; }
.wm-tx {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #0a0a12;
  border: 1px solid #1e1e30;
  border-radius: 10px;
  padding: 12px 14px;
}
.wm-tx-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.deposit-icon  { background: rgba(34,197,94,0.1);  color: #22c55e; }
.withdraw-icon { background: rgba(239,68,68,0.1);  color: #ef4444; }
.game-icon-tx  { background: rgba(124,58,237,0.1); color: #a78bfa; }

.wm-tx-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.wm-tx-type { font-size: 13px; font-weight: 600; color: #f1f5f9; }
.wm-tx-time { font-size: 11px; color: #475569; }
.wm-tx-amount { font-size: 13px; font-weight: 700; }
.wm-tx-amount.deposit { color: #22c55e; }
.wm-tx-amount.loss    { color: #ef4444; }
