/* ── $50 Daily Challenge card ───────────────────────────────────────────── */

#challenge-widget { margin-top: 8px; }

.challenge-card {
  background: linear-gradient(145deg, rgba(16,20,40,0.95), rgba(10,14,30,0.95));
  border: 1px solid rgba(251,191,36,0.35);
  border-radius: 12px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  position: relative;
  overflow: hidden;
}

/* Subtle gold glow pulse when enrolled */
.challenge-card.enrolled {
  border-color: rgba(251,191,36,0.5);
  box-shadow: 0 0 18px rgba(251,191,36,0.08);
}

.challenge-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.challenge-card-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(251,191,36,0.85);
}

.challenge-card-wins {
  font-size: 10px;
  font-weight: 700;
  color: rgba(251,191,36,0.7);
  background: rgba(251,191,36,0.1);
  border: 1px solid rgba(251,191,36,0.25);
  border-radius: 20px;
  padding: 2px 8px;
}

.challenge-hero {
  display: flex;
  align-items: center;
  gap: 10px;
}

.challenge-trophy {
  font-size: 26px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(251,191,36,0.5));
}

.challenge-hero-text {}

.challenge-headline {
  font-size: 13px;
  font-weight: 800;
  color: #f5e8c0;
  line-height: 1.2;
}

.challenge-subline {
  font-size: 10px;
  color: rgba(200,195,180,0.6);
  margin-top: 2px;
  line-height: 1.4;
}

/* Progress bar (shown when enrolled) */
.challenge-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.challenge-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 9.5px;
  color: rgba(200,195,180,0.55);
}

.challenge-progress-profit {
  font-size: 9.5px;
  font-weight: 700;
  color: #fcd34d;
}

.challenge-bar-bg {
  width: 100%;
  height: 7px;
  background: rgba(255,255,255,0.07);
  border-radius: 99px;
  overflow: hidden;
}

.challenge-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #f59e0b, #fcd34d);
  transition: width 0.6s ease;
  min-width: 4px;
  box-shadow: 0 0 8px rgba(251,191,36,0.45);
}

.challenge-bar-fill.complete {
  background: linear-gradient(90deg, #10b981, #34d399);
  box-shadow: 0 0 8px rgba(52,211,153,0.5);
}

.challenge-reward-note {
  font-size: 9.5px;
  color: rgba(200,195,180,0.5);
  text-align: center;
  line-height: 1.4;
}

.challenge-reward-note b { color: rgba(252,211,77,0.85); }

/* Start button */
.challenge-start-btn {
  width: 100%;
  padding: 9px 14px;
  border-radius: 9px;
  border: none;
  background: linear-gradient(135deg, rgba(251,191,36,0.28), rgba(251,191,36,0.15));
  border: 1px solid rgba(251,191,36,0.45);
  color: #fcd34d;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  letter-spacing: 0.02em;
}
.challenge-start-btn:hover {
  background: linear-gradient(135deg, rgba(251,191,36,0.4), rgba(251,191,36,0.22));
  border-color: rgba(251,191,36,0.7);
}
.challenge-start-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Demo account notice */
.challenge-demo-notice {
  font-size: 10px;
  color: rgba(200,180,130,0.55);
  text-align: center;
  padding: 4px 0 2px;
}

/* ── Win / Congratulations overlay ────────────────────────────────────────── */

#challenge-win-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5,8,18,0.9);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  animation: chal-overlay-in 0.35s ease;
}

@keyframes chal-overlay-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.challenge-win-card {
  background: linear-gradient(160deg, rgba(20,24,44,0.99), rgba(10,14,28,0.99));
  border: 1px solid rgba(251,191,36,0.55);
  border-radius: 20px;
  padding: 36px 28px 28px;
  max-width: 370px;
  width: 92%;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 0 80px rgba(251,191,36,0.18), 0 0 30px rgba(0,0,0,0.6);
}

.chal-win-emoji {
  font-size: 52px;
  filter: drop-shadow(0 0 16px rgba(251,191,36,0.6));
  animation: chal-bounce 0.6s ease;
}

@keyframes chal-bounce {
  0%   { transform: scale(0.5); opacity: 0; }
  70%  { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

.chal-win-title {
  font-size: 22px;
  font-weight: 900;
  color: #fcd34d;
  text-shadow: 0 0 20px rgba(251,191,36,0.4);
}

.chal-win-subtitle {
  font-size: 14px;
  color: rgba(245,235,200,0.85);
  font-weight: 600;
}

.chal-win-body {
  font-size: 13px;
  color: rgba(200,215,245,0.75);
  line-height: 1.6;
}

.chal-win-body b { color: #fcd34d; }

.chal-win-streak {
  background: rgba(251,191,36,0.1);
  border: 1px solid rgba(251,191,36,0.25);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(252,211,77,0.9);
}

.chal-tg-btn {
  display: block;
  padding: 13px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0088cc, #006aaa);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 0 24px rgba(0,136,204,0.35);
  transition: opacity 0.2s;
}
.chal-tg-btn:hover { opacity: 0.88; }

.chal-win-note {
  font-size: 10px;
  color: rgba(175,195,240,0.4);
}

.chal-win-next {
  font-size: 11px;
  color: rgba(200,215,245,0.55);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(226,182,104,.15);
  border-radius: 8px;
  padding: 8px 12px;
}

.chal-close-btn {
  background: none;
  border: 1px solid rgba(226,182,104,.18);
  color: rgba(175,195,240,0.65);
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.chal-close-btn:hover { background: rgba(255,255,255,0.06); color: #c7d2fe; }
