/* Estilo general */
body {
    font-family: 'Courier New', Courier, monospace;
    background-color: #0d0d0d;
    color: #eeeeee;
    text-align: center;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
}

/* Encabezado */
h1 {
    color: #ff4c4c;
    font-size: 2.5em; /* Tamaño del texto grande */
    margin: 0.5em 0;
    text-shadow: 2px 2px 6px #660000;
    animation: flicker 2s infinite alternate;
}

/* Texto */
p {
    font-size: 1.2em;
    margin: 1em 2em;
    line-height: 1.6;
}

/* Botones */
a {
    display: inline-block;
    margin: 1em;
    padding: 10px 25px;
    background-color: #4c4c4c;
    color: #eeeeee;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.2em;
    transition: background-color 0.3s, transform 0.3s;
    box-shadow: 2px 2px 10px #ff4c4c;
}

a:hover {
    background-color: #ff4c4c;
    transform: scale(1.05);
    color: #0d0d0d;
}

/* Animación de parpadeo para h1 */
@keyframes flicker {
    0% { opacity: 1; }
    50% { opacity: 0.8; text-shadow: 2px 2px 12px #660000; }
    100% { opacity: 1; text-shadow: 2px 2px 6px #330000; }
}

/* Efecto de transición y fantasmas de fondo */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('./fantasma.jpg');
    background-size: cover; /* Cubre toda la pantalla */
    background-position: center; /* Centra la imagen de fondo */
    background-attachment: fixed;
    opacity: 0.2;
    z-index: -1;
    animation: ghostBackground 15s infinite alternate;
}

/* Animación lenta para el fondo */
@keyframes ghostBackground {
    0% { opacity: 0.2; }
    50% { opacity: 0.3; }
    100% { opacity: 0.2; }
}

/* Media Queries para Responsividad */
@media (max-width: 600px) {
    h1 {
        font-size: 1.8em; /* Tamaño más pequeño para móviles */
    }
    
    p {
        font-size: 1em; /* Tamaño del texto más pequeño para móviles */
        margin: 1em 1em; /* Reducir los márgenes */
    }

    a {
        padding: 10px 20px; /* Ajustar el tamaño de los botones */
        font-size: 1em; /* Reducir el tamaño de fuente de los botones */
    }

    body::before {
        background-attachment: scroll; /* Cambia a scroll en pantallas pequeñas */
    }
}

@media (max-width: 400px) {
    h1 {
        font-size: 1.5em; /* Tamaño aún más pequeño */
    }

    a {
        padding: 10px 15px; /* Ajustar el tamaño de los botones en pantallas muy pequeñas */
        font-size: 0.9em; /* Tamaño de fuente más pequeño */
    }
}
