body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(to bottom, #8fcfff, #ffffff);
    overflow-x: hidden;
}

#game-container {
    text-align: center;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    background: #fff;
    min-height: 100vh; /* Asegura que el contenedor abarque toda la altura de la ventana */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Mantiene el contenido centrado y el footer visible */
}

header {
    margin-bottom: 20px;
}

#instructions {
    margin: 0 auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 90%;
}

#game-area-container {
    margin: 20px auto;
}

#game-area {
    position: relative;
    width: 90%;
    max-width: 800px;
    height: 500px;
    background-color: #f0f8ff;
    border: 3px solid #b22222;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 10px;
}

#character {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: url('./images/elf.png') no-repeat center/contain;
    animation: bounce 1s infinite alternate;
}

#falling-items {
    position: relative;
    width: 100%;
    height: 100%;
}

#index-btn {
    background-color: #22b246;
    color: white;
    padding-top: 15px;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 18px;
    transition: background-color 0.3s, transform 0.3s;
    border-radius: 5px;
}

#start-btn {
    background-color: #b22222;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 18px;
    transition: background-color 0.3s, transform 0.3s;
    border-radius: 5px;
}

#start-btn:hover {
    background-color: #ff6347;
    transform: scale(1.1);
}

#score {
    font-size: 32px;
    color: #b22222;
    margin-top: 10px;
    font-weight: bold;
}

/* Estilo base para los objetos que caen */
.item {
    position: absolute;
    width: 50px;
    height: 50px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.gift {
    background: url('./images/gift.png') no-repeat center/contain;
}

.trash {
    background: url('./images/trash.png') no-repeat center/contain;
}

header h1 {
    font-size: 2.5rem;
    color: #b22222;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 20px;
}

section h2 {
    font-size: 2rem;
    color: #b22222;
    margin-bottom: 10px;
}

section p, section li {
    font-size: 1rem;
    color: #555;
}

ol {
    padding-left: 20px;
    text-align: left;
}

footer {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    padding: 10px 0;
    background: #f9f9f9;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
}
#back-btn {
    display: inline-block;
    background-color: #007bff; /* Azul para el botón */
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    left: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s, transform 0.3s;
    z-index: 10;
}

#back-btn:hover {
    background-color: #0056b3;
    transform: scale(1.1);
}



/* Responsividad */
@media (max-width: 768px) {
    #game-area {
        width: 100%;
        height: 400px;
    }

    #character {
        width: 40px;
        height: 40px;
    }

    .item {
        width: 40px;
        height: 40px;
    }

    #start-btn {
        font-size: 16px;
        padding: 8px 16px;
    }

    #score {
        font-size: 20px;
    }
}

/* Animación del personaje */
@keyframes bounce {
    from {
        transform: translateX(-50%) translateY(0);
    }
    to {
        transform: translateX(-50%) translateY(-10px);
    }
}
