/* NOOR Biomedical PDF Library - Complete CSS */

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(26, 35, 126, 0.2);
    background: linear-gradient(135deg, #283593 0%, #3949ab 100%);
}

.btn-outline {
    background: transparent;
    border: 2px solid #1a237e;
    color: #1a237e;
}

.btn-outline:hover {
    background: #1a237e;
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* ===== TOP BAR ===== */
.top-bar {
    background: #1a237e;
    color: white;
    padding: 10px 0;
    font-size: 0.9rem;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    color: white;
    font-size: 1rem;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: #bbdefb;
}

.contact-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.contact-info span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ===== NAVIGATION ===== */
.navbar {
    background: white;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #1a237e;
}

.logo-icon {
    font-size: 2rem;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1a237e, #3949ab);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: #475569;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #1a237e;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1a237e, #3949ab);
    border-radius: 2px;
}

.search-bar {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.search-bar:focus-within {
    border-color: #1a237e;
}

.search-bar input {
    padding: 10px 15px;
    border: none;
    background: transparent;
    min-width: 250px;
    outline: none;
}

.search-bar button {
    padding: 10px 15px;
    background: #1a237e;
    color: white;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #1a237e;
    cursor: pointer;
    padding: 5px;
}

/* ===== MOBILE MENU ===== */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 2000;
    padding: 100px 20px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mobile-menu.active {
    display: block;
    transform: translateX(0);
}

.mobile-menu .nav-links {
    flex-direction: column;
    gap: 20px;
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
}

.mobile-overlay.active {
    display: block;
}

/* ===== HERO SECTION WITH BACKGROUND IMAGE ===== */
.pdf-library-hero {
    background: linear-gradient(135deg, rgba(26, 35, 126, 0.9), rgba(39, 49, 155, 0.9));
    color: white;
    padding: 120px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('https://images.unsplash.com/photo-1559757148-5c350d0d3c56?ixlib=rb-4.0.3&auto=format&fit=crop&w=1600&q=80');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.2;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 40px;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #64b5f6, #bbdefb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

.stat-label {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

/* ===== LIBRARY CONTROLS ===== */
.library-controls {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-top: -50px;
    position: relative;
    z-index: 100;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.search-section {
    margin-bottom: 30px;
}

.search-bar.large {
    display: flex;
}

.search-bar.large input {
    flex: 1;
    padding: 18px 25px;
    font-size: 1rem;
    min-width: auto;
    border: 2px solid #e2e8f0;
    border-right: none;
    border-radius: 10px 0 0 10px;
}

.search-bar.large .btn {
    border-radius: 0 10px 10px 0;
    padding: 18px 35px;
    border: 2px solid #1a237e;
    border-left: none;
}

.filters-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.filter-group label {
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
}

.filter-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 22px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    white-space: nowrap;
}

.filter-btn.active,
.filter-btn:hover {
    background: #1a237e;
    color: white;
    border-color: #1a237e;
}

.sort-select {
    padding: 10px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    min-width: 180px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.sort-select:focus {
    border-color: #1a237e;
    outline: none;
}

/* ===== QUICK CATEGORIES ===== */
.quick-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin: 50px 0;
}

.category-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.category-card:hover {
    transform: translateY(-10px);
    border-color: #1a237e;
    box-shadow: 0 15px 40px rgba(26, 35, 126, 0.1);
}

.category-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #1a237e, #3949ab);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 1.8rem;
}

.category-card h3 {
    margin-bottom: 10px;
    color: #1e293b;
    font-size: 1.3rem;
}

.category-card p {
    color: #64748b;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.category-card .count {
    display: inline-block;
    background: #eef2ff;
    color: #1a237e;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ===== PDF GRID SECTION ===== */
.pdf-grid-section {
    margin: 50px 0;
}

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

.section-header h2 {
    font-size: 2.2rem;
    color: #1e293b;
}

.view-options {
    display: flex;
    gap: 10px;
    background: #f1f5f9;
    padding: 5px;
    border-radius: 10px;
}

.view-btn {
    width: 45px;
    height: 45px;
    border: none;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    color: #64748b;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn.active {
    background: #1a237e;
    color: white;
}

.pdf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* List View Styles */
.pdf-grid.list-view {
    grid-template-columns: 1fr;
}

.pdf-grid.list-view .pdf-card {
    display: flex;
    min-height: 250px;
}

.pdf-grid.list-view .pdf-thumbnail {
    width: 250px;
    height: auto;
    border-radius: 15px 0 0 15px;
    flex-shrink: 0;
}

.pdf-grid.list-view .pdf-content {
    flex: 1;
}

/* PDF Card Styles */
.pdf-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s;
    position: relative;
}

.pdf-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.pdf-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pdf-badge.new {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
}

.pdf-badge.popular {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
}

.pdf-thumbnail {
    height: 220px;
    position: relative;
    overflow: hidden;
}

.pdf-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.pdf-card:hover .pdf-thumbnail img {
    transform: scale(1.05);
}

.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.pdf-thumbnail:hover .thumbnail-overlay {
    opacity: 1;
}

.quick-preview {
    width: 50px;
    height: 50px;
    background: white;
    border: none;
    border-radius: 50%;
    color: #1a237e;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-preview:hover {
    transform: scale(1.1);
}

.pdf-content {
    padding: 25px;
}

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

.pdf-header h3 {
    font-size: 1.3rem;
    color: #1e293b;
    line-height: 1.4;
    flex: 1;
    margin: 0;
}

.favorite-btn {
    background: none;
    border: none;
    color: #cbd5e1;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}

.favorite-btn:hover {
    background: rgba(244, 63, 94, 0.1);
    color: #f43f5e;
}

.favorite-btn.active {
    color: #f43f5e;
}

.pdf-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    color: #64748b;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.author, .file-size {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pdf-description {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdf-grid.list-view .pdf-description {
    -webkit-line-clamp: 2;
}

.pdf-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.pdf-tag {
    background: #f1f5f9;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    color: #475569;
}

.pdf-stats {
    display: flex;
    gap: 25px;
    margin-bottom: 25px;
    color: #64748b;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.pdf-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pdf-actions {
    display: flex;
    gap: 12px;
}

.pdf-actions .btn {
    flex: 1;
    padding: 12px;
    font-size: 0.9rem;
    justify-content: center;
}

.preview-btn {
    background: #eef2ff;
    color: #1a237e;
}

.preview-btn:hover {
    background: #e0e7ff;
}

/* No Results Styling */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #64748b;
}

.no-results i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #cbd5e1;
}

.no-results h3 {
    margin-bottom: 10px;
    color: #334155;
    font-size: 1.5rem;
}

/* ===== LOAD MORE SECTION ===== */
.load-more-section {
    text-align: center;
    margin: 50px 0;
}

.load-more-btn {
    padding: 15px 40px;
    background: white;
    border: 2px solid #1a237e;
    color: #1a237e;
    font-size: 1.1rem;
}

.load-more-btn:hover {
    background: #1a237e;
    color: white;
}

/* ===== RECENT DOWNLOADS ===== */
.recent-section {
    margin: 50px 0;
    padding: 40px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.recent-section h2 {
    margin-bottom: 30px;
    color: #1e293b;
    font-size: 2rem;
}

.recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.recent-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.recent-item:hover {
    transform: translateY(-5px);
}

.recent-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #1a237e, #3949ab);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.recent-info {
    flex: 1;
}

.recent-info h4 {
    margin-bottom: 5px;
    color: #1e293b;
    font-size: 1.1rem;
}

.recent-info p {
    color: #64748b;
    font-size: 0.9rem;
}

.no-recent {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #64748b;
}

.no-recent i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #cbd5e1;
}

