/* DEV — premium achievement-style easter egg */

.ah-easter-celebration-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2600;
}

.ah-easter {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: grid;
  place-items: center;
  padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.4s;
}

.ah-easter.is-open {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.ah-easter__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 35%, rgba(180, 200, 255, 0.12), transparent 60%),
    rgba(3, 4, 8, 0.72);
}

.ah-easter__card {
  position: relative;
  z-index: 1;
  width: min(100%, 400px);
  padding: 28px 24px 22px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 42%, rgba(255, 255, 255, 0.04) 100%),
    rgba(10, 12, 20, 0.92);
  box-shadow:
    0 40px 80px -28px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  overflow: hidden;
  text-align: center;
  color: #f5f5f7;
  transform: translateY(22px) scale(0.92);
  filter: blur(8px);
  transition:
    transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.ah-easter.is-open .ah-easter__card {
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.ah-easter__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(245, 245, 247, 0.78);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ah-easter__close:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #f5f5f7;
}

.ah-easter__card::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto;
  height: 70%;
  background: radial-gradient(ellipse at 50% 0%, rgba(210, 220, 255, 0.18), transparent 65%);
  pointer-events: none;
}

.ah-easter__shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.12) 48%,
    transparent 62%
  );
  transform: translateX(-120%);
  opacity: 0;
}

.ah-easter.is-open .ah-easter__shine {
  animation: ah-easter-shine 1.1s 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes ah-easter-shine {
  0% { transform: translateX(-120%); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateX(120%); opacity: 0; }
}

.ah-easter__badge {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.55), transparent 28%),
    linear-gradient(145deg, #e8eefc 0%, #9db0d4 45%, #6b7f9e 100%);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.35),
    0 0 0 6px rgba(255, 255, 255, 0.06),
    inset 0 2px 6px rgba(255, 255, 255, 0.55),
    inset 0 -8px 16px rgba(40, 50, 70, 0.28);
  animation: ah-easter-badge-in 0.7s 0.08s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ah-easter__badge-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  animation: ah-easter-ring 2.4s ease-out infinite;
}

.ah-easter__badge-pct {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #0c1018;
  line-height: 1;
}

.ah-easter__badge-pct span {
  display: block;
  margin-top: 2px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}

@keyframes ah-easter-badge-in {
  from { opacity: 0; transform: scale(0.6) rotate(-12deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes ah-easter-ring {
  0% { transform: scale(0.92); opacity: 0.7; }
  100% { transform: scale(1.25); opacity: 0; }
}

.ah-easter__rarity {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245, 245, 247, 0.55);
  animation: ah-easter-fade-up 0.55s 0.12s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ah-easter__rarity-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9ae6b4;
  box-shadow: 0 0 10px rgba(154, 230, 180, 0.7);
}

.ah-easter__title {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 4vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.2;
  animation: ah-easter-fade-up 0.55s 0.18s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ah-easter__lead {
  margin: 0 0 20px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(245, 245, 247, 0.5);
  animation: ah-easter-fade-up 0.55s 0.24s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ah-easter__loot {
  position: relative;
  margin: 0 0 12px;
  padding: 16px 14px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  animation: ah-easter-fade-up 0.55s 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ah-easter__loot-label {
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(245, 245, 247, 0.38);
}

.ah-easter__code-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.ah-easter__code {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.28);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: #f5f5f7;
  text-shadow: 0 0 24px rgba(255, 255, 255, 0.15);
}

.ah-easter__copy {
  flex-shrink: 0;
  min-width: 108px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #f5f5f7;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.ah-easter__copy:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
}

.ah-easter__copy.is-copied {
  background: rgba(154, 230, 180, 0.16);
  border-color: rgba(154, 230, 180, 0.35);
  color: #bbf7d0;
}

.ah-easter__meta {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 0 18px;
  font-size: 0.78rem;
  color: rgba(245, 245, 247, 0.4);
  animation: ah-easter-fade-up 0.55s 0.36s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ah-easter__meta strong {
  color: rgba(245, 245, 247, 0.72);
  font-weight: 600;
}

.ah-easter__actions {
  display: flex;
  gap: 8px;
  animation: ah-easter-fade-up 0.55s 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ah-easter__btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  border: none;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  color: #0c1018;
  background: #f5f5f7;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.ah-easter__btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.ah-easter__btn--ghost {
  color: rgba(245, 245, 247, 0.85);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes ah-easter-fade-up {
  from { opacity: 0; transform: translateY(12px); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

body.ah-easter-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .ah-easter,
  .ah-easter__card,
  .ah-easter__badge,
  .ah-easter__rarity,
  .ah-easter__title,
  .ah-easter__lead,
  .ah-easter__loot,
  .ah-easter__meta,
  .ah-easter__actions,
  .ah-easter__shine,
  .ah-easter__badge-ring {
    animation: none !important;
    transition: none !important;
  }
  .ah-easter.is-open .ah-easter__card {
    transform: none;
    filter: none;
  }
}
