:root {
    --primary-color: #972f55;
    --secondary-color: #f1c232;
    --text-color: #333;
    --background-color: #f9f9f9;
    --toremez-color: #69a243;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, #f9f9f9 0%, #f5f5f5 100%);
    background-attachment: fixed;
}

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

/* Modern Header Styles */
.modern-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #7a2644 100%);
    color: white;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

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

.logo-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    height: 80px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.title-section h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0;
    background: linear-gradient(45deg, #fff, var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-section .subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
    font-style: italic;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 14px;
}

.download-btn {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.download-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.download-btn svg {
    width: 18px;
    height: 18px;
}

.toremez-btn {
    background: var(--toremez-color);
    color: white;
    border: 2px solid transparent;
}

.toremez-btn:hover {
    background: #5a8234;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(105, 162, 67, 0.3);
}

.toremez-btn img {
    width: 20px;
    height: 20px;
}

/* Modern Search Navigation */
.search-nav {
    background: var(--secondary-color);
    padding: 15px 0;
    position: sticky;
    top: 134px;
    z-index: 99;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    fill: #666;
    pointer-events: none;
}

#search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid rgba(151, 47, 85, 0.1);
    border-radius: 25px;
    font-size: 16px;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

#search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(151, 47, 85, 0.2);
    transform: translateY(-2px);
}

main {
    padding: 30px 0 100px 0;
    min-height: calc(100vh - 200px);
}

/* Modern Content Sections */
.content-section {
    margin: 60px auto;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.content-section:nth-child(1) { animation-delay: 0.1s; }
.content-section:nth-child(2) { animation-delay: 0.2s; }
.content-section:nth-child(3) { animation-delay: 0.3s; }

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

.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(151, 47, 85, 0.05) 0%, rgba(241, 194, 50, 0.05) 100%);
    border-radius: 20px;
    border: 1px solid rgba(151, 47, 85, 0.1);
}

.section-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), #7a2644);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(151, 47, 85, 0.3);
}

.section-icon svg {
    width: 28px;
    height: 28px;
    fill: white;
}

.section-title h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin: 0;
    font-weight: 700;
}

.section-subtitle {
    color: #666;
    font-size: 1rem;
    margin: 5px 0 0 0;
    opacity: 0.8;
}

/* Expand/Collapse Button */
.expand-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary-color), #7a2644);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 auto 20px auto;
    font-size: 14px;
}

.expand-btn:hover {
    background: linear-gradient(135deg, #7a2644, var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(151, 47, 85, 0.3);
}

.expand-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.expand-btn svg.rotated {
    transform: rotate(180deg);
}

/* Modern Grid */
.content-grid {
    display: flex;
    overflow-x: auto;
    gap: 25px;
    padding: 10px 0 20px 0;
    scroll-snap-type: x mandatory;
}

.scrollable-grid {
    display: flex !important;
    overflow-x: auto;
    gap: 25px;
    padding: 10px 0 20px 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.scrollable-grid::after {
    content: '';
    position: absolute;
    top: 0;
    left: -10px;
    width: 20px;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0.8), transparent);
    pointer-events: none;
    z-index: 1;
}

.scroll-hint {
    text-align: center;
    margin: 5px 0;
    color: #6c757d;
    font-size: 14px;
    font-style: italic;
}

.scroll-hint span {
    background: rgba(108, 117, 125, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
}

/* Content Popup Styles */
.large-modal {
    max-width: 90vw;
    max-height: 90vh;
    width: 1200px;
}

.popup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 10px;
}

.popup-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
    animation: slideInCard 0.4s ease-out;
    opacity: 1;
}

.popup-card:hover {
    background: #f8f9fa;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(151, 47, 85, 0.1);
}

.popup-card-header h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 16px;
    line-height: 1.4;
}

.popup-card-meta {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 5px;
}

.popup-card-actions {
    margin-top: 12px;
    text-align: center;
}

.popup-view-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.popup-view-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

.popup-view-btn svg {
    width: 16px;
    height: 16px;
}

.modern-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(151, 47, 85, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex: 0 0 320px;
    scroll-snap-align: start;
}



.modern-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.modern-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(151, 47, 85, 0.15);
}

.modern-card:hover::before {
    transform: scaleX(1);
}

.card-header {
    margin-bottom: 20px;
}

.card-header h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.card-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--secondary-color), #d9ae2d);
    color: #333;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.card-date {
    color: #666;
    font-size: 0.9rem;
    background: #f5f5f5;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
}

.card-actions {
    display: flex;
    justify-content: flex-end;
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary-color), #7a2644);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.view-btn:hover {
    background: linear-gradient(135deg, #7a2644, var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(151, 47, 85, 0.3);
}

.view-btn svg {
    width: 16px;
    height: 16px;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #5d1c34;
}

