:root {
    --primary-color: #1e293b;
    --secondary-color: #64748b;
    --accent-color: #0ea5e9;
    --text-color: #334155;
    --light-text: #94a3b8;
    --background-color: #f1f1ec;
    --card-background: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
        'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-serif: 'Georgia', Times, serif;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
}

/* Layout Structure */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: white;
    color: var(--secondary-color);
    width: 70px;
    position: fixed;
    height: 100vh;
    padding: 1.5rem 0;
    z-index: 100;
    border-right: 1px solid var(--border-color);
}

.sidebar .logo {
    color: var(--text-color);
    font-size: 1.5rem;
    margin-bottom: 3rem;
}

.nav-items {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.nav-items li a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 1.25rem;
    transition: color 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
}

.nav-items li.active a {
    color: var(--accent-color);
    background-color: #f8fafc;
}

.nav-items li a:hover {
    color: var(--accent-color);
}

.menu-toggle {
    margin-top: auto;
    font-size: 1.25rem;
    cursor: pointer;
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    margin-left: 70px;
    padding: 1.5rem 2rem;
    overflow-x: hidden;
    max-width: 1300px;
}

/* Top Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: var(--card-background);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    width: 350px;
    box-shadow: var(--shadow-sm);
}

.search-bar i {
    margin-right: 0.75rem;
    color: var(--secondary-color);
}

.search-bar input {
    border: none;
    background: transparent;
    font-size: 0.9rem;
    width: 100%;
    outline: none;
    color: var(--text-color);
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-profile img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.notifications {
    font-size: 1.25rem;
    color: var(--secondary-color);
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    gap: 2rem;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.hero-content p {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    max-width: 500px;
}

.cta-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s ease;
}

.cta-button:hover {
    background-color: #0f172a;
}

/* Author Feature Card */
.author-feature {
    background-color: var(--card-background);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    max-width: 450px;
    position: relative;
}

.author-options {
    position: absolute;
    top: 15px;
    right: 15px;
    color: var(--secondary-color);
    cursor: pointer;
}

.author-image img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.author-tag {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
}

.author-description {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.navigation-buttons {
    display: flex;
    gap: 0.5rem;
}

.navigation-buttons button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.navigation-buttons button:hover {
    background-color: #f8fafc;
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Book Carousel */
.book-carousel {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1rem 0;
    margin-bottom: 2rem;
    scroll-behavior: smooth;
}

.book-carousel::-webkit-scrollbar {
    height: 8px;
}

.book-carousel::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.book-carousel::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 10px;
}

.book-item {
    flex: 0 0 auto;
    width: 150px;
    text-align: center;
}

.book-item.featured {
    width: 180px;
}

.book-cover {
    margin-bottom: 0.75rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-cover:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.book-cover img {
    width: 100%;
    height: auto;
    display: block;
}

.book-item h3 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.book-item .publisher {
    font-size: 0.75rem;
    color: var(--secondary-color);
}

/* Collection Promo */
.collection-promo {
    background-color: var(--card-background);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.promo-icon {
    background-color: #f8fafc;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--accent-color);
}

.collection-promo p {
    flex-grow: 1;
}

.highlight {
    color: var(--accent-color);
    font-weight: 600;
}

.progress {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.progress span {
    font-weight: 600;
    color: var(--primary-color);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .hero-section {
        flex-direction: column;
    }
    
    .author-feature {
        max-width: none;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 1.25rem;
    }
    
    .search-bar {
        width: 250px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .sidebar {
        bottom: 0;
        width: 100%;
        height: auto;
        flex-direction: row;
        justify-content: space-around;
        padding: 0.75rem 0;
        position: fixed;
        top: auto;
    }
    
    .sidebar .logo,
    .menu-toggle {
        display: none;
    }
    
    .nav-items {
        flex-direction: row;
        gap: 1rem;
        width: 100%;
        justify-content: space-around;
    }
    
    .top-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .search-bar {
        width: 100%;
    }
}
.book-link {
    text-decoration: none;
    color: var(--text-color);
    display: block;
    transition: transform 0.2s ease;
}

.book-link:hover {
    transform: translateY(-5px);
}

/* Price display */
.price {
    display: block;
    font-weight: 600;
    color: var(--accent-color);
    margin-top: 5px;
    font-size: 0.9rem;
}

/* Overlay effect for book covers */
.book-cover {
    position: relative;
    overflow: hidden;
}

.book-overlay {
    position: absolute;
    bottom: -40px;
    left: 0;
    right: 0;
    background-color: rgba(30, 41, 59, 0.8);
    color: white;
    padding: 8px 0;
    text-align: center;
    transition: bottom 0.3s ease;
}

.book-link:hover .book-overlay {
    bottom: 0;
}

.buy-now {
    font-size: 0.85rem;
    font-weight: 600;
}

/* Collection promo link */
.promo-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-left: auto;
    transition: background-color 0.2s ease;
}

.promo-link:hover {
    background-color: #0f172a;
}

/* Updated collection promo layout for the link */
.collection-promo {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.collection-promo p {
    flex: 1;
    margin-right: 10px;
    margin-bottom: 0;
}

/* Optional: Affiliate notification popup */
.affiliate-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--accent-color);
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: var(--shadow-md);
    z-index: 1000;
    animation: fadeIn 0.3s, fadeOut 0.3s 2.7s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(20px); }
}
