/* ============ Raspay — tema cassino mobile-first ============ */

:root {
  --bg: #0b0f1a;
  --bg2: #111827;
  --card: #171f31;
  --card2: #1d2740;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f1f5f9;
  --muted: #8b96ab;
  --primary: #22c55e;
  --primary2: #16a34a;
  --gold: #fbbf24;
  --gold2: #d97706;
  --danger: #ef4444;
  --radius: 18px;
  --nav-h: 78px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Nunito', system-ui, sans-serif;
  min-height: 100%;
}

body {
  background:
    radial-gradient(1200px 500px at 50% -200px, rgba(34, 197, 94, 0.14), transparent),
    radial-gradient(800px 400px at 100% 100%, rgba(251, 191, 36, 0.06), transparent),
    var(--bg);
}

#app { max-width: 480px; margin: 0 auto; min-height: 100vh; position: relative; }

.hidden { display: none !important; }

/* ícones (Twemoji + interface): escalam com o font-size do elemento pai */
.ico {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.125em;
  flex-shrink: 0;
  object-fit: contain;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* ============ BOTÕES ============ */

.btn {
  border: none;
  border-radius: 14px;
  font-family: inherit;
  font-weight: 800;
  font-size: 16px;
  padding: 14px 20px;
  cursor: pointer;
  transition: transform 0.1s, filter 0.15s;
  color: #fff;
}
.btn:active { transform: scale(0.96); }
.btn-big { width: 100%; padding: 16px; font-size: 17px; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.35);
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: #1a1200;
  box-shadow: 0 6px 20px rgba(251, 191, 36, 0.3);
}
.btn-ghost {
  background: var(--card2);
  border: 1px solid var(--line);
  color: var(--text);
}
.btn-danger { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.btn:disabled { opacity: 0.5; pointer-events: none; }

/* ============ AUTENTICAÇÃO ============ */

#screen-auth { padding: 48px 20px 32px; }

.auth-hero { text-align: center; margin-bottom: 28px; }
.auth-logo {
  font-size: 74px;
  line-height: 1;
  filter: drop-shadow(0 8px 24px rgba(251, 191, 36, 0.35));
  animation: bounce 2.4s ease-in-out infinite;
}
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.brand { font-size: 40px; font-weight: 900; letter-spacing: -1px; }
.brand span { color: var(--gold); }
.auth-sub { color: var(--muted); margin-top: 6px; font-size: 15px; }
.auth-sub b { color: var(--gold); }

.auth-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.auth-tabs {
  display: flex;
  background: var(--bg2);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 20px;
}
.auth-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-weight: 800;
  font-size: 15px;
  padding: 10px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s;
}
.auth-tab.active { background: var(--primary); color: #fff; }

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form label { font-size: 13px; font-weight: 700; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.auth-form input,
.wtab input {
  background: var(--bg2);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  padding: 13px 14px;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.auth-form input:focus, .wtab input:focus { border-color: var(--primary); }

.bonus-pill {
  background: rgba(251, 191, 36, 0.12);
  border: 1px dashed rgba(251, 191, 36, 0.5);
  color: var(--gold);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}
.wtab .bonus-pill { margin-bottom: 12px; display: flex; align-items: center; justify-content: center; gap: 8px; }

.auth-foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 24px; line-height: 1.7; }

/* ============ TOPO ============ */

#topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(11, 15, 26, 0.85);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-brand { font-size: 20px; font-weight: 900; display: flex; align-items: center; gap: 8px; }
.topbar-brand span { color: var(--gold); }
.topbar-brand .brand-ico { font-size: 26px; line-height: 1; display: inline-flex; }

.balance-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 8px 7px 14px;
  color: var(--text);
  font-family: inherit;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
}
.balance-label { display: none; }
#balance-value { color: var(--gold); }
.balance-plus {
  background: var(--primary);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: #fff;
}

/* ============ PÁGINAS ============ */

.page { padding: 16px 16px calc(var(--nav-h) + 28px); }
.page-title { font-size: 24px; font-weight: 900; margin-bottom: 16px; }
.section-title { font-size: 18px; font-weight: 900; margin: 20px 0 12px; }

/* ============ HOME ============ */

.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background:
    radial-gradient(420px 200px at 88% -20%, rgba(251, 191, 36, 0.35), transparent 65%),
    radial-gradient(320px 180px at -10% 110%, rgba(34, 197, 94, 0.30), transparent 60%),
    linear-gradient(135deg, #052e16, #14532d 45%, #166534 75%, #92400e);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: var(--radius);
  padding: 20px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 34px rgba(20, 83, 45, 0.45);
}
/* brilho que atravessa o banner de tempos em tempos */
.banner::after {
  content: '';
  position: absolute;
  top: -60%;
  left: -45%;
  width: 34%;
  height: 220%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
  transform: rotate(18deg) translateX(0);
  animation: banner-shine 5.5s ease-in-out infinite;
  pointer-events: none;
  will-change: transform;
}
@keyframes banner-shine {
  0%, 50% { transform: rotate(18deg) translateX(0); }
  100%    { transform: rotate(18deg) translateX(560%); }
}

.banner-text { position: relative; z-index: 1; }
.banner-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(251, 191, 36, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-radius: 999px;
  padding: 5px 11px;
  margin-bottom: 10px;
}
.banner-badge .ico { font-size: 13px; }
.banner-text h2 {
  font-size: clamp(17px, 5.4vw, 24px);
  font-weight: 900;
  line-height: 1.08;
  white-space: nowrap;
  letter-spacing: 0.3px;
  background: linear-gradient(90deg, #fff, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.banner-text p { color: rgba(255, 255, 255, 0.85); font-size: 13px; margin-top: 8px; font-weight: 700; }
.banner-text p b { color: var(--gold); }
.banner-cta {
  -webkit-appearance: none;
  appearance: none;
  margin-top: 14px;
  background: linear-gradient(135deg, var(--gold), #d97706);
  color: #1c1004;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 900;
  padding: 11px 18px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(251, 191, 36, 0.35);
  transition: transform 0.15s;
}
.banner-cta:active { transform: scale(0.96); }

.banner-emoji {
  font-size: 54px;
  line-height: 1;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.45));
  z-index: 1;
  flex-shrink: 0;
  animation: banner-float 3.4s ease-in-out infinite;
}
@keyframes banner-float {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50%      { transform: translateY(-9px) rotate(4deg); }
}

/* ticker de ganhadores */
.winners-ticker {
  margin-top: 14px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 0;
  position: relative;
}
.ticker-track {
  display: inline-flex;
  gap: 34px;
  white-space: nowrap;
  animation: ticker 75s linear infinite;
  padding-left: 100%;
}
@keyframes ticker { to { transform: translateX(-100%); } }
.ticker-item { font-size: 13px; font-weight: 700; color: var(--muted); }
.ticker-item b { color: var(--gold); }
.ticker-item .ico { font-size: 15px; }

/* grade de jogos */
.games-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.game-card {
  border: none;
  border-radius: var(--radius);
  padding: 18px 14px 14px;
  text-align: left;
  cursor: pointer;
  color: #fff;
  font-family: inherit;
  position: relative;
  overflow: hidden;
  transition: transform 0.12s;
  min-height: 148px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.game-card:active { transform: scale(0.96); }
.game-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120px 80px at 85% 0%, rgba(255, 255, 255, 0.25), transparent);
}
.game-card .gc-icon { font-size: 42px; line-height: 1; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.35)); }
.game-card .gc-name { font-size: 16px; font-weight: 900; margin-top: 8px; line-height: 1.15; }
.game-card .gc-tag { font-size: 11.5px; opacity: 0.9; font-weight: 700; margin-top: 3px; }
.game-card .gc-price {
  margin-top: 10px;
  align-self: flex-start;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 900;
}

