/* Library Page Specific Styles */
.library-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 60px 0;
    border-radius: 30px;
    margin: 20px 0;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.library-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="books" patternUnits="userSpaceOnUse" width="20" height="20"><rect width="20" height="20" fill="none"/><rect x="2" y="5" width="3" height="12" fill="rgba(255,255,255,0.1)"/><rect x="6" y="3" width="3" height="14" fill="rgba(255,255,255,0.08)"/><rect x="10" y="4" width="3" height="13" fill="rgba(255,255,255,0.1)"/><rect x="14" y="2" width="3" height="15" fill="rgba(255,255,255,0.06)"/></pattern></defs><rect width="100" height="100" fill="url(%23books)"/></svg>') repeat;
    opacity: 0.3;
}

.hero-title {
    color: white;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero-subtitle {
    color: rgba(255,255,255,0.9);
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    margin-bottom: 0;
}

.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.feature-badge {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
}

.feature-badge:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.library-stats {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    border: 2px solid #f8f9fa;
}

.stat-card {
    text-align: center;
    padding: 20px;
    border-radius: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

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

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    color: #6c757d;
    font-weight: 600;
    font-size: 0.9rem;
}

.stat-icon {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.ebook-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.ebook-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.ebook-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    border-color: var(--secondary-color);
}

.ebook-card.enhanced {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e9ecef;
}

.ebook-card.enhanced:hover {
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.ebook-cover {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ebook-cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="pages" patternUnits="userSpaceOnUse" width="10" height="10"><rect width="10" height="10" fill="none"/><path d="M2,2 L8,2 L8,8 L2,8 Z" fill="rgba(255,255,255,0.1)" stroke="rgba(255,255,255,0.2)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23pages)"/></svg>') repeat;
    opacity: 0.3;
}

.ebook-icon {
    font-size: 4rem;
    color: white;
    z-index: 2;
    position: relative;
}

/* Enhanced eBook Card Features */
.lifetime-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.completion-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.9);
    color: var(--primary-color);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
}

.completion-badge.completed {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #b8860b;
}

.ebook-content {
    padding: 25px;
}

.ebook-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.ebook-price {
    text-align: right;
}

.current-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.original-price {
    font-size: 0.9rem;
    color: #6c757d;
    text-decoration: line-through;
    margin-left: 5px;
}

.ebook-stats {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid var(--secondary-color);
}

.stat-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: #495057;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-item i {
    width: 16px;
    margin-right: 8px;
    color: var(--secondary-color);
}

.progress-section {
    margin: 20px 0;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.progress-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
}

.progress-percentage {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-color);
}

.ebook-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 10px;
    line-height: 1.3;
}

.ebook-description {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.5;
}

.ebook-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.85rem;
}

.purchase-date {
    color: #28a745;
    font-weight: 600;
}

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

.progress-bar-container {
    background: #f8f9fa;
    border-radius: 10px;
    height: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.ebook-actions {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}

.btn-read {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-read::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: all 0.6s ease;
}

.btn-read:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    color: white;
}

.btn-read:hover::before {
    left: 100%;
}

.btn-download, .btn-share {
    background: #f8f9fa;
    color: var(--text-color);
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    border-radius: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-download:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--text-color);
    transform: translateY(-2px);
}

.btn-share:hover {
    background: #e3f2fd;
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    transform: translateY(-2px);
}

.empty-library {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    margin-top: 30px;
}

.empty-icon {
    font-size: 5rem;
    color: #e9ecef;
    margin-bottom: 20px;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 10px;
}

.empty-subtitle {
    color: #6c757d;
    margin-bottom: 30px;
}

.btn-browse {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-browse:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    color: white;
}

.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.skeleton-cover {
    height: 200px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.skeleton-content {
    padding: 25px;
}

.skeleton-line {
    height: 20px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 10px;
    margin-bottom: 15px;
}

.skeleton-line.short {
    width: 60%;
}

.skeleton-line.medium {
    width: 80%;
}

/* Filter and Search */
.library-controls {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.search-input {
    border: 2px solid #e9ecef;
    border-radius: 25px;
    padding: 12px 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(76, 210, 255, 0.25);
    outline: none;
}

.filter-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    color: var(--text-color);
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-right: 10px;
    margin-bottom: 10px;
}

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

.filter-btn:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

/* Logo Styling */
.logo img {
    width: 65px; 
    height: 65px; 
    border-radius: 50%; 
    border: 2px solid white; 
    box-shadow: 0 0 15px rgba(0,0,0,0.1); 
    object-fit: cover; 
    padding: 1px;
}

/* Taskbar Styling */
.taskbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(0.5rem, 1vw, 0.75rem) clamp(1rem, 2vw, 1.5rem);
    border-radius: clamp(0.5rem, 1vw, 0.75rem);
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 clamp(0.25rem, 0.5vw, 0.25rem) clamp(0.75rem, 1.5vw, 1rem) rgba(0,0,0,0.1);
    margin-bottom: clamp(1rem, 2vw, 1.5rem);
}

/* Right Taskbar Items Styling */
.right-taskbar {
    display: flex;
    align-items: center;
}

/* Cart Icon Styling */
.cart-icon {
    position: relative;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    font-size: 20px;
    margin-right: 15px;
}

.cart-container {
    position: relative;
    padding: 8px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.cart-icon:hover .cart-container {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--accent-color);
    color: var(--text-color);
    font-size: 12px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Login Button Styling */
.login-button {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--accent-color);
    color: var(--text-color);
    padding: 8px 15px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.login-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    background-color: #ffde5c;
}

.login-button i {
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ebook-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .library-stats {
        padding: 20px;
    }
    
    .stat-card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .library-controls {
        padding: 15px;
    }
    
    .filter-btn {
        margin-right: 5px;
        margin-bottom: 8px;
        padding: 8px 15px;
        font-size: 0.85rem;
    }
}
