body { 
    margin: 0; 
    overflow: hidden; 
    position: relative; 
}
canvas { 
    display: block; 
}

#background {
    position: absolute; /* Para que las imágenes se posicionen dentro del contenedor */
    top: -10%;
    transition: opacity 1s ease-in-out; /* 1-second fade effect */
    z-index: 1;
    width: 100%;
}
#footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    pointer-events: none; /* Makes sure footer doesn't interfere with mouse events */
    z-index: 2;
}
#footer img {
    max-width: 100%; /* Responsive image */
    height: auto;
}

#typewriter, #typewriter2 {
    color: white;
    position: absolute;
    white-space: pre-wrap; /* Allows the text to wrap and expand the height */
    overflow: visible; /* Ensures the element can grow with the content */
    width: auto; /* Make the width dynamic based on content */
    border-right: 2px solid black;
    animation: blink-caret 0.75s step-end infinite;
    background-image: url('/webassets/imgs/game/bubble_robot.png');
    background-position: center;
    background-size: contain; /* Scales the background image to fit within the element */
    background-repeat: no-repeat;
    padding: 30px;
    box-sizing: border-box;
    font-family: 'Raleway';
    min-width: 100px;
    font-weight: 800;
    background-size: 100% 100%;
    padding-top: 40px;
    transition: opacity 1s ease-in-out; /* 1-second fade effect */
    z-index: 3;
}

#error {
    position: absolute; /* Para que las imágenes se posicionen dentro del contenedor */
    bottom: 15%;
    left: 11%;
    transition: opacity 1s ease-in-out; /* 1-second fade effect */
    z-index: 3;
}

#error-img1 {
    display: none;
}
#error-img2 {
    display: none;
}

#hint_image {
    opacity: 0;
    position: absolute;
    bottom: 10%;
    left: 11%;
    width: 200px;
    transition: opacity 1s ease-in-out;
    z-index: 3;
}
/* Imagen fija (al frente) */
#fixedImage {
    z-index: 3;
}

/* Imagen parpadeante (está al fondo)  */
#blinkingImage {
    z-index: 2;
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: black; }
}
#astronaut {
    opacity: 0;
    position: absolute;
    bottom: 15px;
    z-index: 3;
    width: 160px;
    left: 140px;
    transition: opacity 1s ease-in-out; /* 1-second fade effect */
}
#robot {
    position: absolute;
    bottom: 15px;
    z-index: 3;
    width: 230px;
    right: 35px;
}

#checkButton {
    position: absolute;
    bottom: 60px;
    left: 66%;
    transform: translateX(-50%);
    background-color: transparent;
    border: none;
    color: transparent;
    width: 8%;
    height: 6%;
    cursor: pointer !important;
    z-index: 10;
}

#hintButton {
    position: absolute;
    bottom: 60px;
    left: 76%;
    transform: translateX(-50%);
    background-color: transparent;
    border: none;
    color: transparent;
    width: 8%;
    height: 6%;
    cursor: pointer !important;
    z-index: 10;
}
