* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    display:flex;
    flex-direction:column;
    align-items: center;
    gap: 1rem;
    background-color: #0B0F19;
    color: #9CA3AF;
}

.Titulo {
    font-weight: bold;
    color: #F3F4F6;
}
.header {
    display: flex;
    align-items: center;            
    background-color: #161F30;      
    padding: 10px 20px;             
    height: 5rem;                   
    width: 100%;
    position: relative;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;                      
    flex: 1;    
}

.header-center {
    flex: 2;
    display: flex;
    justify-content: center;
}

.header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.scroll {
    display:flex;
    flex-direction:column;
    overflow:hidden;
    height: 500px;
}

.info-libro {
    padding: 1rem;
    border-radius: 1rem;
    border: 2px solid black;
    background-color: #161F30;
}

.categoria-tag, .autor {
    margin:0.5rem 0 
}

.btn-leer {
    padding: 0.5rem;
    border-radius: 0.5rem;
    background-color: #3B82F6;
    color: white;
    border: none;
    cursor: pointer;
}

.btn-info {
    padding: 0.5rem;
    border-radius: 0.5rem;
    color: white;
    border: none;
    cursor: pointer;
}

.logo{
    height: 3rem;
    width: auto;
}

/* --- ADAPTACIÓN RESPONSIVA PARA CELULARES --- */
@media (max-width: 480px) {
    .header {
        flex-direction: column;
        height: auto; /* Quitamos la altura fija de 5rem para que no se desborde */
        padding: 15px;
        gap: 15px; /* Crea espacio vertical entre el logo, el input y el botón */
    }

    .header-left, .header-center, .header-right {
        flex: none; /* Rompemos el sistema de columnas rígidas */
        width: 100%;
        justify-content: center; /* Centramos todo en el eje móvil */
        text-align: center;
    }

    /* Estilizamos el buscador para que se vea genial en móvil */
    .header-center input[type="text"] {
        width: 100%;
        max-width: 320px; /* Evita que se estire demasiado en pantallas intermedias */
        padding: 10px 15px;
        border-radius: 8px;
        border: 1px solid #1F2937;
        background-color: #0B0F19; /* Fondo más oscuro para contrastar con el header */
        color: #F3F4F6;
        font-size: 16px; /* Evita que iOS haga un zoom-in automático molesto */
        outline: none;
    }

    .header-center input[type="text"]:focus {
        border-color: #3B82F6; /* Brillo azul al escribir */
    }

    
}