:root {
  --bw-bg: #050816;
  --bw-bg-2: #0a1230;
  --bw-panel: #12182e;
  --bw-panel-2: #1a223f;
  --bw-line: rgba(90, 130, 220, 0.18);
  --bw-green: #2dff6e;
  --bw-green-dark: #14c94f;
  --bw-yellow: #ffe14a;
  --bw-purple: #7c5cff;
  --bw-purple-2: #4f46e5;
  --bw-red: #ef4444;
  --bw-text: #ffffff;
  --bw-muted: #9aa6c3;
  --bw-blue: #3b82f6;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", "Nunito Sans", system-ui, sans-serif;
  color: var(--bw-text);
  background: var(--bw-bg);
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.bw-page {
  min-height: 100vh;
  background:
    linear-gradient(rgba(8, 16, 48, 0.92), rgba(5, 8, 22, 0.96)),
    repeating-linear-gradient(0deg, transparent 0 27px, var(--bw-line) 27px 28px),
    repeating-linear-gradient(90deg, transparent 0 27px, var(--bw-line) 27px 28px),
    radial-gradient(circle at 50% 0%, #1a2b6b 0%, var(--bw-bg) 55%);
  background-attachment: fixed;
}

.bw-app-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  background: #0d1328;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 13px;
  color: #d7def5;
}

.bw-app-banner .install {
  background: var(--bw-blue);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 6px 12px;
  font-weight: 700;
  cursor: pointer;
}

.bw-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  max-width: 920px;
  margin: 0 auto;
}

.bw-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  letter-spacing: 0.5px;
  font-size: 18px;
}

.bw-logo .crown {
  color: var(--bw-yellow);
  font-size: 14px;
  line-height: 1;
}

.bw-logo .brand {
  background: linear-gradient(90deg, #60a5fa, #a78bfa, #34d399, #fbbf24);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bw-saldo-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bw-saldo-box .label {
  font-size: 11px;
  color: var(--bw-muted);
  text-align: right;
  line-height: 1.1;
}

.bw-saldo-box .value {
  color: var(--bw-green);
  font-weight: 800;
  font-size: 16px;
}

.bw-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  display: grid;
  place-items: center;
  font-weight: 800;
  border: 2px solid rgba(255,255,255,0.2);
  cursor: pointer;
}

.bw-container {
  width: min(460px, calc(100% - 24px));
  margin: 0 auto;
  padding: 8px 0 110px;
}

.bw-online-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(10, 30, 20, 0.85);
  border: 1px solid rgba(45, 255, 110, 0.35);
  color: var(--bw-green);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
}

.bw-online-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bw-green);
  box-shadow: 0 0 8px var(--bw-green);
}

.bw-hero-title {
  text-align: center;
  margin: 18px 0 14px;
}

