/* ===== Global Bonus System ===== */

.gb-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 8, 18, 0.72);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.gb-popup-overlay.gb-show {
  opacity: 1;
  visibility: visible;
}

.gb-popup {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: linear-gradient(165deg, #151c2c 0%, #0f1420 55%, #12182a 100%);
  border: 1px solid rgba(255, 215, 64, 0.25);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), 0 0 60px rgba(255, 193, 7, 0.08);
  overflow: hidden;
  transform: scale(0.92) translateY(16px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gb-popup-overlay.gb-show .gb-popup {
  transform: scale(1) translateY(0);
}

.gb-popup-glow {
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  height: 160px;
  background: radial-gradient(ellipse, rgba(255, 193, 7, 0.35) 0%, transparent 70%);
  pointer-events: none;
}

.gb-popup-header {
  position: relative;
  padding: 28px 24px 16px;
  text-align: center;
}

.gb-popup-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 193, 7, 0.12);
  border: 1px solid rgba(255, 193, 7, 0.35);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffc107;
  margin-bottom: 12px;
}

.gb-popup-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.gb-popup-sub {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.5;
}

.gb-amount-display {
  margin: 20px 24px;
  padding: 20px;
  background: rgba(255, 193, 7, 0.06);
  border: 1px solid rgba(255, 193, 7, 0.2);
  border-radius: 14px;
  text-align: center;
}

.gb-amount-label {
  font-size: 12px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.gb-amount-value {
  font-size: 42px;
  font-weight: 800;
  background: linear-gradient(135deg, #ffd54f, #ff8f00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.gb-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 24px 20px;
}

.gb-stat-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

.gb-stat-box .lbl {
  font-size: 10px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.gb-stat-box .val {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.gb-popup-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 24px 24px;
}

.gb-btn-claim {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  color: #0b0e17;
  background: linear-gradient(135deg, #ffd54f, #ffb300);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.gb-btn-claim:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 193, 7, 0.35);
}

.gb-btn-reject {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.gb-btn-reject:hover {
  background: rgba(255, 82, 82, 0.08);
  color: #ff5252;
  border-color: rgba(255, 82, 82, 0.25);
}

.gb-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s;
}

.gb-popup-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.gb-expiry-note {
  font-size: 11px;
  color: #64748b;
  text-align: center;
  padding: 0 24px 16px;
}

/* Account panel — active bonus progress */
.gb-account-panel {
  margin-bottom: 16px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.08), rgba(0, 149, 255, 0.05));
  border: 1px solid rgba(255, 193, 7, 0.2);
  border-radius: 12px;
  display: none;
}

.gb-account-panel.gb-visible {
  display: block;
  animation: gbFadeIn 0.4s ease;
}

@keyframes gbFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.gb-account-panel h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gb-progress-wrap {
  margin-bottom: 12px;
}

.gb-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 6px;
}

.gb-progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.gb-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00c853, #00e676);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.gb-account-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.gb-account-stat {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 10px;
}

.gb-account-stat .k {
  font-size: 10px;
  color: #64748b;
  text-transform: uppercase;
}

.gb-account-stat .v {
  font-size: 14px;
  font-weight: 700;
  margin-top: 2px;
}

.gb-lock-banner {
  display: none;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  margin-bottom: 20px;
  background: rgba(255, 152, 0, 0.1);
  border: 1px solid rgba(255, 152, 0, 0.35);
  border-radius: 12px;
  animation: gbFadeIn 0.4s ease;
}

.gb-lock-banner.gb-visible {
  display: flex;
}

.gb-lock-banner .icon {
  font-size: 24px;
  flex-shrink: 0;
}

.gb-lock-banner strong {
  display: block;
  margin-bottom: 4px;
  color: #ffb74d;
}

.gb-lock-banner p {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0;
}

.gb-lock-banner .remain {
  color: #fff;
  font-weight: 700;
}

/* Admin Global Bonus section */
.gb-admin-card {
  background: var(--bg-card, #151c2c);
  border: 1px solid var(--border-color, #1e293b);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.gb-admin-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.gb-admin-card .sub {
  font-size: 13px;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 20px;
}

.gb-admin-form {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .gb-admin-form {
    grid-template-columns: 1fr;
  }
}

.gb-admin-form .form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.gb-admin-form input {
  width: 100%;
  padding: 12px;
  background: var(--bg-input, #111827);
  border: 1px solid var(--border-input, #2a3546);
  color: var(--text-primary, #fff);
  border-radius: 8px;
  font-size: 14px;
}

.gb-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.gb-admin-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 10px;
  margin-top: 16px;
  font-size: 13px;
}

.gb-admin-status.active {
  background: rgba(0, 200, 83, 0.1);
  border: 1px solid rgba(0, 200, 83, 0.3);
  color: #00e676;
}

.gb-admin-status.inactive {
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}

.gb-admin-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 20px;
}

@media (max-width: 768px) {
  .gb-admin-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .gb-amount-value {
    font-size: 34px;
  }
}

.gb-mini-stat {
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  text-align: center;
}

.gb-mini-stat .n {
  font-size: 20px;
  font-weight: 800;
}

.gb-mini-stat .l {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.gb-pulse-dot {
  width: 8px;
  height: 8px;
  background: #00e676;
  border-radius: 50%;
  animation: gbPulse 1.5s ease infinite;
}

@keyframes gbPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}
