/* ── BRABR Premium UI: ganhos ao vivo + modais auth + depósito ── */

/* ═══ MAIORES GANHOS DE HOJE ═══ */
.cg-wins-section {
  position: relative;
  padding-top: 8px;
}

.cg-wins-section::before {
  content: "";
  position: absolute;
  inset: 0 16px auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(52, 211, 153, 0.35), transparent);
  pointer-events: none;
}

.cg-wins-head {
  margin-bottom: 14px;
}

.cg-wins-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.28);
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.12);
}

.cg-wins-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55);
  animation: brLivePulse 1.8s ease-out infinite;
}

@keyframes brLivePulse {
  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); }
}

.cg-wins-ticker {
  position: relative;
  padding: 14px 0 6px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(5, 35, 25, 0.72) 0%, rgba(3, 21, 15, 0.35) 100%);
  border: 1px solid rgba(52, 211, 153, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 40px rgba(0, 0, 0, 0.22);
}

.cg-wins-ticker::before,
.cg-wins-ticker::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 48px;
  z-index: 2;
  pointer-events: none;
}

.cg-wins-ticker::before {
  left: 0;
  background: linear-gradient(90deg, rgba(3, 21, 15, 0.95), transparent);
  border-radius: 18px 0 0 18px;
}

.cg-wins-ticker::after {
  right: 0;
  background: linear-gradient(270deg, rgba(3, 21, 15, 0.95), transparent);
  border-radius: 0 18px 18px 0;
}

.cgw-card {
  backdrop-filter: blur(8px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 42%),
    var(--bg-darker, #04140f);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset -9px -11px 20px -13px var(--cov),
    0 8px 24px rgba(0, 0, 0, 0.18);
}

.cgw-card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset -9px -11px 22px -12px var(--cov),
    0 14px 32px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(52, 211, 153, 0.18);
}

.cgw-user {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.48);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cgw-win {
  font-size: 16px;
  background: linear-gradient(135deg, #86efac 0%, #22c55e 55%, #bbf7d0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.cgw-play {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
}

.cgw-play i {
  font-size: 9px;
}

/* ═══ MODAIS LOGIN / CADASTRO (estilo APOSTATUDO + tema admin) ═══ */
@keyframes brModalIn {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes brAccentSlide {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.modal.active {
  display: flex;
}

.br-auth-modal.modal {
  background: color-mix(in srgb, var(--theme-bg-body) 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
}

.br-auth-modal.active .br-auth-shell {
  animation: brModalIn 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.br-auth-shell {
  position: relative;
  width: 100%;
  max-width: 440px;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--accent-bd);
  background: linear-gradient(180deg, var(--theme-bg-header) 0%, var(--theme-bg-card) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 28px 80px rgba(0, 0, 0, 0.55),
    0 0 60px var(--accent-dim);
}

.br-auth-topbar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 12px;
}

.br-auth-logo {
  height: 28px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
  justify-self: start;
}

.br-auth-help {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--theme-text-secondary);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}

.br-auth-help:hover {
  color: #fff;
  border-color: var(--accent-bd);
  background: var(--accent-dim);
}

.br-auth-help i {
  font-size: 12px;
  color: var(--theme-accent-secondary);
}

.br-auth-close {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--theme-text-secondary);
  background: transparent;
  transition: background 0.18s, color 0.18s;
}

.br-auth-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.br-auth-banner {
  padding: 0 16px 12px;
}

.br-auth-banner .modal-banner {
  border-radius: 12px;
  overflow: hidden;
  height: 0;
  padding-bottom: 35%;
}

.br-auth-banner .modal-banner img {
  border-radius: 12px;
}

.br-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 16px 14px;
}

.br-auth-tab {
  height: 40px;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}

.br-auth-tab.is-active {
  color: #fff;
  background: var(--theme-accent-secondary);
  box-shadow: 0 8px 22px var(--accent-dim);
}

.br-auth-body {
  padding: 0 16px 22px !important;
}

.br-auth-pane {
  display: none;
}

.br-auth-pane.is-active {
  display: block;
}

.br-auth-modal .stake-input-group {
  margin-bottom: 12px;
}

.br-auth-modal .stake-label {
  display: none;
}

.br-auth-modal .stake-input {
  width: 100%;
  border-radius: 10px !important;
  padding: 15px 16px !important;
  background: var(--theme-bg-input);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.br-auth-modal .stake-input.with-icon {
  padding-right: 46px !important;
}

.br-auth-modal .stake-input:focus {
  border-color: var(--accent-bd2);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.br-auth-modal .stake-input::placeholder {
  color: color-mix(in srgb, var(--theme-text-secondary) 55%, transparent);
}

.br-auth-modal .toggle-pass {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--theme-text-secondary);
  cursor: pointer;
  font-size: 15px;
  z-index: 2;
}

.br-auth-modal .toggle-pass:hover {
  color: #fff;
}

.br-auth-modal .stake-actions {
  display: flex;
  justify-content: flex-end;
  margin: 2px 0 16px;
}

.br-auth-modal .stake-actions--center {
  justify-content: center;
  margin-top: 14px;
}

.br-auth-modal .stake-link-muted {
  font-size: 12px;
  color: var(--theme-text-secondary);
  text-decoration: none;
}

.br-auth-modal .stake-link-muted:hover {
  color: #fff;
}

.br-auth-modal .stake-btn-primary {
  width: 100%;
  margin-top: 4px;
  border: none;
  border-radius: 10px;
  padding: 16px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--theme-bg-body);
  cursor: pointer;
  background: linear-gradient(
    135deg,
    var(--theme-accent-secondary) 0%,
    var(--theme-accent) 55%,
    var(--theme-accent-hover) 100%
  );
  box-shadow: 0 10px 28px var(--accent-dim);
  transition: transform 0.15s, filter 0.15s;
}

.br-auth-modal .stake-btn-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.br-auth-modal .stake-btn-primary:active {
  transform: scale(0.99);
}

.br-auth-modal .stake-btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.br-auth-modal .stake-alert {
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
  display: none;
}

.br-auth-modal .stake-alert.show {
  display: block;
}

.br-auth-modal .stake-alert.alert-error {
  background: color-mix(in srgb, var(--theme-danger) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--theme-danger) 35%, transparent);
  color: var(--theme-danger);
}