.bw-hero-title h1 {
  margin: 0;
  font-size: clamp(28px, 7vw, 40px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.bw-hero-title .earn {
  background: linear-gradient(90deg, #ffe14a, #2dff6e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bw-promo-card {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(124, 92, 255, 0.35), transparent 40%),
    radial-gradient(circle at 80% 30%, rgba(45, 255, 110, 0.2), transparent 35%),
    linear-gradient(160deg, #1a1140, #0d1b3f 55%, #102a1f);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
  min-height: 280px;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.bw-promo-card .promo-title {
  font-size: clamp(22px, 6vw, 30px);
  font-weight: 900;
  line-height: 1.05;
  margin: 0 0 16px;
  text-shadow: 0 4px 18px rgba(0,0,0,0.5);
}

.bw-promo-card .promo-title span {
  color: var(--bw-green);
}

.bw-blocks {
  display: grid;
  grid-template-columns: repeat(4, 28px);
  gap: 4px;
  margin: 8px 0 10px;
}

.bw-blocks span {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.35), inset 0 -3px 0 rgba(0,0,0,0.25);
}

.bw-coin {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff59d, #f6c90e 45%, #c98a00);
  box-shadow: 0 4px 10px rgba(0,0,0,0.35);
}

.bw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  font-weight: 900;
  border-radius: 14px;
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}

.bw-btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.bw-btn:active { transform: translateY(1px); }

.bw-btn-green {
  background: linear-gradient(180deg, #49ff86, #17d45a);
  color: #062413;
  box-shadow: 0 10px 28px rgba(45, 255, 110, 0.35);
}

.bw-btn-purple {
  background: linear-gradient(90deg, #7c5cff, #4f46e5);
  color: #fff;
}

.bw-btn-outline {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.55);
  color: #fff;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 700;
}

.bw-btn-lg {
  width: 100%;
  padding: 16px 20px;
  font-size: 18px;
  margin-top: 18px;
}

.bw-link {
  display: inline-block;
  margin-top: 14px;
  color: #e8ecff;
  font-size: 14px;
}

.bw-card {
  background: linear-gradient(180deg, #161d36, #101628);
  border: 1px solid rgba(120, 150, 255, 0.18);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}

/* Borda animada (modal de valores) */
.bw-glow-frame {
  position: relative;
  border-radius: 24px;
  padding: 2px;
  overflow: hidden;
  box-shadow:
    0 0 18px rgba(255, 120, 40, 0.35),
    0 18px 40px rgba(0, 0, 0, 0.35);
}

.bw-glow-frame::before {
  content: "";
  position: absolute;
  inset: -55%;
  background: conic-gradient(
    from 0deg,
    #ff4d00,
    #ffb703,
    #ff7a18,
    #ff3d00,
    #ffd166,
    #ff4d00
  );
  animation: bw-border-spin 2.8s linear infinite;
}

.bw-glow-frame > .bw-card {
  position: relative;
  z-index: 1;
  border: 0;
  box-shadow: none;
}

/* Borda animada do botão Jogar */
.bw-glow-btn {
  position: relative;
  margin-top: 18px;
  border-radius: 18px;
  padding: 2px;
  overflow: hidden;
  box-shadow: 0 0 16px rgba(45, 255, 110, 0.35);
}

.bw-glow-btn::before {
  content: "";
  position: absolute;
  inset: -60%;
  background: conic-gradient(
    from 0deg,
    #2dff6e,
    #ffe14a,
    #17d45a,
    #67e8f9,
    #2dff6e
  );
  animation: bw-border-spin 2.2s linear infinite;
}

.bw-glow-btn .bw-btn {
  position: relative;
  z-index: 1;
  margin-top: 0;
  width: 100%;
  border-radius: 16px;
}

@keyframes bw-border-spin {
  to { transform: rotate(360deg); }
}

.bw-card-banner {
  position: relative;
  min-height: 150px;
  padding: 18px;
  background:
    radial-gradient(circle at 15% 40%, rgba(255, 120, 80, 0.35), transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(80, 120, 255, 0.4), transparent 40%),
    linear-gradient(135deg, #2a1458, #12305f);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.bw-card-banner-img {
  min-height: 140px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: #0b1224;
}

.bw-card-banner h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.1;
  text-shadow: 0 3px 12px rgba(0,0,0,0.45);
}

.bw-badge-online {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  border-radius: 999px;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bw-badge-online::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55);
  animation: bw-dot-pulse 1.8s ease-out infinite;
}

@keyframes bw-dot-pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.bw-card-body { padding: 18px; }

.bw-section-label {
  color: var(--bw-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.bw-entry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.bw-entry-btn {
  background: #0e1530;
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  border-radius: 12px;
  padding: 12px 8px;
  font-weight: 800;
  cursor: pointer;
}

.bw-entry-btn.active {
  background: #5b6f93;
  border-color: #9eb2d8;
}

.bw-entry-input {
  width: 100%;
  margin-top: 10px;
  background: #0e1530;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  color: #fff;
  padding: 12px;
  text-align: center;
  font-weight: 700;
}

.bw-reward {
  margin-top: 16px;
  text-align: center;
}

.bw-reward small {
  display: block;
  color: var(--bw-muted);
  margin-bottom: 4px;
}

.bw-reward strong {
  color: var(--bw-yellow);
  font-size: 34px;
  font-weight: 900;
}

.bw-bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(520px, 100%);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(10, 14, 28, 0.96);
  border-top: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  z-index: 40;
  overflow: visible;
}

.bw-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #8b95b5;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 2px;
  background: none;
  border: 0;
  cursor: pointer;
}

.bw-nav-item .icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: #c7d0ea;
  transition: color 0.15s ease, transform 0.15s ease, filter 0.15s ease;
}

.bw-nav-item .icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.bw-nav-item:hover .icon,
.bw-nav-item.active .icon {
  color: #ffffff;
  transform: translateY(-1px);
  filter: drop-shadow(0 0 8px rgba(45, 255, 110, 0.25));
}

.bw-nav-item.active { color: #fff; }

.bw-nav-item.play {
  color: #2dff6e;
  gap: 5px;
  font-weight: 700;
}

.bw-nav-item.play.active {
  color: #2dff6e;
}

.bw-play-label {
  color: #2dff6e;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

/* Botão Jogar: arco verde girando na borda (camada de baixo + miolo cobrindo o centro) */
.bw-play-orb {
  position: relative;
  width: 56px;
  height: 56px;
  margin-top: -24px;
  border-radius: 50%;
  display: block;
  flex-shrink: 0;
}

.bw-play-orb-spin {
  position: absolute;
  top: 0;
  left: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: conic-gradient(
    #2dff6e 0deg,
    rgba(45, 255, 110, 0.55) 40deg,
    transparent 90deg,
    transparent 320deg,
    rgba(45, 255, 110, 0.35) 350deg,
    #2dff6e 360deg
  );
  box-shadow: 0 0 12px rgba(45, 255, 110, 0.55);
  animation: bw-play-spin 1.4s linear infinite;
  will-change: transform;
  z-index: 0;
}

.bw-play-orb-core {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, #151d34, #070b14 70%);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.55);
  z-index: 1;
}

.bw-play-blocks {
  width: 22px;
  height: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}

.bw-play-blocks i {
  display: block;
  border-radius: 4px;
}

.bw-play-blocks i:nth-child(1) { background: #a855f7; }
.bw-play-blocks i:nth-child(2) { background: #34d399; }
.bw-play-blocks i:nth-child(3) { background: #60a5fa; }
.bw-play-blocks i:nth-child(4) { background: #fbbf24; }

@keyframes bw-play-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.bw-toast {
  position: fixed;
  left: 12px;
  bottom: 86px;
  z-index: 45;
  background: rgba(15, 20, 40, 0.92);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  max-width: min(320px, calc(100% - 24px));
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.bw-toast .up {
  color: var(--bw-green);
  font-weight: 900;
}

.bw-win-toast {
  position: fixed;
  left: 12px;
  bottom: 90px;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min(280px, calc(100% - 24px));
  max-width: min(340px, calc(100% - 24px));
  padding: 10px 14px 10px 10px;
  border-radius: 18px;
  background: linear-gradient(180deg, #12182e, #0b1020);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 0 0 1px rgba(45, 255, 110, 0.08),
    0 12px 32px rgba(0, 0, 0, 0.45),
    0 0 24px rgba(45, 255, 110, 0.12);
  animation: bw-toast-slide 0.45s ease both;
}

.bw-win-toast-icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fbbf24;
  font-size: 18px;
  background: radial-gradient(circle at 35% 30%, #2a334f, #12182e);
  border: 2px solid #f5c542;
  box-shadow: 0 0 12px rgba(245, 197, 66, 0.35);
}

.bw-win-toast-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.bw-win-toast-text strong {
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  line-height: 1.15;
}

.bw-win-toast-text span {
  font-size: 12px;
  color: #9aa6c3;
  font-weight: 600;
}

.bw-win-toast-amount {
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 900;
  color: #2dffd0;
  text-shadow: 0 0 12px rgba(45, 255, 208, 0.35);
  white-space: nowrap;
}

.bw-toast-enter {
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.bw-toast-enter-start {
  opacity: 0;
  transform: translateX(-16px);
}
.bw-toast-enter-end {
  opacity: 1;
  transform: translateX(0);
}

@keyframes bw-toast-slide {
  from {
    opacity: 0;
    transform: translateX(-18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.bw-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(4px);
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
}

@media (min-width: 640px) {
  .bw-modal-backdrop { align-items: center; }
}

.bw-modal {
  width: min(440px, 100%);
  max-height: min(90vh, 760px);
  overflow: auto;
  background: #111827;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  position: relative;
}

.bw-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 8px;
}

.bw-modal-header h3 {
  margin: 0;
  font-size: 22px;
}

.bw-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: var(--bw-red);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.bw-modal-body { padding: 8px 18px 20px; }

.bw-green-panel {
  background: linear-gradient(180deg, #22c55e, #16a34a);
  border-radius: 16px;
  padding: 16px;
  color: #fff;
}

.bw-green-panel .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.bw-green-panel .big {
  font-size: 28px;
  font-weight: 900;
  margin: 4px 0;
}

.bw-copy-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.bw-copy-row input {
  width: 100%;
  background: #0b1224;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  color: #fff;
  padding: 12px;
}

.bw-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0;
}

.bw-stat {
  background: #0b1224;
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
}

.bw-accordion {
  background: #0b1224;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
}

.bw-accordion summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bw-accordion p {
  color: var(--bw-muted);
  font-size: 13px;
  margin: 10px 0 0;
}

.bw-btn-danger {
  width: 100%;
  background: #dc2626;
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 14px;
  font-weight: 900;
  cursor: pointer;
  margin-top: 8px;
}

.bw-alert {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fecaca;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 14px;
}

.bw-auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.bw-auth-card {
  width: min(420px, 100%);
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}

.bw-auth-card h1 {
  margin: 0 0 6px;
  font-size: 26px;
}

.bw-auth-card p {
  margin: 0 0 18px;
  color: var(--bw-muted);
  font-size: 14px;
}

.bw-field { margin-bottom: 14px; }
.bw-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: #c7d2fe;
  font-weight: 600;
}
.bw-field input {
  width: 100%;
  background: #0b1224;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  color: #fff;
  padding: 12px 14px;
}
.bw-field .error {
  color: #fca5a5;
  font-size: 12px;
  margin-top: 6px;
}

.bw-auth-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.bw-game-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 12px 24px;
  background:
    radial-gradient(circle at 50% 30%, #2f6bff 0%, #1d4ed8 28%, #0b1f66 70%, #06123a 100%);
}

.bw-demo-mode {
  margin-bottom: 6px;
  padding: 4px 14px;
  border: 1px solid rgba(45, 255, 110, 0.52);
  border-radius: 999px;
  color: #2dff6e;
  background: rgba(8, 38, 33, 0.72);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
}

.bw-game-hud {
  width: min(420px, 100%);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 8px;
  margin-bottom: 14px;
}

.bw-game-hud .side {
  color: var(--bw-yellow);
  font-weight: 900;
  font-size: 18px;
  text-shadow: 0 2px 0 rgba(0,0,0,0.35);
}

.bw-game-hud .side.left { text-align: left; }
.bw-game-hud .side.right { text-align: right; }

.bw-game-hud .center {
  text-align: center;
}

.bw-game-hud .center .money {
  color: var(--bw-green);
  font-size: clamp(34px, 9vw, 48px);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 3px 0 rgba(0,0,0,0.35);
}

.bw-game-hud .center .line {
  width: 70px;
  height: 3px;
  background: rgba(255,255,255,0.35);
  margin: 8px auto 0;
  border-radius: 999px;
}

#board {
  --cell: min(46px, calc((100vw - 56px) / 8));
  display: grid;
  grid-template-columns: repeat(8, var(--cell));
  grid-template-rows: repeat(8, var(--cell));
  gap: 2px;
  background: #0b1a4a;
  padding: 8px;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}

.cell {
  width: var(--cell);
  height: var(--cell);
  background: rgba(255,255,255,0.04);
  border-radius: 5px;
}

.cell.filled {
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.35),
    inset 0 -3px 0 rgba(0,0,0,0.28);
}

.cell.preview-valid { background: rgba(255,255,255,0.35) !important; }
.cell.preview-invalid { background: rgba(239,71,111,0.45) !important; }

#tray {
  width: min(420px, 100%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.slot {
  min-height: 110px;
  background: rgba(8, 20, 60, 0.65);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.08);
}

.piece { position: relative; touch-action: none; cursor: grab; }
.piece-cell {
  position: absolute;
  border-radius: 5px;
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.35),
    inset 0 -3px 0 rgba(0,0,0,0.28);
}
.ghost { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 999; opacity: 0.92; }

#overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
#overlay.hidden { display: none; }

.panel {
  width: min(360px, 100%);
  background: #12182e;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  padding: 28px 24px;
  text-align: center;
}
.panel h2 { margin: 0 0 8px; color: var(--bw-yellow); }
.panel p { color: #d5dcf5; }
.panel .actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.bw-demo-win {
  border-color: rgba(100, 150, 255, 0.3);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5), 0 0 28px rgba(45, 255, 110, 0.12);
}

.bw-demo-trophy {
  width: 60px;
  height: 60px;
  margin: -4px auto 12px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 225, 74, 0.7);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 225, 74, 0.24), rgba(255, 225, 74, 0.03));
  box-shadow: 0 0 18px rgba(255, 225, 74, 0.28);
  font-size: 28px;
}

.panel .bw-demo-caption { margin: 0; font-size: 13px; font-weight: 700; }
.panel .bw-demo-amount {
  margin: 6px 0 10px;
  color: #ffc400;
  font-size: 31px;
  font-weight: 900;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.38);
}
.panel .bw-demo-copy { margin: 0; color: #b7c2df; font-size: 12px; line-height: 1.35; }
.bw-demo-actions { display: grid !important; grid-template-columns: 1.6fr 0.8fr; }
.bw-demo-actions .bw-btn { min-height: 48px; padding: 9px; font-size: 12px; }

.bw-sound {
  position: fixed;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,0.12);
  color: #fff;
  cursor: pointer;
  z-index: 30;
}

.bw-landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  max-width: 980px;
  margin: 0 auto;
}

.bw-landing-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.bw-landing-main {
  width: min(460px, calc(100% - 28px));
  margin: 20px auto 40px;
  text-align: center;
}

.bw-tier-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.bw-tier {
  background: #0b1224;
  border-radius: 12px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.08);
}

.bw-tier small {
  color: #67e8f9;
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* Modal Indicar */
.bw-referral-modal {
  display: flex;
  flex-direction: column;
  width: min(405px, 100%);
  max-height: calc(100dvh - 24px);
  overflow: hidden;
  border: 1px solid rgba(52, 98, 183, 0.34);
  border-radius: 18px;
  background: #101522;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.74), 0 0 36px rgba(21, 111, 255, 0.09);
}

.bw-referral-hero {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  min-height: 110px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 47px 10px 24px;
  overflow: hidden;
  background: #071b50;
  border-bottom: 1px solid rgba(76, 139, 255, 0.24);
}

.bw-referral-hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.bw-referral-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  padding: 0;
  border: 1px solid rgba(255, 116, 126, 0.32);
  border-radius: 50%;
  background: #9e2934;
  color: #fff;
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.bw-referral-close:hover {
  filter: brightness(1.13);
  transform: rotate(7deg);
}

.bw-referral-hero-flow {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
}

.bw-referral-friend-card {
  display: flex;
  width: 76px;
  min-height: 58px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 1px solid rgba(66, 221, 255, 0.48);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(2, 25, 77, 0.9), rgba(17, 35, 98, 0.86));
  color: #67e8f9;
  box-shadow: inset 0 0 15px rgba(63, 205, 255, 0.1), 0 7px 16px rgba(0, 0, 0, 0.28);
}

.bw-referral-friend-card svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.bw-referral-friend-card span {
  color: #bff5ff;
  font-size: 6px;
  font-weight: 800;
  line-height: 1.08;
  text-align: center;
}

.bw-referral-friend-card b {
  color: #fff;
  font-size: 8px;
}

.bw-referral-flow-arrow {
  color: #ffe658;
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 0 10px rgba(255, 214, 44, 0.45);
}

.bw-referral-win-badge {
  display: flex;
  width: 72px;
  min-height: 64px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 224, 78, 0.55);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 24%, #fff17a, #ffb617 52%, #df7b00 100%);
  color: #5f3000;
  box-shadow: inset 0 2px rgba(255, 255, 255, 0.6), 0 0 18px rgba(255, 183, 17, 0.25);
  transform: rotate(3deg);
}

.bw-referral-win-badge small,
.bw-referral-win-badge span {
  font-size: 5px;
  font-weight: 950;
  line-height: 1;
}

.bw-referral-win-badge strong {
  font-size: 19px;
  font-weight: 1000;
  line-height: 1;
}

.bw-referral-hero-copy {
  position: relative;
  z-index: 2;
  order: 1;
  min-width: 0;
}

.bw-referral-hero-copy h2 {
  margin: 0;
  color: #fff;
  font-size: 17px;
  font-weight: 950;
  font-style: italic;
  line-height: 1.01;
  text-shadow: 0 3px 13px rgba(0, 0, 0, 0.42);
}

.bw-referral-hero-copy h2 > span {
  color: #fff;
  font-size: 21px;
  text-shadow: 0 0 14px rgba(103, 232, 249, 0.4);
}

.bw-referral-hero-copy h2 strong {
  color: #ffd43b;
  font-size: 20px;
  text-shadow: 0 0 17px rgba(255, 188, 22, 0.25);
}

.bw-referral-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(82, 126, 216, 0.54) transparent;
}

.bw-referral-body::-webkit-scrollbar {
  width: 5px;
}

.bw-referral-body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(82, 126, 216, 0.54);
}

