/* Basic CSS for the Library System */

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

body {
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    background-color: #f5f5f5;
}

header {
    background-color: #2c5f8a;
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

header h1 a {
    color: white;
    text-decoration: none;
    font-size: 1.4em;
}

nav a {
    color: white;
    text-decoration: none;
    margin-left: 15px;
    font-size: 0.95em;
}

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

main {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
}

h2 {
    margin-bottom: 20px;
    color: #2c5f8a;
}

h3 {
    margin-bottom: 10px;
    color: #444;
}

/* Messages */
.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    margin-bottom: 20px;
}

table th,
table td {
    padding: 10px 12px;
    border: 1px solid #ddd;
    text-align: left;
}

table th {
    background-color: #2c5f8a;
    color: white;
}

table tr:nth-child(even) {
    background-color: #f9f9f9;
}

table tr:hover {
    background-color: #eef4fa;
}

/* Forms */
form {
    background-color: white;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-width: 500px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
}

textarea {
    height: 80px;
    resize: vertical;
}

/* Buttons */
button,
input[type="submit"],
.btn {
    background-color: #2c5f8a;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    text-decoration: none;
    display: inline-block;
}

button:hover,
input[type="submit"]:hover,
.btn:hover {
    background-color: #1e4466;
}

.btn-danger {
    background-color: #c0392b;
}

.btn-danger:hover {
    background-color: #922b21;
}

.btn-success {
    background-color: #27ae60;
}

.btn-success:hover {
    background-color: #1e8449;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 13px;
}

/* Cards */
.card {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px 20px;
    margin-bottom: 15px;
}

/* Category list on homepage */
.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    list-style: none;
}

.category-item {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px 20px;
    min-width: 180px;
    text-align: center;
}

.category-item strong {
    display: block;
    font-size: 1.1em;
    color: #2c5f8a;
    margin-bottom: 5px;
}

.category-item span {
    color: #666;
    font-size: 0.9em;
}

/* Stars */
.stars {
    color: #f39c12;
    font-size: 1.2em;
}

footer {
    text-align: center;
    padding: 20px;
    color: #888;
    font-size: 0.9em;
    margin-top: 40px;
    border-top: 1px solid #ddd;
}

a {
    color: #2c5f8a;
}

a:hover {
    color: #1e4466;
}

.actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.page-links {
    margin-bottom: 15px;
}

.page-links a {
    margin-right: 10px;
}
