/* --- 1. Importación de Google Font (Usamos Impact como fuente de contraste) --- */
@import url('https://fonts.googleapis.com/css2?family=Impact&display=swap'); 

/* --- VARIABLES (Necesarias para el estilo Neón y el banner) --- */
:root {
    --neon-pink: #ff00ff;
    --neon-green: #00ff00;
    --bg-color: #1e0034;
}

/* --- Base y Fondo --- */
body {
    background-color: #1e0034;
    color: white;
    /* APLICAMOS FUENTE IMPACT A TODO EL BODY */ 
    font-family: 'Impact', fantasy, sans-serif;
    margin: 0;
    overflow: hidden; 
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.christmas-scene {
    width: 100%;
    height: 100%;
    position: relative;
    text-align: center;
}

/* --- Títulos --- */
.greeting {
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.greeting h1 {
    font-size: 2.5em;
    color: #ffcc00; 
    margin: 0;
}

.greeting h2 {
    font-size: 1.5em;
    color: white;
    margin: 5px 0 0 0;
}

/* --- Árbol de Palabras (POSICIÓN FINAL CORRECTA) --- */
#word-tree-container {
    position: absolute;
    bottom: 30%; /* ALINEADO: La base del árbol se sitúa en 30% */
    left: 50%;
    transform: translateX(-50%);
    width: 95%; 
    max-width: 650px; 
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- TRONCO DEL ÁRBOL (MARRÓN MODERNO Y POSICIÓN CORRECTA) --- */
.tree-trunk {
    position: absolute;
    bottom: 29%; /* AJUSTE CLAVE: Se sitúa justo debajo del contenedor (30%) */
    left: 50%;
    transform: translateX(-50%);
    width: 80px; /* Ancho robusto */
    height: 40px; /* Altura controlada */
    
    background-color: #4a3424; /* Marrón muy oscuro */
    border: 1px solid #6d4f3b; /* Borde de madera oscura */
    border-radius: 5px; /* Bordes suaves */
    
    /* Efecto de sombra para el estilo Cyber/Neón */
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8), 
                0 0 5px var(--neon-green), 0 0 15px var(--neon-green); 
    
    z-index: 4; 
}

/* Pseudo-elemento para textura del tronco */
.tree-trunk::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* Textura de rayas oscuras */
    background: repeating-linear-gradient(
        45deg,
        #4a3424,
        #4a3424 5px,
        #5e4433 5px,
        #5e4433 10px
    ); 
    opacity: 0.3;
}

/* --- ICONO DE ÁRBOL BAJO EL TRONCO (NUEVA CLASE) --- */
.mini-tree-icon {
    position: absolute;
    bottom: 27%; /* Se sitúa bajo el tronco (29%) */
    left: 50%;
    transform: translateX(-50%);
    z-index: 4; 
    font-size: 1.5em; 
    
    /* Efecto de luz sutil */
    text-shadow: 0 0 5px var(--neon-green), 0 0 10px var(--neon-green);
}

.tree-row {
    /* MÁS ESPACIO ENTRE FILAS */
    margin: 6px 0;
    width: auto; 
    white-space: nowrap; 
}