.bw-referral-balance {
  position: relative;
  padding: 13px 13px 10px;
  overflow: hidden;
  border: 1px solid rgba(77, 255, 157, 0.28);
  border-radius: 13px;
  background:
    radial-gradient(circle at 11% 0, rgba(58, 255, 143, 0.21), transparent 48%),
    linear-gradient(125deg, #13a858, #0cbb6c);
  color: #fff;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.13), 0 10px 25px rgba(8, 163, 89, 0.18);
}

.bw-referral-balance::after {
  position: absolute;
  right: -25px;
  bottom: -40px;
  width: 120px;
  height: 120px;
  border: 20px solid rgba(255, 255, 255, 0.04);
  border-radius: 50%;
  content: "";
}

.bw-referral-balance-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(90px, 0.55fr);
  gap: 12px;
}

.bw-referral-balance-grid > div:last-child {
  text-align: right;
}

.bw-referral-balance-grid span {
  display: block;
  color: rgba(255, 255, 255, 0.84);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.65px;
}

.bw-referral-balance-grid strong {
  display: block;
  margin-top: 2px;
  font-size: 24px;
  font-weight: 950;
  line-height: 1.1;
}

.bw-referral-balance-grid small {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 9px;
}

.bw-referral-balance form {
  position: relative;
  z-index: 1;
  margin-top: 11px;
}

.bw-referral-balance form button {
  display: flex;
  width: 100%;
  min-height: 39px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.23);
  color: #fff;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.3px;
  cursor: pointer;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
  transition: background 0.18s ease, transform 0.18s ease;
}

.bw-referral-balance form button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.bw-referral-balance form button:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.31);
  transform: translateY(-1px);
}

.bw-referral-balance form button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.bw-referral-balance > p {
  position: relative;
  z-index: 1;
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 9px;
  text-align: center;
}

.bw-referral-link-card,
.bw-referral-history-card {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid rgba(99, 119, 163, 0.2);
  border-radius: 11px;
  background: linear-gradient(145deg, #1a1f2d, #161b27);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.023);
}

.bw-referral-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.bw-referral-section-title > span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #36e8ad;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.65px;
}

.bw-referral-section-title svg,
.bw-referral-copy button svg,
.bw-referral-level-count svg,
.bw-referral-empty svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.bw-referral-section-title small {
  color: #818da7;
  font-size: 9px;
}

.bw-referral-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}

