/* ==========================================================
   CROWD RACE - MODALS & RULES POPUP
   ========================================================== */

/* RULES BOX */
.rules-box {
  background: rgba(8, 12, 24, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 0.84rem;
  color: #cbd5e1;
  line-height: 1.55;
}

.rule-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.rule-icon {
  font-size: 1.3rem;
  line-height: 1.2;
  flex-shrink: 0;
}

/* MODALS BASE */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

/* WINNER NOTIFICATION MODAL (ZERO BLUR & SLEEK CARD) */
#finishModal.modal-backdrop {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  pointer-events: none;
}
#finishModal.modal-backdrop.show {
  pointer-events: auto;
}
#finishModal .modal-card {
  background: rgba(8, 12, 24, 0.96);
  border: 1.5px solid #f59e0b;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.85), 0 0 25px rgba(245, 158, 11, 0.35);
  border-radius: 18px;
  padding: 16px 24px;
  max-width: 440px;
  width: 90%;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#finishModal.modal-backdrop.show .modal-card {
  transform: scale(1);
}

/* VOID / CANCELLED NOTIFICATION MODAL (ZERO BLUR) */
#voidModal.modal-backdrop {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  pointer-events: none;
}
#voidModal.modal-backdrop.show {
  pointer-events: auto;
}
#voidModal .modal-card {
  background: rgba(15, 10, 18, 0.98);
  border: 1.5px solid #ef4444;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.9), 0 0 25px rgba(239, 68, 68, 0.35);
  border-radius: 18px;
  padding: 18px 24px;
  max-width: 440px;
  width: 90%;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#voidModal.modal-backdrop.show .modal-card {
  transform: scale(1);
}

.modal-card {
  background: linear-gradient(180deg, #0d1428 0%, #070a14 100%);
  border: 2px solid rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 60px rgba(245, 158, 11, 0.35);
  border-radius: 26px;
  padding: 32px 28px;
  max-width: 520px;
  width: 92%;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-backdrop.show .modal-card {
  transform: scale(1);
}

.podium-trophy {
  font-size: 52px;
  animation: trophyBounce 1s infinite alternate;
}
@keyframes trophyBounce {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(-8px) scale(1.08); }
}

.winner-name {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.1;
  margin-top: -2px;
}

.podium-summary {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.9rem;
}

.podium-row {
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
}

.prediction-result-banner {
  padding: 14px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 0.96rem;
}
.prediction-result-banner.win {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #10b981;
  color: #34d399;
}
.prediction-result-banner.lose {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #f87171;
}

.btn-modal-next {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 16px 20px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 0 #b45309;
  transition: all 0.2s;
}
.btn-modal-next:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* WITHDRAW & CRYPTO NETWORK SELECTOR */
.network-select-group,
.wallet-select-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(95px, 1fr));
  gap: 8px;
}
.network-btn,
.wallet-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 10px 6px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.76rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: all 0.2s;
}
.network-btn:hover,
.wallet-btn:hover {
  border-color: #64748b;
  background: rgba(255, 255, 255, 0.09);
}
.network-btn.active,
.wallet-btn.active {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

/* DEPOSIT PACKAGES GRID */
.deposit-package-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 6px 0;
}
@media (max-width: 480px) {
  .deposit-package-grid {
    grid-template-columns: 1fr;
  }
}
.deposit-package-card {
  position: relative;
  background: rgba(15, 23, 42, 0.8);
  border: 1.5px solid var(--card-border);
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.deposit-package-card:hover {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
  transform: translateY(-2px);
}
.deposit-package-card.selected {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.16);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.35);
}
.package-badge {
  position: absolute;
  top: 8px;
  right: 10px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0b1120;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.4px;
}
.package-price {
  font-size: 1.15rem;
  font-weight: 900;
  color: #f8fafc;
  font-family: 'JetBrains Mono', monospace;
}
.package-coins {
  font-size: 0.88rem;
  font-weight: 800;
  color: #fbbf24;
}
.package-tickets {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
}