.tree-word {
    /* TAMAÑO Y FUENTE NUEVOS */
    font-size: 1.3em;
    font-weight: bold;
    display: inline-block;
    /* MÁS ESPACIO ENTRE PALABRAS */
    padding: 0 5px; 
    
    /* COLORES VIVOS Y ALTERNANTES */
    color: var(--tree-color, #ff0000); /* Rojo Neón por defecto */
    text-shadow: 0 0 7px var(--tree-color, #ff0000), 0 0 12px var(--tree-color, #ff0000); 
    
    transition: transform 0.3s ease;
    line-height: 1.2;
}

/* Aplicar un color alternativo: Verde Neón */
.tree-word:nth-child(odd) {
    --tree-color: #00ff00; 
    text-shadow: 0 0 7px #00ff00, 0 0 12px #00ff00;
}
/* Aplicar un color alternativo: Azul Claro Neón */
.tree-word:nth-child(4n) {
    --tree-color: #00ffff;
    text-shadow: 0 0 7px #00ffff, 0 0 12px #00ffff;
}

/* Estrella en la cima */
.star {
    font-size: 3.5em; 
    color: gold;
    text-shadow: 0 0 15px gold, 0 0 30px yellow;
    animation: pulse 1.5s infinite alternate;
}

/* Base del árbol (la última línea de nombres/palabras) */
.tree-base {
    margin-top: 25px; 
}

.base-message {
    font-size: 1.6em; 
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.2); 
    border-radius: 8px;
    color: #00ff00; 
    text-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00;
}

/* --- Suelo, Santa, Elfos y Renos (Tus referencias locales se mantienen) --- */
.ground {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100px; 
    background: linear-gradient(to top, #331a40, #1e0034); 
    border-top: 5px solid white;
}

.santa-figure {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background-image: url('icons8-papá-noel-64.png'); 
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 15;
}

/* Estilos base para los personajes en movimiento */
.moving-characters > div {
    position: absolute;
    bottom: 5px;
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 12;
}

/* ELFO 1 */
.elf-1 {
    width: 40px;
    height: 40px;
    background-image: url('icons8-regalos-64.png'); 
    left: -10%; 
    animation: walk-right 18s linear infinite;
}

/* RENO 1 */
.reindeer-1 {
    width: 60px;
    height: 60px;
    background-image: url('icons8-reyes-64.png'); 
    right: -10%; 
    transform: scaleX(-1); 
    animation: walk-left 25s linear infinite;
    animation-delay: 5s; 
}

/* ELFO 2 */
.elf-2 {
    width: 40px;
    height: 40px;
    background-image: url('icons8-papá-noel-64.png'); 
    left: -10%; 
    animation: walk-right 30s linear infinite;
    animation-delay: 10s; 
}

/* --- ESTRELLA FUGAZ (Se mantiene) --- */
.shooting-star-container {
    position: absolute; 
    top: 2%; 
    left: -50px; 
    z-index: 30; 
    animation: shootAcross 15s linear infinite; 
    animation-delay: 3s; 
}

.shooting-star {
    font-size: 2.5em; 
    display: block;
    color: yellow;
    text-shadow: 0 0 10px yellow, 0 0 20px rgba(255, 255, 0, 0.7);
    transform: rotate(30deg); 
}

/* --- BANNER DE BIENVENIDA SEPARADO (POSICIÓN AJUSTADA) --- */
.welcome-banner {
    position: absolute;
    bottom: 20%; /* Ajustado: Lo subimos un poco para que flote sobre el suelo */
    left: 50%;
    transform: translateX(-50%);
    z-index: 15; 
    
    /* Estilo Neón para el Banner (El resto se mantiene igual) */
    font-family: 'Major Mono Display', monospace;
    font-size: 1.5em; 
    padding: 10px 20px;
    color: var(--neon-pink);
    border: 2px solid var(--neon-pink);
    background-color: rgba(255, 0, 255, 0.1); 
    box-shadow: 0 0 10px var(--neon-pink), 0 0 20px var(--neon-pink);
    
    animation: pulse 2s infinite alternate; 
}

/* --- Trineo Volador (Estrella de Belén voladora) --- */
.sleigh-ride {
    position: absolute;
    top: 10%;
    left: -20%;
    z-index: 20;
    animation: flyAcross 20s linear infinite;
}

.sleigh {
    width: 150px;
    height: auto;
    transform: rotate(0deg); 
}

/* --- Keyframes (Animaciones) --- */

@keyframes shootAcross {
    0% {
        transform: translate(0, 0);
        opacity: 0;
    } 1% {
        opacity: 1;
    }
    50% {
        transform: translate(calc(100vw + 100px), 100px); 
        opacity: 1;
    }
    50.01% {
        opacity: 0; 
        transform: translate(-100vw, 0); 
    }
    100% {
        opacity: 0;
    }
}

@keyframes walk-right {
    0% {
        transform: translateX(0);
        left: -10%; 
    }
    100% {
        transform: translateX(0);
        left: 110%; 
    }
}

@keyframes walk-left {
    0% {
        transform: scaleX(-1) translateX(0); 
        right: -10%;
    }
    100% {
        transform: scaleX(-1) translateX(0);
        right: 110%; 
    }
}

@keyframes flyAcross {
    0% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(calc(100vw + 20%), 50px); 
    }
    50.01% {
        opacity: 0;
        transform: translate(calc(-100% - 20%), 0);
    }
    100% {
        opacity: 1;
        transform: translate(0, 0);
    }
}

@keyframes pulse {
    from {
        opacity: 0.8;
    }
    to {
        opacity: 1;
        transform: scale(1.1);
    }
}

@keyframes fall {
    0% {
        transform: translateY(-10vh);
    }
    100% {
        transform: translateY(100vh);
    }
}
.santa-flying {
    position: absolute;
    top: 45%;
    left: -300px;
    width: 260px;
    z-index: 5;
    animation: santaFly 18s linear infinite;
}

.santa-flying img {
    width: 100%;
    animation: santaFloat 3s ease-in-out infinite;
}

/* Vuelo horizontal */
@keyframes santaFly {
    0% {
        left: -300px;
        transform: scale(0.9);
    }
    50% {
        transform: scale(1);
    }
    100% {
        left: 110%;
        transform: scale(0.9);
    }
}

/* Balanceo suave */
@keyframes santaFloat {
    0%, 100% {
        transform: translateY(0) rotate(1deg);
    }
    50% {
        transform: translateY(-15px) rotate(-1deg);
    }
}
