/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 100%;
    padding: 15px;
    margin: auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 15px;
    color: #444;
}

h2{
    margin-top: 50px;
}

.hx_link {
    cursor: pointer;
}

p {
    margin-bottom: 15px;
}

a {
    color: #3498db;
    text-decoration: none;
}

ul {
    list-style: none;
    margin-bottom: 20px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: .25em .4em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: .25rem;
    transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
    position: relative;
    top: -20px;
}
.badge-danger {
    color: #fff;
    background-color: #dc3545;
}

/* Buttons */
button, .btn {
    display: inline-block;
    padding: 10px 18px;
    font-size: 16px;
    color: #fff;
    background-color: orange;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    margin: 0 5px;
}

button:hover, .btn:hover {
    background-color: #c57f00;
}

/* Forms */
form {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    display: flex;
    flex-direction: column; 
    text-align: center;
}

form h2 {
    margin-bottom: 20px;
}

form label {
    display: block;
    margin-bottom: 5px;
    color: #666;
}

form input[type="file"],
form input[type="text"],
form input[type="date"],
form input[type="number"],
form input[type="email"],
form input[type="password"],
form button,
form textarea,
form select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Navigation */
nav {
    background: #333;
    color: #fff;
    padding: 15px;
    text-align: center;
}

nav a {
    color: #fff;
    margin: 0 10px;
    text-decoration: none;
}

nav a:hover, nav a.current {
    color: orange;
}

/* Cards */
.card {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin: 20px auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.library .card {
    max-width: 75%;
}

.card img {
    max-width: 80%;
    margin: 0 auto;
}

.card h3 {
    margin-top: 15px;
}

.card p {
    width: 80%;
    margin: 15px auto;
}

/* Layout */
.library {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.library .book {
    max-width: 95%;
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
}

.library .book button {
    margin-top: auto;
}

div.edit {
    position: absolute;
}

/* Media Queries */
@media (min-width: 600px) {
    .container {
        width: 95%;
    }

    nav {
        display: flex;
        justify-content: space-around;
    }

    .library {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .library .book {
        max-width: 48%;
        flex: 1 1 40%;
    }
    
    button, .btn {
        margin: 0 2px;
        padding: 10px 15px;
    }
}

@media (min-width: 900px) {
    .library .book {
        max-width: 33%;
        flex: 1 1 30%;
    }
}

@media (min-width: 1200px) {
    .library .book {
        max-width: 24%;
        flex: 1 1 22%;
    }
}

@media (min-width: 1600px) {
    .library .book {
        max-width: 19%;
        flex: 1 1 19%;
    }
}

@media (min-width: 2000px) {
    .library .book {
        max-width: 15%;
        flex: 1 1 15%;
    }
}

form hr {
    margin: 25px auto;
    width: 50%;
    color: #ddd;
}