body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

header {
    position: relative;
    text-align: center;
    color: white;
    overflow: hidden; /* Garante que a imagem não ultrapasse o cabeçalho */
}

header img {
    width: 100%;
    height: auto;
    max-height: 340px; /* Define uma altura máxima para a imagem */
    object-fit: cover; /* Garante que a imagem cubra o espaço sem distorcer */
}

header label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2em;
    font-weight: bold;
}

#lista_livros {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    padding: 20px;
}

.livro {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin: 10px;
    padding: 20px;
    width: 200px;
    text-align: center;
}

.livro img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.selecao_livro {
    background-color: #007BFF;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
}

.informacoes_livro {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5; /* Limita a 5 linhas */
    overflow: hidden;
    text-overflow: ellipsis; /* Adiciona "..." no final */
    line-height: 1.5; /* Espaçamento entre linhas */
    max-height: 7.5em; /* Aproximadamente 5 linhas (1.5em por linha) */
}

footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 20px;
}

.whatsapp-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: transparent;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    display: none;
}

.whatsapp-button img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.social-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 5px;
    border-radius: 50%;
}

footer a {
    color: white;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}




/* Estilos da Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    padding: 20px; /* Espaçamento para telas pequenas */
    box-sizing: border-box; /* Garante que o padding não aumente o tamanho total */
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    border: 4px solid green;
    max-width: 500px;
    width: 100%; /* Ocupa 100% da largura disponível */
    text-align: center;
    position: relative;
    overflow-y: auto; /* Adiciona scroll se o conteúdo for muito grande */
    max-height: 90vh; /* Limita a altura máxima para 90% da altura da tela */
}

.modal-content img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    max-height: 300px; /* Limita a altura da imagem */
    object-fit: contain; /* Garante que a imagem não distorça */
}

.modal-content h2 {
    font-size: 1.5em;
    margin: 15px 0;
}

.modal-content p {
    font-size: 1em;
    margin: 10px 0;
}

.close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

.close:hover {
    color: #000;
}




/* Janela interativa */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 1001; /* Garante que fique acima de tudo */
}

.alert-box {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.5s ease-in-out;
}

.alert-box p {
    font-size: 1.2em;
    margin-bottom: 20px;
}

.alert-box button {
    background-color: #25D366;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    animation: pulse 2s infinite;
}

.alert-box button:hover {
    background-color: #128C7E;
}

/* Animação de fade-in */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animação de pulsação */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}



/* Ajustes para telas pequenas (celulares) */
@media (max-width: 600px) {
    .modal-content {
        padding: 15px;
        max-width: 90%; /* Reduz a largura máxima em telas pequenas */
    }

    .modal-content img {
        max-height: 200px; /* Reduz a altura máxima da imagem em telas pequenas */
    }

    .modal-content h2 {
        font-size: 1.2em;
    }

    .modal-content p {
        font-size: 0.9em;
    }
}