body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.contenedor {
    background-color: white;
    padding: 25px;
    width: 100%;
    max-width: 800px; 
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.grid-formulario {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

input, select {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button {
    background-color: #6c1c2c;
    color: white;
    padding: 12px;
    border: none;
    cursor: pointer;
    width: 100%;
    border-radius: 4px;
    font-size: 16px;
}

button:hover {
    background-color: #501521;
}

hr {
    margin: 30px 0px;
    border: 0px;
    border-top: 1px solid #dddddd;
}

ul {
    list-style-type: none;
    padding: 0px;
}

.libro-item {
    background: #f9f9f9;
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee; 
    gap: 20px;
    display: flex;
    align-items: center; 
    justify-content: center;
}

.libro-portada {
    width: 120px;
    height: 180px;
    object-fit: cover; 
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.libro-info {
   
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.libro-info h4 {
    margin: 0 0 10px 0;
    color: #333333;
    font-size: 18px;
}



.detalles {
    display: flex;
    flex-direction: column;
    gap: 8px; 
    margin: 15px 0;
    font-size: 14px;
    color: #555555;
    text-align: left; 
}

.acciones {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.btn-editar, .btn-borrar {
    width: auto;
    padding: 8px 15px;
    font-size: 14px;
}

.btn-editar { 
    background-color: #0056b3; 
}


.btn-editar:hover {
     background-color: #004494; 
}


.btn-borrar {
     background-color: #d9534f; 
}


.btn-borrar:hover {
     background-color: #c9302c;
}

/* Formato para dispositivos moviles */

@media (max-width: 600px) {
    body {
        padding: 10px; 
    }

    .contenedor {
        padding: 15px; 
        box-sizing: border-box; 
    }

    .grid-formulario {
        grid-template-columns: 1fr;
    }
 

     
    .libro-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }

    .libro-portada {
        width: 150px;
        height: 220px;
    }

    .acciones {
        flex-direction: column;
        width: 100%;
    }

    .btn-editar, .btn-borrar {
        width: 100%;
        padding: 12px; 
    }
}