/* Enhanced Content Viewer */
#content-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 45%;
    height: 100vh;
    background: white;
    box-shadow: 2px 0 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-100%);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    border-radius: 0 15px 15px 0;
    overflow: hidden;
}

#content-viewer.visible {
    transform: translateX(0);
}

#content-viewer.minimized {
    height: 60px;
    overflow: hidden;
}

/* Viewer Header */
.viewer-header {
    background: linear-gradient(135deg, var(--primary-color), #7a2644);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.viewer-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.viewer-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

#content-title {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.viewer-controls {
    display: flex;
    gap: 8px;
}

.viewer-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.viewer-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.viewer-btn svg {
    width: 16px;
    height: 16px;
}

/* Fix button visibility */
.viewer-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.viewer-btn {
    opacity: 1;
    visibility: visible;
}

/* Viewer Toolbar */
.viewer-toolbar {
    background: #f8f9fa;
    padding: 12px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.toolbar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: white;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

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

.toolbar-btn svg {
    width: 14px;
    height: 14px;
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: auto;
}

.zoom-level {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    min-width: 45px;
    text-align: center;
}

/* Viewer Content */
.viewer-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: #f8f9fa;
}

.viewer-content iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

/* Resize Handle */
.viewer-resize-handle {
    position: absolute;
    top: 0;
    right: -5px;
    width: 10px;
    height: 100%;
    cursor: ew-resize;
    background: transparent;
    z-index: 10;
}

.viewer-resize-handle:hover {
    background: rgba(151, 47, 85, 0.2);
}

/* Modern Footer */
footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, #7a2644 100%);
    color: white;
    text-align: center;
    padding: 25px 0;
    margin-top: 60px;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.1);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), #d9ae2d);
}

footer p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.9;
}

/* Autocomplete styles */
.autocomplete-items {
    position: absolute;
    border: 1px solid #d4d4d4;
    border-bottom: none;
    border-top: none;
    z-index: 99;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border-radius: 0 0 4px 4px;
    max-height: 300px;
    overflow-y: auto;
}

.autocomplete-items div {
    padding: 10px;
    cursor: pointer;
    background-color: #fff;
    border-bottom: 1px solid #d4d4d4;
}

.autocomplete-items div:hover {
    background-color: #e9e9e9;
}

.autocomplete-active {
    background-color: var(--primary-color) !important;
    color: #ffffff;
}

/* Video styles */
.video-wrapper {
    position: relative;
    width: 100%;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.video-wrapper iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
    border-radius: 4px;
    margin-bottom: 15px;
}

.video-details {
    padding: 15px;
    background: #f8f8f8;
    border-radius: 4px;
}

.video-details h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.video-date {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 8px;
}

.video-description {
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pulse animation for new content */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Slide in animation for cards */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modern-card {
    animation: slideInUp 0.6s ease forwards;
}

/* Stagger animation for grid items */
.modern-card:nth-child(1) { animation-delay: 0.1s; }
.modern-card:nth-child(2) { animation-delay: 0.2s; }
.modern-card:nth-child(3) { animation-delay: 0.3s; }
.modern-card:nth-child(4) { animation-delay: 0.4s; }
.modern-card:nth-child(5) { animation-delay: 0.5s; }
.modern-card:nth-child(6) { animation-delay: 0.6s; }

/* Scroll to top button */
.scroll-top {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(151, 47, 85, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: #7a2644;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(151, 47, 85, 0.4);
}

/* Download button */
#download-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 16px;
    background-color: var(--secondary-color);
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#download-btn:hover {
    background-color: #d9ae2d;
}

#download-btn img {
    width: 20px;
    height: 20px;
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal.visible {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transform: translateY(-20px);
    transition: transform 0.3s;
    border: 1px solid rgba(151, 47, 85, 0.1);
}

.modal.visible .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 30px;
    border-bottom: 1px solid rgba(151, 47, 85, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(151, 47, 85, 0.05) 0%, rgba(241, 194, 50, 0.05) 100%);
    border-radius: 20px 20px 0 0;
}

.modal-header h2 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
}

.close-modal {
    background: rgba(151, 47, 85, 0.1);
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--primary-color);
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-weight: bold;
}

/* Modal Filter Styles */
.modal-filter {
    padding: 20px 30px;
    border-bottom: 1px solid rgba(151, 47, 85, 0.1);
    background: rgba(151, 47, 85, 0.02);
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid rgba(151, 47, 85, 0.2);
    border-radius: 25px;
    font-size: 16px;
    background: white;
    color: var(--text-color);
    outline: none;
    transition: all 0.3s ease;
    text-align: right;
    direction: rtl;
}

.filter-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(151, 47, 85, 0.1);
    transform: translateY(-1px);
}