/* ============ TELA DO JOGO ============ */

.back-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  padding: 4px 0;
  margin-bottom: 8px;
}

.game-header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.game-header .gh-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 34px;
  flex-shrink: 0;
}
.game-header h2 { font-size: 21px; font-weight: 900; }
.game-header p { color: var(--muted); font-size: 13px; font-weight: 700; }

.scratch-stage { display: grid; place-items: center; }
.scratch-wrap {
  position: relative;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  border: 3px solid var(--line);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5);
  background: var(--card);
}

.scratch-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 6px;
  padding: 10px;
  background: linear-gradient(160deg, var(--card2), var(--bg2));
}
.scratch-cell {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.scratch-cell .sc-sym { font-size: clamp(24px, 9vw, 38px); line-height: 1; display: inline-flex; }
.scratch-cell .sc-val { font-size: clamp(10px, 3vw, 13px); font-weight: 900; color: var(--muted); }
.scratch-cell.winner {
  background: rgba(251, 191, 36, 0.15);
  border-color: var(--gold);
  animation: winpulse 0.9s ease-in-out infinite;
}
.scratch-cell.winner .sc-val { color: var(--gold); }
@keyframes winpulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }

#scratch-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
  transition: opacity 0.45s;
}
#scratch-canvas.fade-out { opacity: 0; pointer-events: none; }

