body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #fff;
    margin: 0;
    /* Eliminamos 'display: flex' y 'align-items: center' para permitir el scroll */
    min-height: 100vh; /* Asegura que el fondo cubra toda la pantalla */
    position: relative;
    /* Esta es la línea que causaba el problema. La eliminamos.
    overflow: hidden; */
}

.background-animation {
    position: fixed; /* Cambiado a 'fixed' para que la animación se quede quieta al hacer scroll */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    background-size: 200% 200%;
    animation: gradient-animation 15s ease infinite;
    z-index: -1;
}

@keyframes gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    max-width: 900px;
    width: 100%;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    margin: 40px auto; /* Agregamos márgenes automáticos para centrar y dar espacio */
}

h1 {
    font-size: 2.8em;
    margin-bottom: 10px;
}

p {
    font-size: 1.1em;
    margin-bottom: 30px;
    font-weight: 300;
}

/* Estilo para el menú desplegable */
.dropdown-container {
    position: relative;
    width: 100%;
    margin-bottom: 30px;
    text-align: left;
}

#dropdown-button {
    width: 100%;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: #fff;
    font-size: 1.2em;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.3s ease;
}

#dropdown-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.genre-selector-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-top: 10px;
    padding: 10px;
    box-sizing: border-box;
    z-index: 10;
}

.genre-selector-dropdown.show {
    display: block;
}

.genre-selector-dropdown label {
    display: block;
    cursor: pointer;
    padding: 10px 15px;
    color: #333;
    font-size: 1em;
    transition: background-color 0.2s ease;
    border-radius: 5px;
}

.genre-selector-dropdown label:hover {
    background-color: #e0e0e0;
}

.genre-selector-dropdown input[type="checkbox"] {
    margin-right: 10px;
}

#recommend-button {
    width: 100%;
    padding: 15px;
    font-size: 1.2em;
    font-weight: bold;
    color: #fff;
    background-color: #28a745;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#recommend-button:hover {
    background-color: #218838;
}

.recommendations-container {
    margin-top: 40px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.book-card {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: #333;
}

.book-card h3 {
    margin-top: 0;
    color: #007bff;
    font-size: 1.5em;
}

.book-card p {
    margin: 5px 0;
    text-align: left;
    color: #555;
    font-weight: normal;
}

.book-card p strong {
    color: #333;
}