.br-auth-modal .stake-alert.alert-success {
  background: var(--accent-dim);
  border: 1px solid var(--accent-bd);
  color: var(--theme-accent-secondary);
}

.br-auth-modal .cb-terms-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.br-auth-modal .cb-terms-text {
  font-size: 12px;
  line-height: 1.45;
  color: var(--theme-text-secondary);
}

.br-auth-modal .cb-link-highlight {
  color: var(--theme-accent-secondary);
  text-decoration: none;
  font-weight: 600;
}

.br-auth-modal .cb-terms-wrap input[type="checkbox"] {
  accent-color: var(--theme-accent);
}

.br-auth-affiliate {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 10px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-bd);
}

.br-auth-affiliate i {
  color: var(--theme-accent-secondary);
}

.br-auth-affiliate-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--theme-text-secondary);
}

.br-auth-affiliate-code {
  font-size: 14px;
  font-weight: 800;
  color: var(--theme-accent-secondary);
}

.br-auth-forgot-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.br-auth-forgot-sub {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--theme-text-secondary);
}

.br-auth-modal .stake-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.br-auth-modal .stake-footer-text {
  display: none;
}

@media (max-width: 600px) {
  .br-auth-modal.modal {
    padding: 0;
    align-items: flex-end;
  }

  .br-auth-shell {
    max-width: 100%;
    border-radius: 18px 18px 0 0;
    max-height: 96dvh;
    overflow-y: auto;
  }

  .br-auth-help span {
    display: none;
  }

  .br-auth-help {
    padding: 8px 10px;
  }

  .br-auth-modal .stake-row {
    grid-template-columns: 1fr;
  }
}

/* legado: modais antigos fora do novo shell */
.modal:not(.br-auth-modal) .stake-modal-content {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(52, 211, 153, 0.16);
  background:
    linear-gradient(180deg, rgba(8, 48, 35, 0.98) 0%, rgba(4, 20, 15, 0.99) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 28px 80px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(34, 197, 94, 0.08);
}

.modal:not(.br-auth-modal) .stake-modal-content::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #047857, #22c55e, #34d399, #22c55e, #047857);
  background-size: 200% 100%;
  animation: brAccentSlide 4s linear infinite;
}

