:root {
    /* Color variables */
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;

    /* Background colors */
    --body-bg: #f8f9fa;
    --card-bg: #ffffff;
    --navbar-bg: #ffffff;
    --table-header-bg: #f8f9fa;

    /* Text colors */
    --text-color: #212529;
    --text-muted: #6c757d;

    /* Font variables */
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-size-base: 1rem;
    --font-weight-normal: 400;
    --font-weight-bold: 600;

    /* Border and shadow */
    --border-radius: 0.375rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);

    /* Banner */
    --banner-bg: url('');
    --banner-height: 200px;
}

/* Custom styles */

body {
    background-color: var(--body-bg);
    font-family: var(--font-family);
    color: var(--text-color);
    padding-top: 0px;
}

.card {
    transition: transform 0.2s;
    margin-bottom: 1rem;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.card:hover {
    transform: none;
    box-shadow: none;
}

.card-title {
    font-weight: var(--font-weight-bold);
}

.card-title i {
    margin-right: 8px;
    color: var(--primary-color);
}

.alert {
    border-radius: var(--border-radius);
}

.navbar {
    margin-bottom: 20px;
    background-color: var(--navbar-bg);
}

/* Form styles */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* Table styles */
.table {
    margin-bottom: 2rem;
}

.table th {
    background-color: var(--table-header-bg);
    font-weight: var(--font-weight-bold);
}

/* Tag cloud styles */
.tag-cloud .badge {
    display: inline-block;
    margin: 2px;
    font-size: 0.8em;
}

.tag-size-1 { font-size: 0.8em; }
.tag-size-2 { font-size: 1em; }
.tag-size-3 { font-size: 1.2em; }
.tag-size-4 { font-size: 1.4em; }
.tag-size-5 { font-size: 1.6em; }

/* Banner styles */
.banner {
    background-image: var(--banner-bg);
    background-size: cover;
    background-position: center;
    height: var(--banner-height);
    margin-bottom: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1.5rem;
    }
}

/* Wishlist styles */
.wishlist-grid,
.want_to_read-list,
.browse-grid,
.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.wishlist-item,
.want_to_read-item,
.browse-item,
.story-item {
    height: 100%;
}

.wishlist-item .card-header,
.want_to_read-item .card-header {
    background-color: var(--table-header-bg);
    padding: 0.75rem 1rem;
}

.wishlist-item .card-header h3,
.want_to_read-item .card-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.wishlist-item .card-body,
.want_to_read-item .card-body,
.browse-item .card-body,
.story-item .card-body {
    padding: 1rem;
}

.wishlist-item .card-footer,
.want_to_read-item .card-footer {
    background-color: var(--table-header-bg);
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.wishlist-item.in-wishlist,
.want_to_read-item.in-list,
.browse-item.in-wishlist,
.story-item.in-list {
    border: 2px solid var(--success-color);
}

.wishlist-item .notes,
.want_to_read-item .notes {
    margin-bottom: 1rem;
    padding: 0.5rem;
    background-color: var(--table-header-bg);
    border-radius: var(--border-radius);
}

.story-thumb {
    max-width: 100%;
    height: auto;
    margin-bottom: 0.5rem;
    border-radius: var(--border-radius);
}

.description {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.update-form,
.delete-form {
    margin-top: 0.5rem;
}

.actions-bar {
    margin-bottom: 1rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    background-color: var(--table-header-bg);
    border-radius: var(--border-radius);
}

.empty-state p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.badge-success {
    background-color: var(--success-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    display: inline-block;
    margin-bottom: 0.5rem;
}

/* Want to Read Card Styles */
.want-to-read-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.want-to-read-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.want-to-read-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    max-height: 2.8rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.want-to-read-image-container {
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
    overflow: hidden;
}

.want-to-read-card.read-item {
    opacity: 0.8;
}