/* App-specific additions layered on top of the original styles.css */

/* ----- Welcome message (post-registration) ----- */
.welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: welcomeFade 0.35s ease;
}
@keyframes welcomeFade { from { opacity: 0; } to { opacity: 1; } }
.welcome-card {
  position: relative;
  width: 100%;
  max-width: 360px;
  text-align: center;
  padding: 34px 26px 26px;
  border-radius: 22px;
  background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
  border: 1px solid rgba(255, 122, 26, 0.3);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: welcomePop 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
@keyframes welcomePop {
  from { transform: translateY(16px) scale(0.96); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.welcome-glow {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255, 122, 26, 0.35), transparent 70%);
  pointer-events: none;
}
.welcome-logo {
  position: relative;
  width: 92px;
  height: 92px;
  object-fit: contain;
  margin-bottom: 14px;
  filter: drop-shadow(0 8px 20px rgba(255, 122, 26, 0.45));
}
.welcome-title {
  position: relative;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.welcome-text {
  position: relative;
  font-size: 14px;
  color: #b0b0b0;
  line-height: 1.5;
  margin-bottom: 20px;
}
.welcome-text strong { color: #ff9a4d; }
.welcome-steps {
  position: relative;
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.welcome-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  color: #9a9a9a;
  line-height: 1.45;
}
.welcome-steps strong { color: #fff; font-size: 14px; }
.welcome-step-icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #ff7a1a, #e85d04);
  color: #000;
  font-size: 15px;
}
.welcome-actions {
  position: relative;
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.welcome-btn {
  flex: 1;
  padding: 13px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
}
.welcome-btn.primary {
  background: linear-gradient(135deg, #ff7a1a, #e85d04);
  color: #000;
  box-shadow: 0 8px 20px rgba(255, 122, 26, 0.32);
}
.welcome-btn.ghost {
  background: transparent;
  color: #ff9a4d;
  border: 1px solid rgba(255, 122, 26, 0.4);
}
.welcome-dismiss {
  position: relative;
  background: none;
  border: none;
  color: #7a7a7a;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
}
.welcome-dismiss:hover { color: #b0b0b0; }

/* ----- Rank badge logos ----- */
.quantify-overview .vip-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.vip-badge-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}
.vip-rank-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.vip-rank-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

/* ----- AI quantify working overlay ----- */
.quant-loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(13, 11, 20, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.quant-loader.show {
  opacity: 1;
  visibility: visible;
}
.quant-loader-card {
  width: 100%;
  max-width: 320px;
  text-align: center;
  padding: 32px 24px 28px;
  border-radius: 18px;
  background: linear-gradient(180deg, #171717 0%, #0d0d0d 100%);
  border: 1px solid rgba(255, 122, 26, 0.22);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}
.quant-core {
  position: relative;
  width: 116px;
  height: 116px;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.quant-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
}
.quant-ring-1 {
  border-top-color: #ff7a1a;
  border-right-color: #ff7a1a;
  animation: quantSpin 1.1s linear infinite;
}
.quant-ring-2 {
  inset: 16px;
  border-bottom-color: #2ecc71;
  border-left-color: #2ecc71;
  animation: quantSpin 1.6s linear infinite reverse;
}
.quant-ring-3 {
  inset: 32px;
  border-top-color: rgba(255, 122, 26, 0.55);
  animation: quantSpin 2.2s linear infinite;
}
.quant-core-pulse {
  position: absolute;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(46, 204, 113, 0.45) 0%, rgba(46, 204, 113, 0) 70%);
  animation: quantPulse 1.4s ease-in-out infinite;
}
.quant-core-logo {
  position: relative;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 1px;
  color: #ff7a1a;
}
@keyframes quantSpin { to { transform: rotate(360deg); } }
@keyframes quantPulse {
  0%, 100% { transform: scale(0.85); opacity: 0.7; }
  50%      { transform: scale(1.25); opacity: 1; }
}
.quant-loader-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}
.quant-loader-status {
  font-size: 13px;
  color: #2ecc71;
  min-height: 18px;
  margin-bottom: 16px;
  transition: opacity 0.2s ease;
}
.quant-loader-bar {
  height: 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 14px;
}
.quant-loader-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, #ff7a1a, #2ecc71);
  background-size: 200% 100%;
  transition: width 0.3s linear;
  animation: quantBarShimmer 1.6s linear infinite;
}
@keyframes quantBarShimmer {
  0%   { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}
.quant-loader-pct {
  font-size: 22px;
  font-weight: 800;
  color: #ff7a1a;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.quant-loader-status.fade {
  animation: quantStatusFade 0.45s ease;
}
@keyframes quantStatusFade {
  0%   { opacity: 0; transform: translateY(4px); }
  100% { opacity: 1; transform: translateY(0); }
}
.quant-loader-foot {
  font-size: 11px;
  color: rgba(232, 227, 245, 0.55);
}

/* Hidden portion of the session profit (kept a surprise until the last click) */
.stat-hidden {
  color: rgba(232, 227, 245, 0.45);
  font-weight: 600;
}

/* ----- Live activity bar ----- */
.live-bar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: #171717;
  border-bottom: 1px solid rgba(255, 122, 26, 0.25);
  font-size: 12.5px;
  overflow: hidden;
}
.live-bar-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2ecc71;
  box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.6);
  animation: livePulse 1.8s infinite;
}
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.6); }
  70%  { box-shadow: 0 0 0 7px rgba(46, 204, 113, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}
.live-bar-icon {
  flex: 0 0 auto;
  color: #ff7a1a;
  font-size: 12px;
}
.live-bar-track {
  flex: 1 1 auto;
  overflow: hidden;
  white-space: nowrap;
}
.live-bar-msg {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #ededed;
  opacity: 0;
  transform: translateX(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.live-bar-msg.show {
  opacity: 1;
  transform: translateX(0);
}
.live-bar-msg[data-type="deposit"] { color: #2ecc71; }
.live-bar-msg[data-type="withdraw"] { color: #ff7a1a; }
.live-bar-msg[data-type="join"] { color: #ededed; }
.live-bar-msg[data-type="profit"] { color: #4ade80; }
.live-bar-msg[data-type="rank"] { color: #ff7a1a; }

.flash {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.4;
}
.flash-success { background: rgba(46, 160, 67, 0.15); color: #4ade80; border: 1px solid rgba(46,160,67,.4); }
.flash-error   { background: rgba(220, 38, 38, 0.15); color: #f87171; border: 1px solid rgba(220,38,38,.4); }
.flash-info    { background: rgba(59, 130, 246, 0.15); color: #93c5fd; border: 1px solid rgba(59,130,246,.4); }

/* ----- Auth screens ----- */
.auth-wrap {
  padding: 48px 24px 40px;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 122, 26, 0.16), transparent 55%),
    radial-gradient(circle at 90% 100%, rgba(232, 93, 4, 0.12), transparent 50%);
}
.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}
.auth-logo .logo-icon {
  width: 64px; height: 64px;
  border-radius: 18px;
  background: linear-gradient(145deg, #ff7a1a, #e85d04);
  color: #000;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 30px;
  box-shadow: 0 12px 30px rgba(255, 122, 26, 0.4);
}
.auth-logo .logo-text {
  font-size: 26px; font-weight: 800; color: #fff; letter-spacing: 2px;
}
.auth-sub { text-align: center; color: #a8a8a8; font-size: 14px; margin-bottom: 28px; }

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-field label { display: block; font-size: 13px; color: #a8a8a8; margin-bottom: 6px; }
.auth-field input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #2a2a2a;
  background: #141414;
  color: #fff;
  font-size: 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-field input:focus {
  outline: none;
  border-color: #ff7a1a;
  box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.18);
}

.btn-primary {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff7a1a, #e85d04);
  color: #000;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
  box-shadow: 0 8px 22px rgba(255, 122, 26, 0.3);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(255, 122, 26, 0.42); }
.btn-primary:active { transform: translateY(0); }

.auth-alt { text-align: center; margin-top: 22px; font-size: 14px; color: #a8a8a8; }
.auth-alt a { color: #ff9a4d; text-decoration: none; font-weight: 600; }

/* TOTP enrollment */
.totp-box { text-align: center; }
.totp-box img { width: 200px; height: 200px; background: #fff; border-radius: 12px; padding: 8px; }
.totp-secret {
  font-family: monospace;
  font-size: 16px;
  letter-spacing: 2px;
  background: #171717;
  border: 1px dashed #3a3a3a;
  color: #fff;
  padding: 10px;
  border-radius: 8px;
  margin: 14px 0;
  word-break: break-all;
}
.code-input input {
  text-align: center;
  letter-spacing: 8px;
  font-size: 22px;
}

/* Simple forms reused on me/recharge/withdraw */
.demo-actions { display: flex; gap: 10px; margin: 14px 0; }
.demo-actions .btn-primary { flex: 1; }

.mini-form {
  background: #171717;
  border: 1px solid #171717;
  border-radius: 12px;
  padding: 16px;
  margin: 14px 0;
}
.mini-form h3 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.mini-form .auth-field { margin-bottom: 12px; }
.form-note { color: #a8a8a8; font-size: 12.5px; margin: -4px 0 14px; line-height: 1.5; }
.form-note strong { color: #ff7a1a; }
.funds-tag {
  display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 999px;
  font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px;
  background: rgba(74, 222, 128, .15); color: #4ade80; vertical-align: middle;
}
.funds-tag.locked { background: rgba(255, 122, 26, .15); color: #ff7a1a; }

/* Quantify live countdown */
.quant-timer-box {
  text-align: center; background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08); border-radius: 14px;
  padding: 18px 16px; margin-bottom: 14px;
}
.quant-timer-label { color: #a8a8a8; font-size: 12.5px; margin-bottom: 8px; }
.quant-timer {
  font-size: 34px; font-weight: 700; letter-spacing: 1px; color: #ff7a1a;
  font-variant-numeric: tabular-nums; line-height: 1.1; margin-bottom: 6px;
}
.withdraw-lock-box {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: rgba(255, 122, 26, .08); border: 1px solid rgba(255, 122, 26, .25);
  border-radius: 10px; padding: 10px 12px; margin: 4px 0 14px;
}
.withdraw-lock-box .lock-text { color: #a8a8a8; font-size: 12.5px; }
.withdraw-lock-box .lock-time { color: #ff7a1a; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Deposit overlay */
.deposit-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: none; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .65); backdrop-filter: blur(3px);
  padding: 16px;
}
.deposit-overlay.open { display: flex; }
.deposit-modal {
  width: 100%; max-width: 420px;
  background: #0d0d0d; border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,.5);
}
.deposit-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid rgba(255,255,255,.07);
}
.deposit-modal-head h3 { margin: 0; color: #fff; font-size: 16px; }
.deposit-close {
  background: none; border: none; color: #a8a8a8; font-size: 26px;
  line-height: 1; cursor: pointer; padding: 0 4px;
}
.deposit-modal-body { padding: 18px; }
.deposit-label {
  color: #a8a8a8; font-size: 12px; text-transform: uppercase;
  letter-spacing: .4px; margin: 4px 2px 8px;
}
.network-option {
  display: flex; align-items: center; gap: 12px;
  background: rgba(74, 222, 128, .06); border: 1px solid rgba(74, 222, 128, .35);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 18px;
}
.network-logo { border-radius: 50%; flex-shrink: 0; }
.network-info { flex: 1; }
.network-name { color: #fff; font-weight: 600; font-size: 15px; }
.network-chain { color: #4ade80; font-size: 12.5px; font-weight: 600; }
.network-check { color: #4ade80; font-size: 18px; }
.deposit-address {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px; padding: 12px 14px; margin-bottom: 14px;
}
.address-text {
  flex: 1; color: #fff; font-family: monospace; font-size: 14px;
  word-break: break-all; line-height: 1.4;
}
.address-copy {
  background: rgba(255, 122, 26, .15); color: #ff7a1a; border: none;
  border-radius: 8px; padding: 8px 11px; cursor: pointer; font-size: 14px;
  flex-shrink: 0;
}
.address-copy.copied { background: rgba(74, 222, 128, .2); color: #4ade80; }
.deposit-note {
  background: rgba(255, 122, 26, .08); border: 1px solid rgba(255, 122, 26, .25);
  border-radius: 10px; padding: 11px 13px; margin: 0 0 18px;
  color: #d4d4d4; font-size: 12.5px; line-height: 1.55;
}
.deposit-note i { color: #ff7a1a; margin-right: 5px; }
.deposit-note strong { color: #ff7a1a; }

.tx-list { margin: 8px 0 20px; }
.tx-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 4px;
  border-bottom: 1px solid #171717;
  font-size: 14px;
}
.tx-item .tx-type { color: #fff; text-transform: capitalize; }
.tx-item .tx-desc { color: #8a8a8a; font-size: 12px; }
.tx-amt-pos { color: #4ade80; font-weight: 600; }
.tx-amt-neg { color: #f87171; font-weight: 600; }

/* ---------------------------------------------------------------- *
 *  Install / Add-to-Home-Screen gate page
 * ---------------------------------------------------------------- */
.install-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.install-btn-hidden { display: none; }
#installBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.install-steps {
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 14px;
  padding: 18px 18px 18px 20px;
}
.install-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: #fff;
  margin: 0 0 12px;
}
.install-heading i { color: #ff7a1a; }
.install-steps ol {
  margin: 0;
  padding-inline-start: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.install-steps li {
  color: #cfcfcf;
  font-size: 14px;
  line-height: 1.5;
}
.install-steps li i { color: #ff7a1a; margin-inline-start: 4px; }

/* ---------------------------------------------------------------- *
 *  Full-height fit + bottom safe-area / footer polish
 *  Fixes the black strip under the bottom nav on notched phones and
 *  ensures the dark app surface fills the whole screen.
 * ---------------------------------------------------------------- */
html, body {
  background-color: #0d0d0d; /* match the app surface so no black strip shows */
}

.site-container {
  /* Prefer the dynamic viewport unit; falls back to svh/vh on older phones. */
  height: 100svh;
  height: 100dvh;
}

.site-wrapper {
  /* Make the inner surface always at least as tall as the viewport so its
     dark background paints all the way down, even past the home indicator. */
  min-height: 100svh;
  min-height: 100dvh;
}

/* Paint the bottom nav's safe-area area the same dark color so the home
   indicator strip is never plain black. The nav already adds padding for it. */
.bottom-nav {
  background-color: #0d0d0d;
}
.bottom-nav::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: var(--safe-bottom, 0px);
  background-color: #0d0d0d;
}

/* Auth/install screens have no bottom nav; let them use the full height
   and clear the home indicator themselves. */
.auth-wrap {
  min-height: calc(100dvh - var(--safe-top) - var(--safe-bottom));
  padding-bottom: calc(24px + var(--safe-bottom));
}