/* ===== UPLOAD SECTION ===== */
.upload-section {
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
    color: white;
    padding: 60px;
    border-radius: 20px;
    text-align: center;
    margin: 50px 0;
    position: relative;
    overflow: hidden;
}

.upload-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><path fill="rgba(255,255,255,0.05)" d="M0,0V600H1200V0ZM200,400L400,200,600,400,800,200,1000,400"/></svg>');
    opacity: 0.1;
}

.upload-content {
    position: relative;
    z-index: 1;
}

.upload-content h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.upload-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.upload-features {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.1);
    padding: 15px 25px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.feature i {
    font-size: 1.5rem;
}

.upload-btn {
    background: white;
    color: #1a237e;
    padding: 18px 45px;
    font-size: 1.1rem;
    border: none;
}

.upload-btn:hover {
    background: #f8fafc;
    transform: translateY(-2px);
}

/* ===== FOOTER ===== */
footer {
    background: #0f172a;
    color: white;
    padding: 60px 0 30px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #e2e8f0;
}

.footer-column p {
    color: #94a3b8;
    line-height: 1.8;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a,
.footer-links li {
    color: #94a3b8;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #334155;
    color: #94a3b8;
    font-size: 0.9rem;
}

.copyright a {
    color: #cbd5e1;
    text-decoration: none;
}

.copyright a:hover {
    text-decoration: underline;
}

.copyright-note {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #334155;
    font-size: 0.9rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* ===== PDF PREVIEW MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    width: 95%;
    max-width: 1100px;
    border-radius: 20px;
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
}

.modal-header {
    background: linear-gradient(135deg, #1a237e, #3949ab);
    color: white;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.modal-header h3 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
    color: white;
    text-shadow: none;
    opacity: 1;
    visibility: visible;
}

.close-modal {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    line-height: 1;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    background: #ffffff;
}

.preview-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    min-height: 500px;
}

/* Left Column - Image and Stats */
.preview-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.preview-image-container {
    background: #f8fafc;
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    height: 350px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    display: block;
    opacity: 1;
    visibility: visible;
}

.preview-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    gap: 10px;
    z-index: 5;
}

