/* Modernized styling for the Books Overview web app */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    padding: 20px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e0e0e0;
    line-height: 1.6;
}

h1 {
    text-align: center;
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    background: #2a2a3e;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #3a3a4e;
}

th {
    background: #3b3b5e;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

th:hover {
    background: #4a4a7e;
}

tr {
    transition: background 0.2s ease;
}

tr:nth-child(even) {
    background: #32324e;
}

tr:hover {
    background: #4a4a7e;
}

/* Sortable header arrows */
.sortable::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 8px;
    vertical-align: middle;
}

.sorted-asc::after {
    content: '↑';
}

.sorted-desc::after {
    content: '↓';
}

/* Filter input styling */
.filter-container {
    max-width: 500px;
    margin: 0 auto 20px;
}

#filterInput {
    width: 100%;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    background: #3a3a4e;
    color: #e0e0e0;
    font-size: 1rem;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

#filterInput::placeholder {
    color: #a0a0b0;
}

#filterInput:focus {
    outline: none;
    background: #4a4a7e;
    box-shadow: 0 0 8px rgba(138, 43, 226, 0.5);
}

/* Button container styling */
.button-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

/* Library button styling */
.library-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    background: #3a3a4e;
    color: #e0e0e0;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.library-btn:hover {
    background: #8a2be2;
    transform: translateY(-2px);
}

.library-btn.active {
    background: #8a2be2;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.7);
}

/* Responsive design */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    th, td {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .library-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    #filterInput {
        font-size: 0.9rem;
    }
}
