
/* Pantalla de carga */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #c25973;
  background-size: cover;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  flex-direction: column;
  color: #fff;
}

#loading-screen .loader p {
  font-size: 28px;
  font-weight: bold;
  text-shadow: 0 0 10px #fff;
  animation: blink 1.2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}


/* =========================
   BODY
========================= */
body {
    margin: 0;
    background: url("fondo.jpg") no-repeat center center fixed;
    background-size: cover;
    color: white;
    font-family: 'Arial', sans-serif;
    text-align: center;
}

/* CONTAINER */
.container {
    position: relative;
    z-index: 2;
}

/* =========================
   TIPOGRAFÍA
========================= */
p, h1 {
    font-family: 'Pacifico', 'Lucida Calligraphy', cursive;
    font-size: 48px;
    font-weight: 900;
    color: white;
}

/* =========================
   CUENTA REGRESIVA
========================= */
.count {
    font-family: 'Orbitron', monospace;
    font-size: 80px;
    font-weight: 1000;
    color: #ffcc00;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.7);
}

/* =========================
   ESCENA
========================= */
.scene {
	
	
	/*position: grid;*/
	 grid-template-rows: auto auto auto;
	
    display: flex;
   flex-direction: column;
    min-height: auto; /* permite que crezca según contenido */
    padding: 20px;
    z-index: 2;
    position: relative;
	 gap: 30px; /* espacio entre top, center y footer */
}



.top {
    text-align: center;
}

.subtitle {
    opacity: 0.85;
}

/* =========================
   CENTRO / CARDS
========================= */
.center {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.card {
    width: 220px;
    height: 280px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: 0.4s ease, box-shadow 0.4s ease;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(14px);
    box-shadow: 0 5px 16px rgba(0,0,0,0.4);
}

.card:hover {
    transform: translateY(-12px) scale(1.05);
    box-shadow: 0 0 15px gold, 0 0 40px #ffcc00;
}



.card img {
    width: 140px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}


.tree-card span,
.gift-card span,
.santa-card span {
    margin-top: 15px;
    color: gold;
    font-weight: 500;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
}



/* =========================
   ANIMACIONES
========================= */
@keyframes fadeUp {
    from {opacity: 0; transform: translateY(20px);}
    to {opacity: 1; transform: translateY(0);}
}

@keyframes bounce {
    0%,100% {transform: translateY(0);}
    50% {transform: translateY(-10px);}
}

@keyframes explode {
    0% {opacity: 1;}
    100% {opacity: 0;}
}

@keyframes boom {
    from { transform: scale(0); opacity: 1; }
    to { transform: scale(8); opacity: 0; }
}

/* =========================
   HIDDEN
========================= */
.hidden {
    display: none;
}

/* =========================
   CANVAS
========================= */
canvas {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* =========================
   NIEVE Y FUEGOS
========================= */
.fire {
    position: fixed;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, gold, red, transparent);
    border-radius: 50%;
    animation: boom 1s ease-out forwards;
    z-index: 5;
}

/* =========================
   IMÁGENES
========================= */
.tree {
    width: 200px;
    margin: 20px auto;
}

.gift-box img {
    width: 120px;
    cursor: pointer;
    animation: bounce 2s infinite;
}

#santa img {
    width: 150px;
    cursor: pointer;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 600px) {
    h1 {font-size: 28px;}
    h2 {font-size: 18px;}
    .tree {width: 150px;}
    .gift-box img {width: 90px;}
    #santa img {width: 110px;}
    #message {font-size: 18px;}
}


/* Contenedor de mensaje con efecto vidrio mejorado */
.message {
    max-width: 800px;
    padding: 25px 40px;
    font-size: 26px;
    line-height: 1.7;
    color: #FFF9D0;
    background: linear-gradient(145deg, 
        rgba(220, 20, 60, 0.25), 
        rgba(0, 100, 0, 0.25));
    backdrop-filter: blur(20px);
    border-radius: 25px;
    border: 2px solid rgba(255, 215, 0, 0.4);
    text-align: center;
    display: none;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.6),
        inset 0 0 30px rgba(255, 215, 0, 0.2);
    font-family: 'Pacifico', cursive;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(255, 215, 0, 0.4);
}

/* Efecto de brillo en los bordes */
.message::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        #ff0000, #ff9900, #ffff00, #00ff00, 
        #00ffff, #0000ff, #ff00ff, #ff0000);
    background-size: 400%;
    border-radius: 25px;
    z-index: -1;
    filter: blur(8px);
    opacity: 0.3;
    animation: glowing 20s linear infinite;
}

/* Estrellas decorativas alrededor del mensaje */
.message::after {
    content: '✦';
    position: absolute;
    font-size: 24px;
    color: gold;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    animation: twinkle 2s infinite alternate;
}

.message span.star-left,
.message span.star-right {
    position: absolute;
    font-size: 20px;
    color: gold;
    top: 50%;
    transform: translateY(-50%);
}

.message span.star-left {
    left: 15px;
    animation: spin 4s linear infinite;
}

.message span.star-right {
    right: 15px;
    animation: spin 4s linear infinite reverse;
}