.category-badge, .date-badge {
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    text-shadow: none;
    opacity: 1;
    visibility: visible;
    display: block;
}

.category-badge {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
}

.date-badge {
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

/* Stats Section */
.preview-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    background: #f8fafc;
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #e2e8f0;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-item i {
    font-size: 1.5rem;
    color: #1a237e;
    width: 45px;
    height: 45px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 4px;
    opacity: 1;
    visibility: visible;
}

.stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
    opacity: 1;
    visibility: visible;
}

/* Right Column - Book Details */
.preview-right {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.preview-header h2 {
    font-size: 1.8rem;
    color: #1e293b;
    margin-bottom: 15px;
    line-height: 1.3;
    font-weight: 700;
    opacity: 1;
    visibility: visible;
    display: block;
    text-shadow: none;
}

.preview-meta {
    display: flex;
    gap: 25px;
    color: #64748b;
    font-size: 1rem;
    opacity: 1;
    visibility: visible;
    flex-wrap: wrap;
}

.author-meta, .size-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 1;
    visibility: visible;
}

.author-meta i {
    color: #4CAF50;
    font-size: 1.1rem;
}

.size-meta i {
    color: #FF9800;
    font-size: 1.1rem;
}

/* Description Section */
.preview-section {
    background: #f8fafc;
    padding: 25px;
    border-radius: 15px;
    border: 2px solid #e2e8f0;
}

.preview-section h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1a237e;
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    font-weight: 600;
    opacity: 1;
    visibility: visible;
}

.preview-section h4 i {
    font-size: 1.1rem;
    opacity: 1;
    visibility: visible;
}

.preview-description {
    line-height: 1.7;
    color: #475569;
    font-size: 1rem;
    max-height: 150px;
    overflow-y: auto;
    padding-right: 10px;
    opacity: 1;
    visibility: visible;
    display: block;
}

.preview-description::-webkit-scrollbar {
    width: 6px;
}

.preview-description::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 10px;
}

.preview-description::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 10px;
}

/* Tags Section */
.preview-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    opacity: 1;
    visibility: visible;
}

.preview-tags .tag {
    background: linear-gradient(135deg, #7986cb, #5c6bc0);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 1;
    visibility: visible;
    display: inline-block;
}

/* Action Buttons */
.preview-actions {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    opacity: 1;
    visibility: visible;
}

.preview-actions .btn {
    flex: 1;
    padding: 18px 25px;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    opacity: 1;
    visibility: visible;
}

.tool-btn {
    background: linear-gradient(135deg, #1a237e, #3949ab);
    color: white;
}

.tool-btn:hover {
    background: linear-gradient(135deg, #283593, #3949ab);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(26, 35, 126, 0.3);
}

.tutorial-btn {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    color: #1a237e;
    border: 2px solid #cbd5e1;
}

.tutorial-btn:hover {
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    transform: translateY(-3px);
}

/* ===== IMAGE ZOOM MODAL - FIXED ===== */
.image-zoom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.image-zoom-modal.active {
    display: flex !important;
}

.image-zoom-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#zoomedImage {
    max-width: 85vw;
    max-height: 70vh;
    object-fit: contain;
    transition: transform 0.3s ease;
    cursor: move;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
}

.zoom-controls {
    display: flex !important;
    align-items: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.7);
    padding: 12px 25px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    visibility: visible !important;
    opacity: 1 !important;
}

.zoom-controls button {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex !important;
    align-items: center;
    justify-content: center;
    visibility: visible !important;
    opacity: 1 !important;
}

.zoom-controls button:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

#zoomLevel {
    color: white;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
    font-size: 1rem;
    visibility: visible !important;
    opacity: 1 !important;
}

.close-zoom {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10001;
    visibility: visible !important;
    opacity: 1 !important;
}

.close-zoom:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

/* ===== UPLOAD MODAL ===== */
.upload-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.upload-modal.active {
    display: flex;
}

