:root {
    --bg-body: #f9fafb;
    --bg-card: #ffffff;
    --bg-review: #f9fafb;
    --bg-hover: #f3f4f6;
    --text-heading: #1f2937;
    --text-body: #4b5563;
    --text-muted: #6b7280;
    --text-review: #374151;
    --accent: #3b82f6;
    --accent-secondary: #10b981;
    --accent-text: #3b82f6;
    --accent-bg: rgba(59,130,246,0.1);
    --header-text: #3b82f6;
    --star-filled: #eab308;
    --star-unfilled: #d1d5db;
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-radius-xl: 0.75rem;
    --border-radius-lg: 0.5rem;
    --border-radius-full: 9999px;
}

:root.dark {
    --bg-body: #1e293b;
    --bg-card: #1e293b;
    --bg-review: #334155;
    --bg-hover: #334155;
    --text-heading: #ffffff;
    --text-body: #d1d5db;
    --text-muted: #9ca3af;
    --text-review: #d1d5db;
    --accent-text: #10b981;
    --header-text: #ffffff;
    --star-unfilled: #6b7280;
}

body {
    background-color: var(--bg-body);
    min-height: 100vh;
}

.main-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.page-header {
    margin-bottom: 3rem;
    text-align: center;
}

.page-header h1 {
    font-size: 2.25rem;
    font-weight: bold;
    color: var(--header-text);
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-body);
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .books-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .books-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.book-card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.card-hover {
    transition: var(--transition);
    transform: translateY(0);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.book-cover {
    height: 12rem;
    overflow: hidden;
}

.book-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-content {
    padding: 1.5rem;
}

.book-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.book-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-heading);
}

.genre-tag {
    font-size: 0.75rem;
    background-color: var(--accent-bg);
    color: var(--accent-text);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-full);
}

.author {
    font-size: 0.875rem;
    color: var(--text-body);
    margin-bottom: 0.25rem;
}

.rating {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.rating-value {
    margin-left: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.book-details {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.review-section {
    background-color: var(--bg-review);
    padding: 1rem;
    border-radius: var(--border-radius-lg);
    margin-bottom: 1rem;
}

.review-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
}

.review-text {
    font-size: 0.875rem;
    color: var(--text-review);
}

.review-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.review-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.book-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.details-btn {
    font-size: 0.75rem;
    color: var(--accent-text);
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.details-btn:hover {
    text-decoration: underline;
}

.edit-delete {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: var(--border-radius-full);
    color: var(--text-muted);
    cursor: pointer;
}

.action-btn:hover {
    background-color: var(--bg-hover);
}