.bw-referral-copy input {
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  min-height: 39px;
  padding: 0 10px;
  overflow: hidden;
  border: 1px solid rgba(54, 232, 173, 0.22);
  border-radius: 9px;
  background: #0b1221;
  color: #b6c2d8;
  font-size: 9px;
  outline: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bw-referral-copy button {
  display: flex;
  flex: 0 0 auto;
  min-width: 86px;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(78, 255, 160, 0.35);
  border-radius: 9px;
  background: linear-gradient(135deg, #16d978, #06b963);
  color: #042414;
  font-size: 9px;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(7, 190, 100, 0.16);
  transition: filter 0.18s ease, transform 0.18s ease;
}

.bw-referral-copy button:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

.bw-referral-copy button.is-copied {
  background: #eafef2;
  color: #08703e;
}

.bw-referral-levels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 8px;
}

.bw-referral-level {
  position: relative;
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgba(86, 110, 175, 0.24);
  border-radius: 11px;
  background:
    radial-gradient(circle at 50% 0, rgba(47, 213, 178, 0.08), transparent 58%),
    linear-gradient(145deg, #1a2030, #151a28);
  text-align: center;
}

.bw-referral-level.is-n3 {
  grid-column: 1 / -1;
}

.bw-referral-level-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.bw-referral-level-head strong {
  color: #2dffb0;
  font-size: 15px;
  font-weight: 950;
}

.bw-referral-level-head span {
  color: #d4dbea;
  font-size: 9px;
  font-weight: 800;
}

.bw-referral-level-head b {
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(45, 255, 176, 0.11);
  color: #49eeb9;
  font-size: 8px;
}

.bw-referral-level-count {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 7px;
  color: #8d99b1;
}

.bw-referral-level-count svg {
  width: 13px;
  height: 13px;
}

.bw-referral-level-count strong {
  color: #fff;
  font-size: 16px;
  line-height: 1;
}

.bw-referral-level-count small,
.bw-referral-level-volume small {
  color: #818ca4;
  font-size: 8px;
  letter-spacing: 0.3px;
}

.bw-referral-level-volume {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid rgba(122, 139, 177, 0.12);
}

.bw-referral-level-volume span {
  color: #dfe5f1;
  font-size: 11px;
  font-weight: 900;
}

.bw-referral-history {
  display: grid;
  gap: 6px;
}

.bw-referral-history-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(100, 119, 158, 0.14);
  border-radius: 9px;
  background: rgba(9, 14, 27, 0.56);
}

.bw-referral-history-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(45, 255, 176, 0.11);
  color: #38e5ad;
  font-size: 9px;
  font-weight: 950;
}

.bw-referral-history-item > div {
  min-width: 0;
}

.bw-referral-history-item > div strong,
.bw-referral-history-item > div small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bw-referral-history-item > div strong {
  color: #e7ebf4;
  font-size: 10px;
}

.bw-referral-history-item > div small {
  margin-top: 2px;
  color: #79869e;
  font-size: 8px;
}

.bw-referral-history-item > b {
  color: #2dff6e;
  font-size: 10px;
  white-space: nowrap;
}

.bw-referral-empty {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #74819b;
  text-align: center;
}

.bw-referral-empty svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: #39cc9c;
}

.bw-referral-empty strong,
.bw-referral-empty span {
  font-size: 9px;
}

.bw-referral-empty span {
  color: #626f88;
}

@media (max-width: 380px) {
  .bw-referral-modal {
    max-height: calc(100dvh - 12px);
  }

  .bw-referral-hero {
    min-height: 104px;
    gap: 5px;
    padding: 9px 41px 8px 17px;
  }

  .bw-referral-hero-copy h2 {
    font-size: 14px;
  }

  .bw-referral-hero-copy h2 > span {
    font-size: 18px;
  }

  .bw-referral-hero-copy h2 strong {
    font-size: 17px;
  }

  .bw-referral-friend-card {
    width: 61px;
    min-height: 53px;
  }

  .bw-referral-win-badge {
    width: 57px;
    min-height: 57px;
  }

  .bw-referral-win-badge strong {
    font-size: 16px;
  }

  .bw-referral-body {
    padding: 7px;
  }

  .bw-referral-balance-grid strong {
    font-size: 21px;
  }
}

/* Aba Indicar — medidas e aparência da referência Block Win */
.bw-referral-backdrop {
  align-items: flex-end !important;
  padding: 0;
  background: rgba(0, 4, 22, 0.76);
  backdrop-filter: blur(7px);
}

.bw-referral-modal {
  display: block;
  width: min(560px, 100%);
  max-height: 88dvh;
  padding: 8px 20px 24px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid #2a3158;
  border-bottom: 0;
  border-radius: 26px 26px 0 0;
  background: #10141f;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.72);
  color: #eef1ff;
  scrollbar-color: #aaa #f1f1f1;
  scrollbar-width: auto;
}

.bw-referral-hero {
  position: relative;
  display: block;
  min-height: 0;
  aspect-ratio: 3 / 1;
  margin: -8px -20px 18px;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: rgba(255, 255, 255, 0.03);
}

.bw-referral-hero-art {
  position: static;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bw-referral-handle {
  position: absolute;
  top: 8px;
  left: 50%;
  z-index: 3;
  width: 46px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  transform: translateX(-50%);
}

.bw-referral-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(180, 20, 20, 0.55);
  color: #fff;
  font-size: 17.6px;
  font-weight: 400;
  box-shadow: none;
}

.bw-referral-close:hover {
  background: rgba(205, 25, 25, 0.72);
  filter: none;
  transform: none;
}

.bw-referral-body {
  display: block;
  min-height: 0;
  padding: 0;
  overflow: visible;
}

.bw-referral-balance {
  margin: 0 0 14px;
  padding: 20px;
  overflow: visible;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, #0e9c62, #16b874);
  box-shadow: none;
}

.bw-referral-balance::after {
  display: none;
}

.bw-referral-balance-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(90px, auto);
  gap: 12px;
  margin-bottom: 14px;
}

.bw-referral-balance-grid span {
  color: #fff;
  font-size: 11.2px;
  font-weight: 800;
  letter-spacing: 0.896px;
}

.bw-referral-balance-grid strong {
  margin: 0;
  color: #fff;
  font-size: 25.6px;
  font-weight: 900;
  line-height: normal;
}

.bw-referral-balance-grid small {
  margin: 0;
  color: #fff;
  font-size: 12.48px;
}

.bw-referral-balance form {
  margin: 0;
}

.bw-referral-balance form button {
  display: inline-block;
  width: 100%;
  min-height: 44px;
  padding: 13px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 13.3333px;
  font-weight: 800;
  letter-spacing: normal;
  box-shadow: none;
}

.bw-referral-balance form button:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.28);
  transform: none;
}

.bw-referral-balance form button:disabled {
  opacity: 0.5;
}

.bw-referral-link-card,
.bw-referral-history-card {
  margin: 0 0 14px;
  padding: 16px;
  border: 1px solid #2a3158;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

.bw-referral-section-title {
  display: block;
  margin: 0 0 10px;
}

.bw-referral-section-title > span {
  display: block;
  color: #00e5a8;
  font-size: 11.52px;
  font-weight: 800;
  letter-spacing: 1.152px;
}

.bw-referral-history-card .bw-referral-section-title > span {
  color: #9aa3c7;
}

.bw-referral-copy {
  display: block;
}

.bw-referral-copy input {
  display: block;
  width: 100%;
  min-height: 46.25px;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 229, 168, 0.3);
  border-radius: 12px;
  background: rgba(0, 229, 168, 0.06);
  color: #eef1ff;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 20.25px;
  letter-spacing: 0.2px;
}

.bw-referral-copy button {
  display: inline-flex;
  min-width: 86px;
  min-height: 37px;
  padding: 9px 16px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #00e5a8, #00b887);
  color: #04261a;
  font-size: 13.6px;
  font-weight: 800;
  letter-spacing: 0.544px;
  box-shadow: 0 4px 14px rgba(0, 229, 168, 0.25);
}

.bw-referral-levels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 8px;
}

.bw-referral-level {
  grid-column: auto;
  min-height: 185px;
  padding: 16px;
  border: 1px solid #2a3158;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
  text-align: center;
}

.bw-referral-level:nth-child(3) {
  grid-column: 1 / -1;
}

