/* Celebratory popup overlay shown when a new historical record is queued. */
.ep-popup {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  transition: opacity 0.22s ease;
  animation: ep-popup-in 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.ep-popup--out { opacity: 0; pointer-events: none; }

.ep-popup-card {
  position: relative;
  max-width: 540px;
  width: 100%;
  padding: 44px 36px 36px;
  background:
    radial-gradient(ellipse at top, rgba(255, 200, 8, 0.18), transparent 65%),
    linear-gradient(160deg, rgba(212, 168, 67, 0.14), rgba(15, 15, 15, 0.96) 60%);
  border: 1px solid rgba(255, 200, 8, 0.55);
  border-radius: 20px;
  text-align: center;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.65),
    0 0 80px rgba(255, 200, 8, 0.22) inset,
    0 0 30px rgba(255, 200, 8, 0.18);
  overflow: hidden;
}
.ep-popup-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
}
.ep-popup-emoji {
  font-size: 64px;
  line-height: 1;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 18px rgba(255, 200, 8, 0.8));
  animation: ep-popup-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ep-popup-title {
  font-family: 'Geist', 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #FFC808;
  margin: 0 0 6px;
  line-height: 1.15;
  text-shadow: 0 0 14px rgba(255, 200, 8, 0.4);
}
.ep-popup-value {
  font-family: 'Geist', 'Inter', sans-serif;
  font-size: clamp(48px, 9vw, 84px);
  font-weight: 900;
  letter-spacing: -2px;
  background: linear-gradient(180deg, #FFE680 0%, #FFC808 50%, #D4A843 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 8px 0 4px;
  line-height: 1;
  text-shadow: 0 0 40px rgba(255, 200, 8, 0.35);
  animation: ep-value-pop 0.7s 0.1s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.ep-popup-context {
  font-family: 'Noto Sans Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: rgba(255, 232, 128, 0.85);
  margin: 0 0 22px;
}
.ep-popup-msg {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: #c9c9c9;
  margin: 0 0 28px;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}
.ep-popup-cta {
  display: inline-block;
  padding: 14px 30px;
  background: linear-gradient(180deg, #FFE680, #FFC808 60%, #D4A843);
  border: none;
  border-radius: 999px;
  color: #1a1a00;
  font-family: 'Noto Sans Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 22px rgba(255, 200, 8, 0.4);
}
.ep-popup-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(255, 200, 8, 0.55);
}
.ep-popup-cta:active { transform: scale(0.98); }
@keyframes ep-value-pop {
  0% { transform: scale(0.6) translateY(10px); opacity: 0; }
  60% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}

@keyframes ep-popup-in {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes ep-popup-pop {
  0% { transform: scale(0.4); opacity: 0; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); }
}

@media (max-width: 480px) {
  .ep-popup-card { padding: 28px 22px 24px; border-radius: 14px; }
  .ep-popup-emoji { font-size: 48px; }
  .ep-popup-title { font-size: 20px; }
  .ep-popup-msg { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .ep-popup, .ep-popup-emoji { animation: none !important; }
  .ep-popup-confetti { display: none; }
}
