/* ──────────────────────────────────────────────────────
   Streak Reward Modal — celebration UI on milestone hit
   Triggered from streak-badge.js after a successful check-in
   ────────────────────────────────────────────────────── */

.streak-reward-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.streak-reward-backdrop--visible {
  opacity: 1;
}

.streak-reward-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  width: min(92vw, 420px);
  background: linear-gradient(145deg, #1a2740 0%, #0f1729 100%);
  border: 1px solid rgba(212, 168, 67, 0.3);
  border-radius: 24px;
  padding: 40px 32px 32px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5),
              0 0 60px rgba(212, 168, 67, 0.15);
  z-index: 1001;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.streak-reward-modal--visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.streak-reward-modal__close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: transparent;
  border: none;
  color: rgba(248, 250, 252, 0.5);
  font-size: 28px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.streak-reward-modal__close:hover {
  color: #f8fafc;
  background: rgba(248, 250, 252, 0.1);
}

/* Confetti row above the badge */
.streak-reward-modal__confetti {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 24px;
}

.streak-reward-modal__confetti span {
  display: inline-block;
  animation: confettiFloat 2.5s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.15s);
}

@keyframes confettiFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(15deg); }
}

/* The big circular badge */
.streak-reward-modal__badge {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 12px auto 24px;
  background: radial-gradient(circle at 30% 30%, #d4a843 0%, #b8851a 60%, #8a610c 100%);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 50px rgba(212, 168, 67, 0.4),
              inset 0 -10px 30px rgba(0, 0, 0, 0.3),
              inset 0 4px 12px rgba(255, 255, 255, 0.3);
  animation: badgePulse 2s ease-in-out infinite;
}

.streak-reward-modal__badge::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(212, 168, 67, 0.4);
  animation: badgeRing 2s ease-out infinite;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

@keyframes badgeRing {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.3); opacity: 0; }
}

.streak-reward-modal__badge-emoji {
  font-size: 56px;
  margin-bottom: -4px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.streak-reward-modal__badge-days {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.streak-reward-modal__title {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 28px;
  font-weight: 600;
  color: #f8fafc;
  margin: 0 0 4px;
  line-height: 1.2;
}

.streak-reward-modal__badge-name {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-size: 18px;
  color: #d4a843;
  margin-bottom: 12px;
}

.streak-reward-modal__subtitle {
  font-size: 14px;
  color: rgba(248, 250, 252, 0.7);
  margin: 0 0 24px;
  line-height: 1.5;
  padding: 0 8px;
}

.streak-reward-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (max-width: 480px) {
  .streak-reward-modal {
    padding: 32px 24px 24px;
  }
  .streak-reward-modal__badge {
    width: 120px;
    height: 120px;
  }
  .streak-reward-modal__badge-emoji {
    font-size: 48px;
  }
  .streak-reward-modal__title {
    font-size: 24px;
  }
}