.scratch-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.65);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 800;
  pointer-events: none;
  animation: hintfloat 1.6s ease-in-out infinite;
  z-index: 3;
}
@keyframes hintfloat { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -6px); } }

.game-result {
  text-align: center;
  margin-top: 16px;
  font-size: 17px;
  font-weight: 900;
  padding: 14px;
  border-radius: 14px;
}
.game-result.win { background: rgba(251, 191, 36, 0.12); color: var(--gold); border: 1px dashed rgba(251, 191, 36, 0.5); }
.game-result.lose { background: var(--card); color: var(--muted); border: 1px solid var(--line); }

.game-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }

/* ---- quantidade + modo automático ---- */

.buy-options {
  margin-top: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.qty-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.qty-label { font-size: 13px; font-weight: 800; color: var(--muted); }
.qty-chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.qty-chip {
  min-width: 40px;
  padding: 0 10px;
  height: 40px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--bg2);
  color: var(--muted);
  font-family: inherit;
  font-weight: 900;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.15s;
}
.qty-chip.active {
  border-color: var(--primary);
  background: rgba(34, 197, 94, 0.14);
  color: var(--primary);
  transform: scale(1.05);
}

.auto-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.auto-switch .auto-text { font-size: 14px; font-weight: 800; display: flex; flex-direction: column; }
.auto-switch .auto-text small { color: var(--muted); font-size: 11.5px; font-weight: 700; }
.auto-switch input { display: none; }
.switch-track {
  width: 50px;
  height: 28px;
  border-radius: 999px;
  background: var(--bg2);
  border: 1.5px solid var(--line);
  position: relative;
  transition: all 0.2s;
  flex-shrink: 0;
}
.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--muted);
  transition: all 0.2s;
}
.auto-switch input:checked + .switch-track { background: rgba(34, 197, 94, 0.25); border-color: var(--primary); }
.auto-switch input:checked + .switch-track .switch-thumb { left: 24px; background: var(--primary); }
.auto-switch.forced { opacity: 0.75; pointer-events: none; }

/* ============ CARTEIRA ============ */

/* ---- barra do bônus de 1º depósito (rollover) ---- */

.rollover-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.rollover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14px;
}
.rollover-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
}
.rollover-title .ico { font-size: 18px; }
.rollover-head b { color: var(--gold); font-size: 13px; white-space: nowrap; }