/* =========================
   FOOTER MEJORADO
========================= */
.bottom {
    position: grid;
	 grid-template-rows: auto auto auto;
    z-index: 10;
    padding: 20px 30px;
    margin-top: 10px;
    display: none;
    justify-content: center;
    align-items: center;
    min-height: 20px;
    background: linear-gradient(180deg, 
        transparent 0%, 
        rgba(139, 0, 0, 0.4) 30%, 
        rgba(0, 100, 0, 0.5) 100%);
    border-top: 3px solid gold;
    border-radius: 30px 30px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);  
    animation: fadeUp 0.8s ease;
	
    font-family: 'Orbitron', sans-serif;
    font-size: 22px;
    color: #FFD700;
    padding: 25px 30px;
    border-radius: 20px;
    margin: 30px auto 40px auto;
    max-width: 1000px;
    text-align: center;
   
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 
        0 5px 25px rgba(0, 0, 0, 0.5),
        inset 0 0 20px rgba(255, 215, 0, 0.1);
   
    overflow: hidden;
	opacity: 0;
	transform: translateY(100%); /* Fuera de pantalla */
    transition: opacity 0.8s ease, transform 0.8s ease; /* Animación suave */
}

.bottom.show {
    display: block; /* Se muestra cuando tiene la clase 'show' */
    animation: slideUp 0.8s ease-out ;
}

/* Efecto de partículas doradas en el fondo del mensaje extra */
.bottom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 215, 0, 0.1) 2px, transparent 3px),
        radial-gradient(circle at 70% 80%, rgba(255, 215, 0, 0.1) 2px, transparent 3px),
        radial-gradient(circle at 40% 60%, rgba(255, 215, 0, 0.1) 2px, transparent 3px);
    background-size: 100px 100px;
    animation: floatBackground 20s linear infinite;
    z-index: -1;
}



@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animaciones nuevas */
@keyframes glowing {
    0% { background-position: 0 0; }
    50% { background-position: 400% 0; }
    100% { background-position: 0 0; }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: translateX(-50%) scale(0.8); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

@keyframes floatBackground {
    0% { background-position: 0 0, 0 0, 0 0; }
    100% { background-position: 100px 100px, -100px -100px, 50px -50px; }
}

/* Efecto de nieve sobre el footer */
.bottom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.1) 1px, transparent 2px),
        radial-gradient(circle at 90% 40%, rgba(255, 255, 255, 0.1) 1px, transparent 2px);
    background-size: 50px 50px;
    pointer-events: none;
}


/* Animación de entrada del mensaje */
@keyframes messageEntrance {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.message.fadeUp {
    animation: messageEntrance 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}


.countdown-finish {
    font-family: 'Pacifico', cursive;
    font-size: 64px;
    font-weight: 900;
    color: #faf8f0;
    text-shadow: 
        2px 2px 10px rgba(0,0,0,0.7),
        0 0 20px #FF4500,
        0 0 40px #FFD700;
    padding: 30px 50px;
    border-radius: 25px;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
    display: inline-block;
    animation: fadeInZoom 2s ease forwards;
}
@keyframes fadeInZoom {
    0% { opacity: 0; transform: scale(0.6); }
    50% { opacity: 1; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

.countdown-finish {
    animation: fadeInZoom 2s ease forwards, glowText 2s infinite alternate;
}

@keyframes glowText {
    0% { text-shadow: 2px 2px 10px rgba(255,215,0,0.7); }
    50% { text-shadow: 2px 2px 20px rgba(255,215,0,1); }
    100% { text-shadow: 2px 2px 10px rgba(255,215,0,0.7); }
}


/* Responsive */
@media (max-width: 768px) {
    .bottom {
        padding: 30px 15px;
        min-height: 150px;
        margin-top: 20px;
    }
    
    .message {
        font-size: 20px;
        padding: 20px;
        margin: 0 10px;
    }
    
    .bottom{
        font-size: 18px;
        padding: 20px;
        margin: 20px 15px 30px 15px;
    }
    
    .message::before {
        filter: blur(5px);
    }
}

@media (max-width: 480px) {
    .message {
        font-size: 18px;
        padding: 15px;
    }
    
    .bottom {
        font-size: 16px;
        padding: 15px;
    }
}
/* =========================
   ESTILOS PARA FUEGOS INTERACTIVOS
========================= */

/* Indicador visual de que se pueden hacer fuegos */
body::after {
    content: '✨ Haz clic en cualquier lugar para lanzar fuegos artificiales ✨';
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: gold;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 1000;
    opacity: 0.7;
    pointer-events: none;
    animation: pulseIndicator 2s infinite;
    display: none; /* Oculto por defecto, se muestra después de un tiempo */
}

@keyframes pulseIndicator {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Efecto de cursor especial cuando se puede hacer clic */
body.clickable-cursor {
    cursor: crosshair;
}

/* Efecto de onda cuando se hace clic */
.click-wave {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,215,0,0.8), transparent 70%);
    pointer-events: none;
    z-index: 999;
    animation: clickWave 0.6s ease-out forwards;
}

@keyframes clickWave {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(20);
        opacity: 0;
    }
}

/* Efecto visual para elementos que disparan fuegos */
.firework-trigger {
    position: relative;
    overflow: hidden;
}

.firework-trigger::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255,215,0,0.2), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.firework-trigger:hover::before {
    opacity: 1;
}
.count .days {
    color: #ffffff;
	text-shadow: 0 0 10px rgba(0,255,255,0.8);
}

.count .hours {
    color: #ffffff;   /* 🔵 Color especial para horas */
    text-shadow: 0 0 10px rgba(0,255,255,0.8);
}

.count .minutes {
    color: #ffffff;
	text-shadow: 0 0 10px rgba(0,255,255,0.8);
}

.count .seconds {
    color: #ffffff;
	text-shadow: 0 0 10px rgba(0,255,255,0.8);
}
@keyframes pulseHours {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.count .hours {
    animation: pulseHours 1s infinite;
}