.upload-modal-content {
    background: white;
    width: 100%;
    max-width: 600px;
    border-radius: 20px;
    overflow: hidden;
    max-height: 90vh;
    overflow-y: auto;
}

.upload-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: linear-gradient(135deg, #1a237e, #283593);
    color: white;
}

.upload-modal-header h3 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.close-upload-modal {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.close-upload-modal:hover {
    background: rgba(255,255,255,0.2);
}

.upload-modal-body {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #334155;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    font-family: 'Inter', sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #1a237e;
    outline: none;
}

.upload-modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.upload-modal-actions .btn {
    flex: 1;
    justify-content: center;
}

/* ===== NOTIFICATION STYLES ===== */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    color: white;
    z-index: 5000;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 350px;
}

.notification.success {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
}

.notification.error {
    background: linear-gradient(135deg, #f44336, #d32f2f);
}

.notification.warning {
    background: linear-gradient(135deg, #FF9800, #F57C00);
}

.notification.info {
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1100px) {
    .preview-grid {
        grid-template-columns: 300px 1fr;
        gap: 25px;
    }
}

@media (max-width: 900px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .search-bar input {
        min-width: 200px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        gap: 30px;
    }
    
    .stat-number {
        font-size: 2.2rem;
    }
    
    .filters-section {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .preview-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .preview-image-container {
        height: 300px;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .preview-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pdf-grid.list-view .pdf-card {
        flex-direction: column;
        min-height: auto;
    }
    
    .pdf-grid.list-view .pdf-thumbnail {
        width: 100%;
        height: 200px;
        border-radius: 15px 15px 0 0;
    }
    
    .upload-section {
        padding: 40px 25px;
    }
    
    .upload-content h2 {
        font-size: 2rem;
    }
    
    .upload-features {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .feature {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .zoom-controls {
        flex-wrap: wrap;
        justify-content: center;
        width: 90%;
        padding: 10px;
        gap: 12px;
    }
    
    .zoom-controls button {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    #zoomLevel {
        min-width: 50px;
        font-size: 0.9rem;
    }
    
    .close-zoom {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
        top: 10px;
        right: 10px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .preview-header h2 {
        font-size: 1.6rem;
    }
    
    .preview-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .preview-stats {
        grid-template-columns: 1fr;
    }
    
    .preview-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .top-bar-content {
        justify-content: center;
    }
    
    .contact-info {
        display: none;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .search-bar.large {
        flex-direction: column;
    }
    
    .search-bar.large input {
        border-radius: 10px 10px 0 0;
        border-right: 2px solid #e2e8f0;
    }
    
    .search-bar.large .btn {
        border-radius: 0 0 10px 10px;
        border: 2px solid #1a237e;
        border-top: none;
    }
    
    .pdf-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .pdf-actions {
        flex-direction: column;
    }
    
    .upload-modal-content {
        margin: 10px;
    }
    
    .preview-image-container {
        height: 250px;
        padding: 15px;
    }
    
    .preview-header h2 {
        font-size: 1.4rem;
    }
    
    .preview-section h4 {
        font-size: 1.1rem;
    }
    
    .preview-actions .btn {
        padding: 15px 20px;
        font-size: 1rem;
    }
    
    .zoom-controls {
        padding: 8px 15px;
        gap: 10px;
    }
    
    #zoomedImage {
        max-width: 95vw;
        max-height: 60vh;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.pdf-card {
    animation: fadeIn 0.5s ease forwards;
}

.image-zoom-modal.active .image-zoom-content {
    animation: zoomIn 0.3s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
/* ===== FIXED ZOOM CONTROLS ===== */
.image-zoom-modal.active .zoom-controls {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.zoom-controls {
    display: flex !important;
    align-items: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.8);
    padding: 12px 25px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 15px;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 10001;
}

.zoom-controls button {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex !important;
    align-items: center;
    justify-content: center;
    visibility: visible !important;
    opacity: 1 !important;
}

.zoom-controls button:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

#zoomLevel {
    color: white;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
    font-size: 1rem;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Test Zoom Button */
.test-zoom-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    padding: 12px 20px;
    background: linear-gradient(135deg, #1a237e, #3949ab);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.test-zoom-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

/* Fix for Load More Button */
.load-more-btn {
    display: block !important;
    margin: 30px auto !important;
}

/* Fix for Upload Button */
.upload-btn {
    cursor: pointer !important;
}

/* Fix modal close button */
.close-modal, .close-zoom, .close-upload-modal {
    cursor: pointer !important;
}

/* Ensure buttons are clickable */
.btn, button {
    cursor: pointer !important;
    pointer-events: auto !important;
}