.bw-referral-level-head {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.bw-referral-level-head strong {
  color: #00e5a8;
  font-size: 16.8px;
  font-weight: 900;
}

.bw-referral-level-head span {
  margin-bottom: 10px;
  color: #9aa3c7;
  font-size: 12px;
  font-weight: 400;
}

.bw-referral-level-head b {
  display: none;
}

.bw-referral-level-count {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  color: #eef1ff;
}

.bw-referral-level-count strong {
  color: #eef1ff;
  font-size: 25.6px;
  font-weight: 900;
  line-height: normal;
}

.bw-referral-level-count small,
.bw-referral-level-volume small {
  color: #9aa3c7;
  font-size: 11.2px;
  font-weight: 400;
  letter-spacing: 0.672px;
}

.bw-referral-level-count small {
  margin-bottom: 8px;
}

.bw-referral-level-volume {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.bw-referral-level-volume span {
  color: #eef1ff;
  font-size: 15.2px;
  font-weight: 800;
}

.bw-referral-history-card {
  margin-bottom: 0;
}

.bw-referral-history {
  display: grid;
  gap: 6px;
}

.bw-referral-empty {
  display: block;
  min-height: 52px;
  padding: 16px;
  border: 1px dashed #2a3158;
  border-radius: 12px;
  background: #11152a;
  color: #9aa3c7;
  font-size: 13px;
  text-align: center;
}

.bw-referral-empty span {
  color: inherit;
  font-size: inherit;
}

@media (max-width: 639px) {
  .bw-referral-modal {
    width: 100%;
    max-height: 92dvh;
    padding: 8px 14px 20px;
  }

  .bw-referral-hero {
    min-height: 0;
    margin: -8px -14px 14px;
    padding: 0;
  }

  .bw-referral-balance {
    padding: 16px;
  }

  .bw-referral-balance-grid strong {
    font-size: 22px;
  }

  .bw-referral-balance-grid small {
    font-size: 11px;
  }

  .bw-referral-link-card,
  .bw-referral-history-card,
  .bw-referral-level {
    padding: 14px;
  }

  .bw-referral-level {
    min-height: 168px;
  }
}

@media (max-width: 350px) {
  .bw-referral-modal {
    padding-right: 10px;
    padding-left: 10px;
  }

  .bw-referral-hero {
    margin-right: -10px;
    margin-left: -10px;
  }

  .bw-referral-levels {
    gap: 8px;
  }

  .bw-referral-level {
    min-height: 160px;
    padding: 11px 8px;
  }
}

.bw-profile-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.bw-profile-head .meta strong {
  display: block;
  font-size: 18px;
}

.bw-profile-head .meta span {
  color: var(--bw-muted);
  font-size: 13px;
}

/* Modal Perfil */
.bw-profile-modal {
  display: flex;
  flex-direction: column;
  width: min(430px, 100%);
  max-height: calc(100dvh - 24px);
  overflow: hidden;
  border: 1px solid rgba(88, 111, 166, 0.25);
  border-radius: 18px;
  background: #111522;
  box-shadow: 0 28px 85px rgba(0, 0, 0, 0.72), 0 0 32px rgba(68, 102, 255, 0.07);
}

.bw-profile-handle {
  flex: 0 0 auto;
  width: 42px;
  height: 4px;
  margin: 8px auto 1px;
  border-radius: 999px;
  background: #343d5f;
}

.bw-profile-titlebar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  padding: 5px 12px 7px 15px;
}

.bw-profile-titlebar h3 {
  margin: 0;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
}

.bw-profile-close {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  padding: 0;
  border: 1px solid rgba(255, 101, 112, 0.27);
  border-radius: 50%;
  background: #8f2630;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.3);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.bw-profile-close:hover {
  filter: brightness(1.14);
  transform: rotate(6deg);
}

.bw-profile-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 12px 14px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(92, 116, 180, 0.55) transparent;
}

.bw-profile-body::-webkit-scrollbar {
  width: 5px;
}

.bw-profile-body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(92, 116, 180, 0.55);
}

.bw-profile-user-card {
  padding: 12px;
  border: 1px solid rgba(103, 125, 176, 0.24);
  border-radius: 12px;
  background:
    radial-gradient(circle at 8% 0, rgba(50, 126, 255, 0.12), transparent 42%),
    linear-gradient(145deg, #1a1f2d, #171b27);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025), 0 8px 22px rgba(0, 0, 0, 0.17);
}

.bw-profile-user-row {
  display: flex;
  align-items: center;
  gap: 11px;
}

.bw-profile-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 43px;
  width: 43px;
  height: 43px;
  border: 1px solid rgba(110, 197, 255, 0.6);
  border-radius: 50%;
  background: linear-gradient(145deg, #5276ff, #24b4ef);
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  box-shadow: 0 0 0 4px rgba(54, 137, 255, 0.08), 0 5px 15px rgba(31, 111, 232, 0.22);
}

.bw-profile-identity {
  min-width: 0;
}

.bw-profile-identity strong {
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bw-profile-identity span {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  overflow: hidden;
  color: #aab4c9;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bw-profile-identity svg,
.bw-profile-referral > svg {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.bw-profile-referral {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  padding: 7px 7px 7px 9px;
  border: 1px solid rgba(104, 124, 167, 0.2);
  border-radius: 9px;
  background: rgba(8, 12, 23, 0.46);
  color: #7f8ca8;
}

.bw-profile-referral input {
  flex: 1;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: #7f8ca8;
  font-size: 9px;
  outline: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bw-profile-referral button {
  flex: 0 0 auto;
  min-width: 76px;
  min-height: 27px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: #e8ebf2;
  color: #111827;
  font-size: 9px;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.bw-profile-referral button:hover {
  transform: translateY(-1px);
}

.bw-profile-referral button.is-copied {
  border-color: rgba(45, 255, 110, 0.4);
  background: #2dff6e;
  color: #062614;
}

.bw-profile-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 8px 0;
}

.bw-profile-stat {
  position: relative;
  display: grid;
  min-height: 58px;
  padding: 9px 9px 8px 38px;
  overflow: hidden;
  border: 1px solid rgba(76, 102, 170, 0.22);
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(29, 37, 68, 0.94), rgba(21, 28, 51, 0.94));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
}

.bw-profile-stat::after {
  position: absolute;
  right: -18px;
  bottom: -24px;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: rgba(88, 116, 226, 0.08);
  content: "";
  filter: blur(3px);
}

.bw-profile-stat-icon,
.bw-profile-section-name > i {
  display: grid;
  place-items: center;
  color: #62a7ff;
}

.bw-profile-stat-icon {
  position: absolute;
  top: 50%;
  left: 10px;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: rgba(62, 119, 242, 0.12);
  transform: translateY(-50%);
}

.bw-profile-stat-icon.is-purple,
.bw-profile-section-name > i.is-purple {
  color: #b787ff;
  background: rgba(153, 91, 255, 0.12);
}

.bw-profile-stat-icon.is-green,
.bw-profile-section-name > i.is-green {
  color: #2dff6e;
  background: rgba(45, 255, 110, 0.1);
}

.bw-profile-stat-icon.is-yellow {
  color: #ffcc3d;
  background: rgba(255, 204, 61, 0.11);
}

.bw-profile-stat-icon svg,
.bw-profile-section-name svg,
.bw-profile-admin svg,
.bw-profile-logout svg,
.bw-profile-empty svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.bw-profile-stat strong {
  align-self: end;
  overflow: hidden;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bw-profile-stat small {
  align-self: start;
  margin-top: 3px;
  overflow: hidden;
  color: #9ba7bf;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bw-profile-section,
.bw-profile-link-row {
  margin: 0 0 7px;
  border: 1px solid rgba(103, 121, 163, 0.2);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(27, 32, 45, 0.97), rgba(22, 27, 39, 0.97));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.02);
}

.bw-profile-section summary,
.bw-profile-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  color: #fff;
  cursor: pointer;
  list-style: none;
}

.bw-profile-section summary::-webkit-details-marker {
  display: none;
}

.bw-profile-section-name {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: #d9deea;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.45px;
}

.bw-profile-section-name > i {
  flex: 0 0 23px;
  width: 23px;
  height: 23px;
  border-radius: 7px;
  background: rgba(65, 127, 251, 0.11);
  font-style: normal;
}

.bw-profile-section-action {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  color: #929db5;
  font-size: 9px;
  font-weight: 700;
}

.bw-profile-section-action b {
  color: #74819f;
  font-size: 13px;
  line-height: 1;
  transition: transform 0.18s ease;
}

.bw-profile-section[open] .bw-profile-section-action b {
  transform: rotate(180deg);
}

.bw-profile-history {
  display: grid;
  gap: 7px;
  padding: 0 8px 8px;
}

.bw-profile-history-item {
  padding: 9px 10px;
  border: 1px solid rgba(118, 137, 177, 0.14);
  border-radius: 9px;
  background: rgba(8, 13, 27, 0.64);
}

.bw-profile-history-top,
.bw-profile-history-meta,
.bw-profile-game-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.bw-profile-history-top {
  color: #f3f6fc;
  font-size: 11px;
}

.bw-profile-history-top > strong:first-child {
  display: flex;
  align-items: center;
  gap: 5px;
}

.bw-profile-history-top .is-deposit,
.bw-profile-history-top .is-win {
  color: #2dff6e;
}

.bw-profile-history-top .is-withdraw {
  color: #67e8f9;
}

.bw-profile-history-top .is-loss {
  color: #f87171;
}

.bw-profile-history-top .is-pending-game {
  color: #fbbf24;
}

.bw-profile-history-top i {
  font-style: normal;
  font-size: 13px;
}

.bw-profile-history-meta {
  margin-top: 7px;
}

.bw-profile-history-meta > span {
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
}

.bw-profile-history-meta > span.is-approved {
  background: rgba(34, 197, 94, 0.13);
  color: #4ade80;
}

.bw-profile-history-meta > span.is-rejected {
  background: rgba(239, 68, 68, 0.13);
  color: #f87171;
}

.bw-profile-history-meta > span.is-pending {
  background: rgba(251, 191, 36, 0.13);
  color: #fbbf24;
}

.bw-profile-history-meta small,
.bw-profile-game-meta,
.bw-profile-game-date {
  color: #8995ad;
  font-size: 9px;
}

.bw-profile-game-meta {
  margin-top: 7px;
}

.bw-profile-game-date {
  display: block;
  margin-top: 6px;
  text-align: right;
}

.bw-profile-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 35px;
  padding: 2px 4px 5px;
  color: #76839e;
}

.bw-profile-empty svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
}

.bw-profile-empty p {
  margin: 0;
  font-size: 10px;
}

.bw-profile-link-row {
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.bw-profile-link-row:hover {
  border-color: rgba(72, 139, 255, 0.36);
  background: #1b2130;
}

.bw-profile-admin,
.bw-profile-logout {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 9px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.35px;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.18s ease, transform 0.18s ease;
}

.bw-profile-admin {
  margin-bottom: 7px;
  border: 1px solid rgba(153, 106, 255, 0.45);
  background: linear-gradient(100deg, #6d45ef, #8a4ff2);
  box-shadow: 0 8px 20px rgba(109, 69, 239, 0.17);
}

.bw-profile-logout {
  border: 1px solid rgba(255, 113, 132, 0.48);
  background: linear-gradient(100deg, #ff556e, #e83561);
  box-shadow: 0 8px 22px rgba(232, 53, 97, 0.2);
}

.bw-profile-admin:hover,
.bw-profile-logout:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

.bw-profile-admin svg,
.bw-profile-logout svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 380px) {
  .bw-profile-modal {
    max-height: calc(100dvh - 12px);
  }

  .bw-profile-body {
    padding: 0 8px 10px;
  }

  .bw-profile-user-card {
    padding: 10px;
  }

  .bw-profile-stat {
    padding-left: 34px;
  }

  .bw-profile-stat-icon {
    left: 8px;
  }
}

/* Modal Depositar */
.bw-deposit-modal {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 24px);
  padding: 0;
  overflow: hidden;
  background: #0f1528;
}

.bw-deposit-banner {
  position: relative;
  flex: 0 0 auto;
  background: #0b1224;
}

.bw-deposit-banner img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 180px;
  object-fit: contain;
  background: #0b1224;
}

.bw-deposit-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.bw-deposit-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px 16px 20px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(103, 232, 249, 0.45) transparent;
}