.rollover-bar {
  height: 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.rollover-fill {
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--gold), #fde68a);
  transition: width 0.5s ease;
}
.rollover-box.done .rollover-fill { background: linear-gradient(90deg, var(--primary), #4ade80); }

.rollover-msg { margin-top: 9px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.rollover-box.done .rollover-msg { color: var(--primary); }

/* ---- tipos de chave PIX no saque ---- */

.field-label-txt {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
}
.pixtype-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.pixtype-btn {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  padding: 11px 4px;
  cursor: pointer;
  transition: all 0.15s;
}
.pixtype-btn.active {
  border-color: var(--gold);
  background: rgba(251, 191, 36, 0.12);
  color: var(--gold);
}

/* ---- indique e ganhe (perfil) ---- */

.ref-card {
  background: linear-gradient(150deg, rgba(251, 191, 36, 0.10), rgba(34, 197, 94, 0.08)), var(--card);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 18px;
}
.ref-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 900;
  margin-bottom: 8px;
}
.ref-head b { color: var(--gold); }
.ref-head .ico { font-size: 20px; }
.ref-desc { font-size: 13px; color: var(--muted); font-weight: 700; line-height: 1.5; margin-bottom: 12px; }
.ref-desc b { color: var(--text); }
.ref-link {
  background: rgba(0, 0, 0, 0.3);
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  word-break: break-all;
  margin-bottom: 10px;
}
.ref-card .btn { width: 100%; }
.ref-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.ref-stats > div {
  background: rgba(0, 0, 0, 0.22);
  border-radius: 12px;
  padding: 10px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ref-stats small { font-size: 11px; color: var(--muted); font-weight: 700; }
.ref-stats b { font-size: 14px; color: var(--gold); }

.wallet-balance-card {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
}
.wallet-balance-card::after {
  content: '💳';
  position: absolute;
  right: -8px;
  top: -10px;
  font-size: 80px;
  opacity: 0.12;
}
.wallet-balance-card span { color: var(--muted); font-size: 13px; font-weight: 700; }
.wallet-balance-card strong { font-size: 34px; font-weight: 900; color: var(--gold); }
.wallet-stats { display: flex; gap: 24px; margin-top: 12px; }
.wallet-stats small { color: var(--muted); font-size: 11.5px; display: block; font-weight: 700; }
.wallet-stats b { font-size: 15px; }

.wallet-tabs {
  display: flex;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
  margin: 16px 0;
}
.wallet-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-weight: 800;
  font-size: 14px;
  padding: 10px;
  border-radius: 9px;
  cursor: pointer;
}
.wallet-tab.active { background: var(--primary); color: #fff; }

.wtab-desc { color: var(--muted); font-size: 14px; margin-bottom: 14px; font-weight: 700; }
.wtab-desc b { color: var(--text); }

.amount-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.amount-btn {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-weight: 900;
  font-size: 16px;
  padding: 14px 0;
  cursor: pointer;
  transition: all 0.15s;
}
.amount-btn.selected { border-color: var(--primary); background: rgba(34, 197, 94, 0.12); color: var(--primary); }

.input-money {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg2);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  font-weight: 900;
  color: var(--muted);
  margin-bottom: 14px;
}
.input-money input { background: none !important; border: none !important; padding: 14px 0 !important; }

.field-label { font-size: 13px; font-weight: 700; color: var(--muted); display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }

.tx-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.tx-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
}
.tx-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 21px;
  flex-shrink: 0;
  background: var(--bg2);
  color: var(--muted);
}
.tx-info { flex: 1; min-width: 0; }
.tx-info b { font-size: 14px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-info small { color: var(--muted); font-size: 11.5px; font-weight: 700; }
.tx-amount { font-weight: 900; font-size: 15px; }
.tx-amount.pos { color: var(--primary); }
.tx-amount.neg { color: var(--muted); }
.tx-badge {
  font-size: 10px;
  font-weight: 800;
  background: rgba(251, 191, 36, 0.15);
  color: var(--gold);
  padding: 2px 8px;
  border-radius: 999px;
}

/* ============ PERFIL ============ */

.profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
}
.profile-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #0d9488);
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 900;
  flex-shrink: 0;
}
.profile-info { min-width: 0; }
.profile-info strong { font-size: 18px; display: block; }
.profile-info span { color: var(--muted); font-size: 13px; font-weight: 700; word-break: break-all; }

