/* Hidden surprises: the Konami rain, the costumes of the logo and the birthday greeting */

.konami-rain { position: fixed; inset: 0; z-index: 1999; pointer-events: none; overflow: hidden; }
.konami-rain span {
  position: absolute; top: -40px; font-size: 1.8rem;
  animation: konamiFall linear forwards;
}
@keyframes konamiFall {
  to { transform: translateY(110vh) rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) { .konami-rain { display: none; } }

/* The explosion of the logo: a flash, two shockwaves and sparks flying out from its centre */
.logo-blast { position: fixed; z-index: 1999; width: 0; height: 0; pointer-events: none; }
.logo-blast span { position: absolute; border-radius: 50%; transform: translate(-50%, -50%); }
.logo-blast-flash {
  width: 120px; height: 120px;
  background: radial-gradient(circle, #fff 0%, var(--accent-gold) 35%, transparent 70%);
  animation: blastFlash 0.6s ease-out forwards;
}
.logo-blast-ring {
  width: 40px; height: 40px; border: 3px solid var(--accent-gold);
  animation: blastRing 0.9s ease-out forwards;
}
.logo-blast-ring-late { border-color: var(--accent-pink); animation-delay: 0.15s; opacity: 0; }
.logo-blast-spark {
  width: 8px; height: 8px; background: var(--accent-gold); box-shadow: 0 0 8px currentColor;
  animation: blastSpark 1s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}
.logo-blast-spark:nth-child(4n + 1) { background: var(--accent-teal); }
.logo-blast-spark:nth-child(4n + 2) { background: var(--accent-pink); }
.logo-blast-spark:nth-child(4n + 3) { background: var(--accent-purple); }
@keyframes blastFlash {
  from { transform: translate(-50%, -50%) scale(0.2); opacity: 1; }
  to { transform: translate(-50%, -50%) scale(3.5); opacity: 0; }
}
@keyframes blastRing {
  from { transform: translate(-50%, -50%) scale(0.3); opacity: 1; }
  to { transform: translate(-50%, -50%) scale(9); opacity: 0; }
}
@keyframes blastSpark {
  from { transform: translate(-50%, -50%) scale(1.4); opacity: 1; }
  to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0); opacity: 0; }
}
.navbar-brand.logo-shake { animation: logoShake 0.5s linear; }
@keyframes logoShake {
  0%, 100% { transform: none; }
  10% { transform: translate(-4px, 2px) rotate(-3deg) scale(1.15); }
  30% { transform: translate(4px, -3px) rotate(3deg) scale(1.1); }
  50% { transform: translate(-3px, -2px) rotate(-2deg); }
  70% { transform: translate(3px, 2px) rotate(2deg); }
  90% { transform: translate(-1px, 1px); }
}
@media (prefers-reduced-motion: reduce) { .logo-blast { display: none; } .navbar-brand.logo-shake { animation: none; } }

/* The costume takes the place of the logo. The text of the brand is painted with a gradient clipped to its
   glyphs, so the emoji takes its own colours back. */
.navbar-brand.skin-halloween .navbar-logo,
.navbar-brand.skin-christmas .navbar-logo,
.navbar-brand.skin-birthday .navbar-logo { display: none; }
.navbar-brand.skin-halloween::before,
.navbar-brand.skin-christmas::before,
.navbar-brand.skin-birthday::before {
  width: 32px; flex-shrink: 0; text-align: center; font-size: 28px; line-height: 32px;
  -webkit-text-fill-color: initial;
}
.navbar-brand.skin-halloween::before { content: '🎃'; }
.navbar-brand.skin-christmas::before { content: '🎄'; }
.navbar-brand.skin-birthday::before { content: '🎂'; }

/* The birthday modal: the cake and a few words, with confetti falling over everything */
.birthday-modal { padding: 28px 24px 24px; text-align: center; }
.birthday-cake { font-size: 3.2rem; line-height: 1; }
.birthday-modal h3 { margin: 12px 0 6px; font-size: 1.3rem; font-weight: 700; }
.birthday-modal p { margin: 0 0 20px; color: var(--text-secondary); line-height: 1.5; }

.birthday-confetti { position: fixed; inset: 0; z-index: 1999; pointer-events: none; overflow: hidden; }
.birthday-confetti span {
  position: absolute; top: -16px; width: 8px; height: 14px; border-radius: 2px;
  animation: confettiFall linear forwards;
}
.birthday-confetti span:nth-child(4n + 1) { background: var(--accent-teal); }
.birthday-confetti span:nth-child(4n + 2) { background: var(--accent-gold); }
.birthday-confetti span:nth-child(4n + 3) { background: var(--accent-pink); }
.birthday-confetti span:nth-child(4n) { background: var(--accent-purple); }
@keyframes confettiFall {
  to { transform: translate(var(--drift), 110vh) rotate(720deg); }
}
@media (prefers-reduced-motion: reduce) { .birthday-confetti { display: none; } }