/* ═══ MODAL DEPÓSITO (payment.js) — cores via tema admin ═══ */
.br-modal-overlay {
  background:
    radial-gradient(ellipse at center, var(--accent-dim), transparent 60%),
    color-mix(in srgb, var(--theme-bg-body) 86%, transparent) !important;
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
}

.br-modal {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--accent-bd) !important;
  background:
    linear-gradient(180deg, var(--theme-bg-header) 0%, var(--theme-bg-card) 100%) !important;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 30px 90px rgba(0, 0, 0, 0.55),
    0 0 70px var(--accent-dim) !important;
}

.br-modal::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--theme-brand-bar),
    var(--theme-accent),
    var(--theme-accent-secondary),
    var(--theme-accent),
    var(--theme-brand-bar)
  );
  background-size: 200% 100%;
  animation: brAccentSlide 4s linear infinite;
}

.br-deposit-hero {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.br-deposit-hero-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--theme-bg-body);
  background: linear-gradient(135deg, var(--theme-accent-secondary), var(--theme-accent));
  box-shadow: 0 10px 24px var(--accent-dim);
}

.br-deposit-hero-text h3 {
  margin: 0 0 4px !important;
  font-size: 1.35rem !important;
}

.br-deposit-hero-text p {
  margin: 0 !important;
}

.br-modal-steps {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.br-modal-step {
  flex: 1;
  text-align: center;
  padding: 8px 6px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--theme-text-secondary);
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.br-modal-step.is-active {
  color: var(--theme-accent-secondary);
  border-color: var(--accent-bd);
  background: var(--accent-dim);
  box-shadow: 0 0 20px var(--accent-dim);
}

.br-amount-btn {
  position: relative;
  border-radius: 10px !important;
  min-height: 54px;
  padding: 16px 10px !important;
  background: var(--theme-bg-card) !important;
  border: 1px solid var(--accent-bd) !important;
  color: var(--theme-accent-secondary) !important;
  font-size: 1rem !important;
  font-weight: 800 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.br-amount-btn:hover {
  border-color: var(--accent-bd2) !important;
  background: var(--theme-bg-header) !important;
}

.br-amount-btn.active {
  transform: translateY(-1px);
  border-color: var(--theme-accent) !important;
  background: var(--accent-dim) !important;
  color: var(--theme-accent-secondary) !important;
  box-shadow:
    0 0 0 1px var(--accent-bd) inset,
    0 8px 20px rgba(0, 0, 0, 0.35) !important;
}

.br-amount-hot {
  position: absolute;
  top: -7px;
  right: -3px;
  background: var(--theme-warning);
  color: #111;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1.2;
  pointer-events: none;
}

.br-deposit-summary {
  background: linear-gradient(135deg, var(--accent-dim), transparent) !important;
  border: 1px solid var(--accent-bd) !important;
}

.br-deposit-summary strong {
  font-size: 1.25rem !important;
  color: var(--theme-accent-secondary) !important;
  text-shadow: 0 0 18px var(--accent-dim);
}

.br-btn-primary {
  border-radius: 14px !important;
  background: linear-gradient(
    135deg,
    var(--theme-accent-secondary),
    var(--theme-accent),
    var(--theme-accent-hover)
  ) !important;
  box-shadow: 0 12px 28px var(--accent-dim);
}

.br-qr {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.br-qr img {
  border-radius: 14px !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.br-pix-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  line-height: 1.55;
}

#brDepositModal .br-modal {
  padding-top: 18px;
}

#brDepositModal .br-modal-head {
  position: absolute;
  top: 14px;
  right: 14px;
  left: auto;
  z-index: 4;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}

#brDepositModal .br-modal-head span {
  display: none;
}

.br-modal-close {
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(6px);
}

@media (max-width: 600px) {
  .cg-wins-ticker::before,
  .cg-wins-ticker::after {
    width: 28px;
  }

  .br-auth-hero-title {
    font-size: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cg-wins-dot,
  .stake-modal-content::before,
  .br-modal::before {
    animation: none;
  }
}