.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.pstat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 8px;
  text-align: center;
}
.pstat span { font-size: 24px; line-height: 1; display: inline-flex; }
.pstat small { display: block; color: var(--muted); font-size: 10.5px; margin: 5px 0 3px; font-weight: 700; }
.pstat b { font-size: 13px; }

/* ============ MENU FLUTUANTE (estilo WhatsApp) ============ */

.floatnav {
  position: fixed;
  bottom: max(14px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 24px), 420px);
  height: var(--nav-h);
  background: linear-gradient(180deg, rgba(30, 40, 63, 0.92), rgba(17, 24, 39, 0.96));
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
  z-index: 100;
  box-shadow:
    0 16px 44px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nav-item {
  background: none;
  border: none;
  color: var(--muted);
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  min-width: 66px;
  padding: 9px 12px;
  border-radius: 18px;
  transition: all 0.22s cubic-bezier(0.2, 0.8, 0.3, 1.2);
  position: relative;
}
.nav-item .nav-icon { font-size: 23px; line-height: 1; display: inline-flex; transition: transform 0.22s; }
.nav-item .nav-label { font-size: 10.5px; font-weight: 800; letter-spacing: 0.2px; }
.nav-item:active { transform: scale(0.9); }

.nav-item.active {
  color: var(--primary);
  background: rgba(34, 197, 94, 0.13);
}
.nav-item.active .nav-icon { transform: translateY(-1px) scale(1.12); }
.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 5px;
  width: 14px;
  height: 3px;
  border-radius: 999px;
  background: var(--primary);
}

.nav-item { flex: 1; }

/* ============ MODAIS ============ */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: grid;
  place-items: end center;
}
.modal-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px 24px 0 0;
  padding: 26px 20px 30px;
  width: min(100%, 480px);
  text-align: center;
  position: relative;
  animation: slideup 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.1);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
@keyframes slideup { from { transform: translateY(60px); opacity: 0; } }
.modal-box h3 { font-size: 21px; font-weight: 900; }
.modal-sub { color: var(--muted); font-size: 14px; font-weight: 700; }
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--bg2);
  border: none;
  color: var(--muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
}

.qr-fake {
  width: 170px;
  height: 170px;
  margin: 4px auto;
  border-radius: 14px;
  background: #fff;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  grid-template-rows: repeat(15, 1fr);
  gap: 1px;
}
.qr-fake i { background: #111; border-radius: 1px; }

.qr-img {
  width: 190px;
  height: 190px;
  margin: 4px auto;
  border-radius: 14px;
  background: #fff;
  padding: 8px;
  object-fit: contain;
}

.pix-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px dashed rgba(34, 197, 94, 0.45);
  color: var(--primary);
  border-radius: 12px;
  padding: 12px;
  font-size: 13.5px;
  font-weight: 800;
}
.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2.5px solid rgba(34, 197, 94, 0.25);
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.pix-code {
  background: var(--bg2);
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 11px;
  color: var(--muted);
  word-break: break-all;
  font-family: monospace;
}

/* modal de prêmio */
.win-box { overflow: hidden; }
.win-emoji { font-size: 66px; line-height: 1; animation: bounce 1s ease-in-out infinite; }
.win-amount {
  font-size: 42px;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 4px 24px rgba(251, 191, 36, 0.45);
}
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i {
  position: absolute;
  top: -12px;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  animation: confall linear infinite;
}
@keyframes confall {
  to { transform: translateY(480px) rotate(720deg); opacity: 0.2; }
}

/* ============ TOAST ============ */

.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 28px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: #111;
  font-weight: 800;
  font-size: 14px;
  padding: 12px 20px;
  border-radius: 999px;
  z-index: 300;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: toastin 0.25s;
  max-width: calc(100% - 40px);
  text-align: center;
}
.toast.error { background: var(--danger); color: #fff; }
@keyframes toastin { from { transform: translate(-50%, 16px); opacity: 0; } }

/* telas maiores */
@media (min-width: 480px) {
  .balance-label { display: inline; color: var(--muted); font-size: 12px; }
  .modal { place-items: center; }
  .modal-box { border-radius: 24px; }
}