.bw-deposit-body::-webkit-scrollbar {
  width: 5px;
}

.bw-deposit-body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(103, 232, 249, 0.45);
}

.bw-deposit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.bw-deposit-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 18px 8px 12px;
  border-radius: 14px;
  border: 1px solid rgba(95, 107, 137, 0.48);
  border-color: color-mix(in srgb, var(--option-color, #5f6b89) 48%, transparent);
  background: #161d36;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.015), 0 0 12px rgba(95, 107, 137, 0.12);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.015), 0 0 15px color-mix(in srgb, var(--option-color, #5f6b89) 12%, transparent);
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.bw-deposit-option strong {
  font-size: 18px;
  font-weight: 900;
}

.bw-deposit-option.active {
  background:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--option-color, #67e8f9) 18%, transparent), transparent 72%),
    #1b2238;
  border-color: var(--option-color, #67e8f9);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--option-color, #67e8f9) 30%, transparent),
    0 0 24px color-mix(in srgb, var(--option-color, #67e8f9) 42%, transparent),
    inset 0 0 22px color-mix(in srgb, var(--option-color, #67e8f9) 10%, transparent);
  transform: translateY(-1px);
}

.bw-deposit-option.is-bonus {
  border-color: color-mix(in srgb, var(--option-color, #fbbf24) 68%, #fbbf24);
}

.bw-deposit-option.is-bonus.active {
  border-color: var(--option-color, #fbbf24);
}

.bw-deposit-badge {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.3px;
  white-space: nowrap;
  color: #fff;
  background: var(--option-color, #7c3aed);
  box-shadow: 0 3px 10px color-mix(in srgb, var(--option-color, #7c3aed) 35%, transparent);
}

.bw-deposit-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bw-deposit-amount {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0b1224;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 0 14px;
}

.bw-deposit-amount .prefix {
  color: #9aa6c3;
  font-weight: 800;
}

.bw-deposit-amount input {
  flex: 1;
  border: 0;
  background: transparent;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  padding: 14px 0;
  outline: none;
  width: 100%;
}

.bw-deposit-amount input::-webkit-outer-spin-button,
.bw-deposit-amount input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.bw-deposit-amount input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.bw-deposit-cpf label {
  display: block;
  margin-bottom: 6px;
  color: #9aa6c3;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.bw-deposit-cpf input {
  width: 100%;
  background: #0b1224;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  color: #fff;
  font-weight: 700;
  padding: 14px;
  outline: none;
}

.bw-deposit-cpf input:focus,
.bw-deposit-amount:focus-within {
  border-color: rgba(45, 255, 110, 0.45);
}

.bw-deposit-bonus {
  padding: 16px 17px;
  border: 1px solid rgba(0, 232, 111, 0.38);
  border-radius: 16px;
  background: rgba(5, 64, 49, 0.27);
  box-shadow: inset 0 0 28px rgba(0, 232, 111, 0.035);
}

.bw-deposit-bonus-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #00ea71;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.7px;
}

.bw-deposit-bonus-control {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d8dce8;
  white-space: nowrap;
}

.bw-bonus-switch {
  position: relative;
  width: 45px;
  height: 26px;
  padding: 0;
  border: 1px solid rgba(118, 134, 169, 0.26);
  border-radius: 999px;
  background: #243048;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.bw-bonus-switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #aab2c0;
  transition: transform 0.18s ease, background 0.18s ease;
}

.bw-bonus-switch.active {
  border-color: #15ce68;
  background: #079f4f;
  box-shadow: 0 0 16px rgba(0, 231, 108, 0.22);
}

.bw-bonus-switch.active i {
  background: #fff;
  transform: translateX(19px);
}

.bw-deposit-bonus-value {
  display: block;
  width: fit-content;
  min-width: 205px;
  margin-top: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  color: #fff;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.1;
}

.bw-deposit-bonus-total {
  margin-top: 10px;
  color: #d5d9e5;
  font-size: 13px;
}

.bw-deposit-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid rgba(103, 232, 249, 0.38);
  border-radius: 14px;
  background: rgba(15, 75, 112, 0.22);
  color: #fff;
}

.bw-deposit-loading div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.bw-deposit-loading strong {
  font-size: 13px;
}

.bw-deposit-loading span {
  color: #a8b5ce;
  font-size: 11px;
}

.bw-deposit-spinner {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: #2dff6e;
  border-radius: 50%;
  animation: bw-deposit-spin .7s linear infinite;
}

@keyframes bw-deposit-spin {
  to { transform: rotate(360deg); }
}

.bw-deposit-submit {
  margin-top: 4px;
}

.bw-deposit-submit.is-disabled,
.bw-deposit-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
  transform: none;
}

/* Modal Sacar */
.bw-withdraw-modal {
  display: flex;
  flex-direction: column;
  width: min(440px, 100%);
  max-height: calc(100dvh - 24px);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(44, 90, 177, 0.32);
  border-radius: 18px;
  background: #0f1528;
  box-shadow: 0 28px 75px rgba(0, 0, 0, 0.68), 0 0 28px rgba(30, 116, 255, 0.08);
}

.bw-withdraw-banner {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  background: #071038;
}

.bw-withdraw-banner img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 1;
  object-fit: cover;
}

.bw-withdraw-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #e83d4f;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.38);
}

.bw-withdraw-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 17px 17px 20px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(69, 132, 242, 0.55) transparent;
  background: #0f1528;
}

.bw-withdraw-body::-webkit-scrollbar {
  width: 5px;
}

.bw-withdraw-body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(69, 132, 242, 0.55);
}

.bw-withdraw-heading {
  margin-bottom: 13px;
  text-align: center;
}

.bw-withdraw-heading span {
  display: block;
  color: #2dff6e;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.25px;
}

.bw-withdraw-heading strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
}

.bw-withdraw-balance {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 14px;
  padding: 15px 14px;
  border: 1px solid rgba(34, 211, 104, 0.42);
  border-radius: 15px;
  background:
    radial-gradient(circle at 50% 0, rgba(30, 226, 105, 0.13), transparent 68%),
    rgba(5, 55, 44, 0.28);
  box-shadow: inset 0 0 25px rgba(0, 232, 111, 0.035);
  text-align: center;
}

.bw-withdraw-balance > span {
  color: #91a0bd;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
}

.bw-withdraw-balance > strong {
  margin-top: 3px;
  color: #2dff6e;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.12;
  text-shadow: 0 0 18px rgba(45, 255, 110, 0.16);
}

.bw-withdraw-balance small {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 7px;
  color: #aeb9ce;
  font-size: 11px;
}

.bw-withdraw-balance small i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #54617c;
}

.bw-withdraw-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  padding: 11px 12px;
  border: 1px solid rgba(251, 191, 36, 0.31);
  border-radius: 13px;
  background: rgba(120, 53, 15, 0.14);
  color: #fde68a;
}

.bw-withdraw-warning > span {
  display: grid;
  place-items: center;
  flex: 0 0 21px;
  width: 21px;
  height: 21px;
  border: 1px solid rgba(251, 191, 36, 0.48);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
}

.bw-withdraw-warning p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.bw-withdraw-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bw-withdraw-field {
  margin: 0;
}

.bw-withdraw-field label {
  display: block;
  margin: 0 0 6px;
  color: #aeb8cc;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.85px;
}

.bw-withdraw-field input,
.bw-withdraw-field select,
.bw-withdraw-amount {
  width: 100%;
  min-height: 49px;
  border: 1px solid rgba(118, 137, 177, 0.24);
  border-radius: 13px;
  background: #0a1021;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.bw-withdraw-field > input,
.bw-withdraw-field select {
  padding: 0 14px;
}

.bw-withdraw-field select {
  appearance: auto;
  color-scheme: dark;
}

.bw-withdraw-amount {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
}

.bw-withdraw-amount > span {
  color: #8f9bb4;
  font-size: 13px;
  font-weight: 900;
}

.bw-withdraw-amount input {
  flex: 1;
  min-width: 0;
  min-height: 47px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.bw-withdraw-amount input::-webkit-outer-spin-button,
.bw-withdraw-amount input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.bw-withdraw-amount input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.bw-withdraw-field input::placeholder {
  color: #5f6b84;
}

.bw-withdraw-field > input:focus,
.bw-withdraw-field select:focus,
.bw-withdraw-amount:focus-within {
  border-color: rgba(45, 255, 110, 0.55);
  box-shadow: 0 0 0 3px rgba(45, 255, 110, 0.07);
}

.bw-withdraw-field input:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.bw-withdraw-error {
  display: block;
  margin-top: 6px;
  color: #fca5a5;
  font-size: 11px;
}

.bw-withdraw-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 13px;
  border: 1px solid rgba(103, 232, 249, 0.3);
  border-radius: 12px;
  background: rgba(15, 75, 112, 0.18);
  color: #dbeafe;
  font-size: 12px;
  font-weight: 800;
}

.bw-withdraw-loading i {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.17);
  border-top-color: #2dff6e;
  border-radius: 50%;
  animation: bw-deposit-spin .7s linear infinite;
}

.bw-withdraw-submit {
  min-height: 50px;
  margin-top: 2px;
  border-radius: 14px;
  letter-spacing: 0.35px;
}

.bw-withdraw-submit:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  filter: none;
  transform: none;
}

@media (max-width: 380px) {
  .bw-withdraw-body {
    padding: 14px 14px 17px;
  }

  .bw-withdraw-heading {
    margin-bottom: 11px;
  }

  .bw-withdraw-balance {
    padding: 12px;
  }

  .bw-withdraw-balance > strong {
    font-size: 27px;
  }
}

/* Etapa 1: lobby inspirado na referência, sem alterar regras financeiras */
body.bw-lobby-page.bw-page {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(5, 25, 72, 0.18), rgba(3, 15, 48, 0.38)),
    repeating-linear-gradient(0deg, transparent 0 89px, rgba(78, 137, 231, 0.15) 89px 90px),
    repeating-linear-gradient(90deg, transparent 0 89px, rgba(78, 137, 231, 0.15) 89px 90px),
    radial-gradient(circle at 50% 16%, #0d347f 0%, #092767 42%, #061b4c 100%);
  background-attachment: fixed;
}

.bw-lobby-page .bw-app-banner {
  min-height: 64px;
  padding: 8px 12px;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(20, 26, 53, 0.98);
  color: #fff;
  box-shadow: 0 7px 22px rgba(0, 8, 31, 0.18);
  font-size: 13px;
  font-weight: 800;
}

.bw-lobby-page .bw-app-banner > div {
  display: contents !important;
}

.bw-lobby-page .bw-app-banner > span {
  order: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.2;
}

.bw-lobby-page .bw-app-banner > span::before {
  content: "";
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 10px;
  background: #0b1b4d url('../front/logoblock.png') center / contain no-repeat;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.bw-lobby-page .bw-app-banner .install {
  order: 2;
  margin-left: auto;
  min-height: 38px;
  padding: 8px 17px;
  border: 1px solid rgba(133, 181, 255, 0.34);
  border-radius: 12px;
  background: linear-gradient(180deg, #438cf6, #266bd8);
  box-shadow: 0 5px 15px rgba(30, 105, 226, 0.28);
}

.bw-lobby-page .bw-app-banner .install::before {
  content: "↓";
  margin-right: 7px;
  font-size: 16px;
}

.bw-lobby-page .bw-app-banner > div > button:last-child {
  order: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  padding: 0 !important;
  border-radius: 50%;
  background: #9b1c2c !important;
  color: #fff !important;
  font-size: 18px !important;
}

.bw-lobby-page .bw-topbar {
  width: 100%;
  max-width: none;
  min-height: 88px;
  margin: 0;
  padding: 10px 20px;
}

.bw-lobby-page .bw-logo {
  display: inline-flex;
}

.bw-lobby-page .bw-lobby-logo-image {
  display: block;
  width: 68px;
  height: 68px;
  object-fit: contain;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.3));
}

.bw-lobby-page .bw-saldo-box {
  gap: 9px;
}

.bw-lobby-page .bw-saldo-box .label {
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 1px;
}

.bw-lobby-page .bw-saldo-box .value {
  color: #3ddc6b;
  font-size: 17px;
}

.bw-lobby-page .bw-avatar {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: linear-gradient(135deg, #2d91f2, #486ee9);
  box-shadow: 0 6px 16px rgba(12, 63, 151, 0.3);
}

.bw-lobby-page .bw-container {
  width: min(540px, calc(100% - 24px));
  padding: 16px 0 118px;
}

.bw-lobby-page .bw-glow-frame {
  border-radius: 22px;
  box-shadow:
    0 0 0 1px rgba(255, 104, 56, 0.18),
    0 0 18px rgba(255, 79, 52, 0.28),
    0 20px 44px rgba(0, 0, 0, 0.38);
}

.bw-lobby-page .bw-glow-frame::before {
  inset: -75%;
  background: conic-gradient(
    from 0deg,
    #ff563d,
    #ffb12b,
    #7448ff,
    #ff563d
  );
  animation-duration: 8s;
}

.bw-lobby-page .bw-card {
  border-radius: 20px;
  background: linear-gradient(180deg, #172143, #111a38 62%, #0d142c);
}

.bw-lobby-page .bw-card-banner-img {
  min-height: 0;
  aspect-ratio: 2173 / 724;
  padding: 0;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bw-lobby-page .bw-badge-online {
  padding: 6px 11px;
  border: 1px solid rgba(255, 94, 67, 0.58);
  background: rgba(35, 11, 19, 0.84);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.bw-lobby-page .bw-card-body {
  padding: 22px;
}

.bw-lobby-page .bw-section-label {
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 1.25px;
}

.bw-lobby-page .bw-entry-grid {
  gap: 10px;
}

.bw-lobby-page .bw-entry-btn {
  min-height: 52px;
  border-color: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: #1c294f;
  font-size: 16px;
}

.bw-lobby-page .bw-entry-btn.active {
  border-color: #d8e7ff;
  background: linear-gradient(135deg, #d8e8ff, #a9c8f4);
  color: #11182b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.bw-lobby-page .bw-entry-input {
  min-height: 54px;
  margin-top: 12px;
  border-color: rgba(255, 255, 255, 0.12);
  background: #0d142b;
  font-size: 17px;
}

.bw-lobby-page .bw-reward {
  margin-top: 18px;
  padding: 16px 12px;
  border: 1px solid rgba(37, 181, 238, 0.56);
  border-radius: 15px;
  background: linear-gradient(180deg, #153b73, #102f60);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.bw-lobby-page .bw-reward small {
  margin-bottom: 3px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.bw-lobby-page .bw-reward strong {
  color: #ffe400;
  font-size: 31px;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
}

.bw-lobby-page .bw-btn-green {
  min-height: 58px;
  border-radius: 16px;
  background: linear-gradient(180deg, #13ef7e, #05d962);
  color: #052517;
  box-shadow: 0 9px 25px rgba(0, 230, 105, 0.28);
}

.bw-lobby-page .bw-bottom-nav {
  width: 100%;
  grid-template-columns: repeat(5, minmax(72px, 100px));
  justify-content: center;
  border-top-color: rgba(255, 255, 255, 0.07);
  background: rgba(5, 8, 20, 0.98);
  box-shadow: 0 -8px 24px rgba(0, 5, 20, 0.28);
}

.bw-lobby-page .bw-nav-item {
  color: #8d96b5;
}

.bw-lobby-page .bw-nav-item.play,
.bw-lobby-page .bw-nav-item.play.active {
  color: #23e985;
}

@media (max-width: 600px) {
  .bw-lobby-page .bw-app-banner {
    min-height: 56px;
    padding: 7px 8px;
    gap: 7px;
    font-size: 11px;
  }

  .bw-lobby-page .bw-app-banner > span {
    gap: 7px;
  }

  .bw-lobby-page .bw-app-banner > span::before {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    border-radius: 8px;
  }

  .bw-lobby-page .bw-app-banner .install {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 11px;
  }

  .bw-lobby-page .bw-app-banner > div > button:last-child {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .bw-lobby-page .bw-topbar {
    min-height: 70px;
    padding: 6px 12px;
  }

  .bw-lobby-page .bw-lobby-logo-image {
    width: 56px;
    height: 56px;
  }

  .bw-lobby-page .bw-saldo-box .value {
    font-size: 15px;
  }

  .bw-lobby-page .bw-avatar {
    width: 38px;
    height: 38px;
  }

  .bw-lobby-page .bw-container {
    width: calc(100% - 16px);
    padding-top: 8px;
    padding-bottom: 108px;
  }

  .bw-lobby-page .bw-card-body {
    padding: 15px;
  }

  .bw-lobby-page .bw-entry-grid {
    gap: 8px;
  }

  .bw-lobby-page .bw-entry-btn {
    min-height: 45px;
    font-size: 14px;
  }

  .bw-lobby-page .bw-entry-input {
    min-height: 48px;
  }

  .bw-lobby-page .bw-reward {
    margin-top: 14px;
    padding: 13px 10px;
  }

  .bw-lobby-page .bw-reward strong {
    font-size: 28px;
  }

  .bw-lobby-page .bw-btn-green {
    min-height: 52px;
  }

  .bw-lobby-page .bw-bottom-nav {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 370px) {
  .bw-lobby-page .bw-app-banner > span {
    max-width: 145px;
  }

  .bw-lobby-page .bw-app-banner .install::before {
    display: none;
  }
}

/* Etapa 2: modal da campanha de dobradinha — referência original */
.bw-double-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 4px;
  overflow-y: auto;
  background: rgba(1, 4, 17, 0.92);
  backdrop-filter: blur(7px);
}

.bw-double-modal {
  position: relative;
  width: min(405px, 100%);
  max-height: calc(100dvh - 8px);
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(28, 46, 88, 0.5);
  border-radius: 18px;
  background: #12162a;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.72), 0 0 24px rgba(0, 230, 106, 0.08);
  scrollbar-width: none;
}

.bw-double-modal::-webkit-scrollbar {
  display: none;
}

.bw-double-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(1, 5, 14, 0.94);
  color: #fff;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}

.bw-double-hero {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  height: 392px;
  overflow: hidden;
  background: #0b0e18;
}

.bw-double-hero img {
  display: block;
  width: 298px;
  max-width: calc(100% - 48px);
  height: auto;
}

.bw-double-body {
  padding: 19px 20px 15px;
  text-align: center;
  background: #12162a;
}

.bw-double-body h2 {
  margin: 0 0 9px;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.35px;
}

.bw-double-body p {
  margin: 0 auto;
  max-width: 350px;
  color: #c2c6d5;
  font-size: 13px;
  line-height: 1.5;
}

.bw-double-action {
  width: 100%;
  min-height: 46px;
  margin-top: 20px;
  border: 1px solid rgba(112, 255, 168, 0.65);
  border-radius: 24px;
  background: #00e96b;
  color: #031d11;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0, 231, 108, 0.3);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.bw-double-action:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

@media (max-width: 345px) {
  .bw-double-hero {
    height: 372px;
  }
}

/* Modal de instalação — mesmo conteúdo no Android e no iPhone */
.bw-install-backdrop {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(1, 4, 12, 0.76);
  backdrop-filter: blur(5px);
}

.bw-install-modal {
  position: relative;
  width: min(505px, calc(100vw - 4px));
  max-height: calc(100dvh - 8px);
  padding: 27px 19px calc(22px + env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid #493274;
  border-bottom-color: rgba(255, 255, 255, 0.32);
  border-radius: 25px 25px 0 0;
  background: #0d121e;
  color: #f3f4ff;
  box-shadow: 0 -16px 55px rgba(0, 0, 0, 0.5);
}

.bw-install-handle {
  position: absolute;
  top: 4px;
  left: 50%;
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: #513a89;
  transform: translateX(-50%);
}

.bw-install-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
}

.bw-install-header h2 {
  margin: 0;
  color: #f7f7ff;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.1px;
}

.bw-install-close {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #8e191f;
  color: #fff;
  cursor: pointer;
}

.bw-install-close svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
}

.bw-install-intro {
  margin-top: 16px;
  text-align: center;
}

.bw-install-phone {
  display: grid;
  width: 50px;
  height: 50px;
  margin: 0 auto;
  place-items: center;
  border-radius: 15px;
  background: #1c2450;
  color: #9aa8ff;
}

.bw-install-phone svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.bw-install-intro h3 {
  margin: 13px 0 3px;
  color: #f5f4ff;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.15px;
}

.bw-install-intro p {
  margin: 0;
  color: #b5bad0;
  font-size: 12.5px;
  line-height: 1.45;
}

.bw-install-steps {
  display: grid;
  gap: 10px;
  margin-top: 17px;
}

.bw-install-step {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  min-height: 68px;
  padding: 11px 12px;
  border: 1px solid #493274;
  border-radius: 12px;
  background: #171c28;
}

.bw-install-step-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 11px;
  color: #fff;
}

.bw-install-step-icon.is-blue {
  background: #3b82f6;
}

.bw-install-step-icon.is-green {
  background: #20c966;
}

.bw-install-step-icon.is-orange {
  background: #ff9f0a;
}

.bw-install-step-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bw-install-step strong {
  display: block;
  margin-bottom: 2px;
  color: #f7f6ff;
  font-size: 14px;
  font-weight: 900;
}

.bw-install-step p {
  margin: 0;
  color: #b9bed0;
  font-size: 12px;
  line-height: 1.5;
}

.bw-install-step p b {
  color: #00f2bd;
  font-weight: 800;
}

.bw-install-note {
  margin: 17px 0 0;
  color: #b9bed0;
  font-size: 11.5px;
  line-height: 1.4;
  text-align: center;
}

@media (max-width: 360px) {
  .bw-install-modal {
    padding-right: 12px;
    padding-left: 12px;
  }

  .bw-install-step {
    gap: 10px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .bw-install-step p {
    font-size: 11.5px;
  }
}
