:root {
    --primary: #DDBB8A;
    --primary-hover: #CFAA75;
    --primary-glow: #EBCFA8;
    --text-main: #1F2937;
    --text-light: #6B7280;
    --bg-page: #F3F4F6;
    --bg-card: #FFFFFF;
    --border: #E5E7EB;
    --container-width: 1200px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.6;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.lib-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
    margin-bottom: 40px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.lib-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lib-logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lib-logo span {
    color: var(--primary);
}

/* Search */
.lib-search {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    position: relative;
}

.lib-search input {
    width: 100%;
    padding: 15px 25px;
    border: 2px solid var(--border);
    border-radius: 50px;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.lib-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

/* Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

/* Card */
.book-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-color: var(--primary);
}

.book-cover {
    height: 200px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

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

.book-icon {
    font-size: 48px;
    color: var(--text-light);
    opacity: 0.5;
}

.book-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.book-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-meta {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 15px;
}

.book-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.tag {
    background: var(--primary-glow);
    color: #5c4016;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* Book Page Specific */
.book-detail-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    background: var(--bg-card);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.book-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--text-main);
}

.btn-outline:hover {
    background: var(--primary-glow);
}

.book-content {
    font-size: 16px;
    color: var(--text-main);
}

.book-content h1 {
    font-size: 32px;
    margin-bottom: 20px;
}

.book-description {
    margin-bottom: 30px;
    line-height: 1.8;
}

.tech-specs {
    background: var(--bg-page);
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
}

.tech-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.tech-row:last-child {
    border-bottom: none;
}

@media (max-width: 768px) {
    .book-detail-layout {
        grid-template-columns: 1fr;
    }
    
    .book-cover {
        height: 250px;
    }
}