.filter-input::placeholder {
    color: rgba(151, 47, 85, 0.6);
    font-style: italic;
}

.clear-search-btn {
    background: rgba(151, 47, 85, 0.1);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary-color);
    transition: all 0.3s ease;
    padding: 0;
}

.clear-search-btn svg {
    width: 18px;
    height: 18px;
}

.clear-search-btn:hover {
    background: rgba(151, 47, 85, 0.2);
    transform: scale(1.1);
}

/* Search Results Info */
.search-results-info {
    padding: 10px 30px;
    background: rgba(105, 162, 67, 0.1);
    border-bottom: 1px solid rgba(105, 162, 67, 0.2);
    color: var(--toremez-color);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    animation: fadeInUp 0.3s ease;
}

/* No Results Styles */
.no-results {
    text-align: center;
    padding: 60px 30px;
    color: rgba(151, 47, 85, 0.7);
    animation: fadeInUp 0.5s ease;
}

.no-results-icon {
    margin: 0 auto 20px;
    width: 80px;
    height: 80px;
    background: rgba(151, 47, 85, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.no-results-icon svg {
    width: 40px;
    height: 40px;
}

.no-results h3 {
    font-size: 1.5rem;
    margin: 0 0 10px 0;
    color: var(--primary-color);
    font-weight: 600;
}

.no-results p {
    font-size: 1rem;
    margin: 0;
    opacity: 0.8;
}

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

@keyframes slideInCard {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close-modal:hover {
    background-color: var(--primary-color);
    color: white;
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

.download-options {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.download-section {
    background: linear-gradient(135deg, rgba(151, 47, 85, 0.03) 0%, rgba(241, 194, 50, 0.03) 100%);
    padding: 25px;
    border-radius: 16px;
    border: 1px solid rgba(151, 47, 85, 0.1);
    transition: all 0.3s ease;
}

.download-section:hover {
    border-color: rgba(151, 47, 85, 0.2);
    box-shadow: 0 4px 15px rgba(151, 47, 85, 0.08);
}

.download-section h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.download-section h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.date-range {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.date-range label {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    font-weight: 600;
    color: var(--primary-color);
}

.date-range input {
    padding: 12px;
    border: 2px solid rgba(151, 47, 85, 0.2);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.date-range input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(151, 47, 85, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    font-weight: 500;
}

.checkbox-label:hover {
    background-color: rgba(151, 47, 85, 0.05);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.books-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(151, 47, 85, 0.1);
}

.modal-footer {
    padding: 30px;
    border-top: 1px solid rgba(151, 47, 85, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    background: rgba(151, 47, 85, 0.02);
    border-radius: 0 0 20px 20px;
}

.modal-footer button {
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 14px;
}

.modal-footer button.secondary {
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.modal-footer button.secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(151, 47, 85, 0.3);
}

.modal-footer button.primary {
    background: linear-gradient(135deg, var(--primary-color), #7a2644);
    border: 2px solid transparent;
    color: white;
}

.modal-footer button.primary:hover {
    background: linear-gradient(135deg, #7a2644, var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(151, 47, 85, 0.4);
}

.modal-footer button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .section-header {
        padding: 15px;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .logo-section {
        flex-direction: column;
        gap: 15px;
    }
    
    .title-section h1 {
        font-size: 2rem;
    }
    
    .header-actions {
        flex-direction: row;
        gap: 12px;
    }
    
    .action-btn {
        padding: 10px 16px;
        font-size: 12px;
    }
    
    .search-nav {
        top: auto;
        position: relative;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .section-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .section-title h2 {
        font-size: 1.6rem;
    }
    
    #content-viewer {
        width: 100%;
        border-radius: 0;
    }

    .viewer-header {
        padding: 12px 15px;
    }

    #content-title {
        font-size: 14px;
    }

    .viewer-toolbar {
        padding: 10px 15px;
        flex-wrap: wrap;
    }

    .toolbar-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .zoom-controls {
        order: -1;
        width: 100%;
        justify-content: center;
        margin-bottom: 8px;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-footer {
        padding: 20px;
        flex-direction: column;
    }
    
    .date-range {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .title-section h1 {
        font-size: 1.8rem;
    }
    
    .header-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
    
    .modern-card {
        padding: 20px;
    }
    
    .section-header {
        padding: 15px;
    }
    
    .section-icon {
        width: 50px;
        height: 50px;
    }
    
    .section-icon svg {
        width: 24px;
        height: 24px;
    }
    
    main {
        padding: 20px 0 80px 0;
    }
    
    /* Better mobile scrolling */
    .scrollable-grid {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    .modern-card {
        flex: 0 0 280px;
    }
    
    .large-modal {
        max-width: 95vw;
        width: 95vw;
    }
    
    .popup-grid {
        grid-template-columns: 1fr;
        max-height: 70vh;
    }
}