/* =========================
   CANVAS NEVE
========================= */
#xmas-snow {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9998;
}

/* =========================
   GREETING CENTRATO
========================= */
#xmas-greeting {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  filter: blur(8px);
  pointer-events: none;
  z-index: 9999;
}

.xmas-text {
  display: inline-block;
  padding: 18px 26px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font: 600 22px system-ui, -apple-system, Segoe UI, Roboto, Arial;
  letter-spacing: 0.5px;

  box-shadow:
    0 0 15px rgba(255,255,255,0.6),
    0 0 40px rgba(255,215,0,0.35);

  backdrop-filter: blur(6px);
}

/* =========================
   ANIMAZIONI
========================= */
.xmas-show {
  animation: xmasIn 700ms cubic-bezier(.2,.8,.2,1) forwards;
}

.xmas-hide {
  animation: xmasOut 600ms ease forwards;
}

@keyframes xmasIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    filter: blur(14px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    filter: blur(0);
  }
}

@keyframes xmasOut {
  from {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    filter: blur(0);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
    filter: blur(10px);
  }
}

/* =========================
   SPARKLE
========================= */
.sparkle {
  position: fixed;
  width: 10px;
  height: 10px;
  pointer-events: none;
  z-index: 10000;
  opacity: 0;

  background: radial-gradient(circle, #fff 0 35%, transparent 60%);
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.9));

  clip-path: polygon(
    50% 0%, 61% 35%, 98% 35%,
    68% 57%, 79% 91%,
    50% 70%, 21% 91%,
    32% 57%, 2% 35%,
    39% 35%
  );

  animation: sparklePop 900ms ease-out forwards;
}

@keyframes sparklePop {
  0% {
    opacity: 0;
    transform: scale(0.2) rotate(0deg);
  }
  30% {
    opacity: 1;
    transform: scale(1.3) rotate(20deg);
  }
  100% {
    opacity: 0;
    transform: scale(0.6) rotate(90deg);
  }
}

/* =========================
   ACCESSIBILITÀ
========================= */
@media (prefers-reduced-motion: reduce) {
  #xmas-snow { display: none; }
  .sparkle,
  .xmas-show,
  .xmas-hide { animation: none !important; }
  #xmas-greeting { opacity: 1; filter: none; }
}


/* contenitore */
div.contenitore {background:#000;color:#FFF;width:100%;height:1000px;padding:20px;}