/* ==============================================================================
   CENTRALIZED EASTER EGG SYSTEM — MULTI-THEME MODALS & PARTICLES
   ============================================================================== */

/* Clickable Hero Title with smooth hover cues & Safari touch optimizations */
#hero-title,
#hero-title-text {
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

#hero-title-text {
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease;
}

#hero-title-text:active {
  transform: scale(0.985);
}

/* Modal Backdrop */
.easter-egg-backdrop,
.bacim-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(10, 10, 16, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  opacity: 0;
  animation: easterFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Theme Background Overlays */
.easter-egg-backdrop.theme-pink {
  background: rgba(26, 8, 22, 0.85);
}
.easter-egg-backdrop.theme-matrix {
  background: rgba(4, 20, 10, 0.88);
}
.easter-egg-backdrop.theme-cyan {
  background: rgba(5, 18, 28, 0.85);
}
.easter-egg-backdrop.theme-monkey {
  background: rgba(28, 12, 24, 0.88);
}
.easter-egg-backdrop.theme-gold {
  background: rgba(28, 22, 8, 0.88);
}

/* Modal Card */
.easter-egg-card,
.bacim-modal-card {
  position: relative;
  max-width: 500px;
  width: 100%;
  background: linear-gradient(135deg, rgba(20, 20, 30, 0.96), rgba(30, 30, 45, 0.98));
  border: 2px solid var(--accent-cyan, #00f0ff);
  border-radius: 24px;
  padding: 34px 28px 30px;
  text-align: center;
  box-shadow: 0 12px 50px rgba(0, 240, 255, 0.35);
  transform: scale(0.85);
  opacity: 0;
  animation: easterScaleUp 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.05s forwards;
  overflow: hidden;
}

/* Theme Borders & Glows */
.easter-egg-card.theme-pink,
.bacim-modal-card {
  background: linear-gradient(135deg, rgba(32, 10, 28, 0.96), rgba(52, 14, 44, 0.98));
  border-color: #f472b6;
  box-shadow: 0 12px 50px rgba(236, 72, 153, 0.45), 0 0 30px rgba(244, 114, 182, 0.25);
}

.easter-egg-card.theme-matrix {
  background: linear-gradient(135deg, rgba(4, 28, 12, 0.96), rgba(8, 40, 18, 0.98));
  border-color: #10b981;
  box-shadow: 0 12px 50px rgba(16, 185, 129, 0.45), 0 0 30px rgba(16, 185, 129, 0.25);
}

.easter-egg-card.theme-cyan {
  background: linear-gradient(135deg, rgba(8, 24, 38, 0.96), rgba(12, 36, 56, 0.98));
  border-color: #00f0ff;
  box-shadow: 0 12px 50px rgba(0, 240, 255, 0.45), 0 0 30px rgba(0, 240, 255, 0.25);
}

.easter-egg-card.theme-monkey {
  background: linear-gradient(135deg, rgba(34, 12, 30, 0.96), rgba(56, 16, 48, 0.98));
  border-color: #ec4899;
  box-shadow: 0 12px 50px rgba(236, 72, 153, 0.5), 0 0 35px rgba(236, 72, 153, 0.3);
}

.easter-egg-card.theme-gold {
  background: linear-gradient(135deg, rgba(32, 24, 8, 0.96), rgba(52, 38, 12, 0.98));
  border-color: #fbbf24;
  box-shadow: 0 12px 50px rgba(251, 191, 36, 0.45), 0 0 30px rgba(251, 191, 36, 0.25);
}

/* Floating Particles Layer */
.easter-egg-particles,
.bacim-hearts-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.easter-egg-particle,
.bacim-floating-heart {
  position: absolute;
  font-size: 1.35rem;
  opacity: 0;
  animation: easterFloat 3s ease-in-out infinite;
}

/* Badge */
.easter-egg-badge {
  display: inline-block;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary, #cbd5e1);
  margin-bottom: 12px;
  text-transform: uppercase;
}

/* Icon */
.easter-egg-icon,
.bacim-modal-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 12px;
  display: inline-block;
  animation: easterPulse 1.8s ease-in-out infinite;
  filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.4));
}

/* Message */
.easter-egg-message,
.bacim-modal-text {
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.6;
  color: #ffffff;
  margin: 0 0 18px 0;
  word-break: break-word;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* Timer progress bar */
.easter-egg-timer-wrap,
.bacim-modal-timer {
  height: 3px;
  width: 100%;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 14px;
}

.easter-egg-timer-bar,
.bacim-modal-timer-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #00f0ff, #ec4899, #fbbf24);
  animation: easterTimerShrink 5s linear forwards;
}

/* Close Button */
.easter-egg-close,
.bacim-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}

.easter-egg-close:hover,
.bacim-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* Exit Animations */
.easter-egg-backdrop.easter-closing,
.bacim-modal-backdrop.bacim-closing {
  animation: easterFadeOut 0.28s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.easter-egg-backdrop.easter-closing .easter-egg-card,
.bacim-modal-backdrop.bacim-closing .bacim-modal-card {
  animation: easterScaleDown 0.28s cubic-bezier(0.4, 0, 1, 1) forwards;
}

/* Animations Keyframes */
@keyframes easterFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes easterFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes easterScaleUp {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes easterScaleDown {
  from { transform: scale(1); opacity: 1; }
  to { transform: scale(0.85); opacity: 0; }
}

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

@keyframes easterFloat {
  0% {
    transform: translateY(15px) scale(0.5);
    opacity: 0;
  }
  30% {
    opacity: 0.85;
  }
  80% {
    opacity: 0.85;
  }
  100% {
    transform: translateY(-80px) scale(1.15);
    opacity: 0;
  }
}

@keyframes easterTimerShrink {
  from { width: 100%; }
  to { width: 0%; }
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
  .easter-egg-card,
  .bacim-modal-card {
    padding: 26px 20px 22px;
    border-radius: 20px;
  }
  .easter-egg-icon,
  .bacim-modal-icon {
    font-size: 2.4rem;
  }
  .easter-egg-message,
  .bacim-modal-text {
    font-size: 1.05rem;
    line-height: 1.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  .easter-egg-particle,
  .easter-egg-icon {
    animation: none !important;
  }
  .easter-egg-card,
  .easter-egg-backdrop {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}
