/* Custom scrollbar for the sidebar */
.sidebar-scroll::-webkit-scrollbar {
    width: 6px;
}

.sidebar-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.3);
    border-radius: 3px;
}

.sidebar-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.5);
}

/* Dark mode scrollbar */
.dark .sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(75, 85, 99, 0.3);
}

.dark .sidebar-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(75, 85, 99, 0.5);
}

/* Firefox scrollbar */
.sidebar-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(156, 163, 175, 0.3) transparent;
}

.dark .sidebar-scroll {
    scrollbar-color: rgba(75, 85, 99, 0.3) transparent;
}

/* Fix search input text color in dark mode */
.dark #globalSearch {
    color: #f3f4f6 !important;
}

.dark #globalSearch::placeholder {
    color: #9ca3af !important;
}

/* Ensure search input text is visible in both modes */
#globalSearch {
    color: #111827;
}

#globalSearch::placeholder {
    color: #6b7280;
}

/* Fix mobile search input text color in dark mode */
.dark #mobileSearchInput {
    color: #f3f4f6 !important;
}

.dark #mobileSearchInput::placeholder {
    color: #9ca3af !important;
}

/* Ensure mobile search input text is visible in both modes */
#mobileSearchInput {
    color: #111827;
}

#mobileSearchInput::placeholder {
    color: #6b7280;
}

/* Ensure feed mode selector is visible in both light and dark modes */
#feed-mode-menu {
    backdrop-filter: blur(8px);
}

/* Ensure proper text contrast for the sort button */
#feed-mode-menu-btn {
    color: #374151; /* text-gray-700 */
}

.dark #feed-mode-menu-btn {
    color: #f3f4f6; /* text-gray-100 */
}

/* Ensure dropdown text is readable */
#feed-mode-menu button {
    color: #374151; /* text-gray-700 */
}

.dark #feed-mode-menu button {
    color: #e5e7eb; /* text-gray-200 */
}

/* New Project Modal Styles */
#new-project-modal {
    animation: modalFadeIn 0.3s ease-out;
}

#new-project-modal .bg-white {
    animation: modalSlideIn 0.3s ease-out;
}

/* File upload area hover effects */
#new-project-modal .border-dashed:hover {
    transform: scale(1.02);
    transition: transform 0.2s ease;
}

/* Form input focus states */
#new-project-modal input:focus,
#new-project-modal textarea:focus,
#new-project-modal select:focus {
    transform: translateY(-1px);
    transition: transform 0.2s ease;
}

/* Button hover effects */
#new-project-modal button:hover {
    transform: translateY(-1px);
    transition: transform 0.2s ease;
}

/* Video preview styling */
#video-preview .bg-gray-100 { transition: all 0.2s ease; }
#video-preview .bg-gray-100:hover { background-color: #f3f4f6; transform: translateY(-1px); }
.dark #video-preview .bg-gray-800:hover { background-color: #374151; }

/* File upload hover effects */
#new-project-modal .border-dashed:hover { border-color: #10b981; }
.dark #new-project-modal .border-dashed:hover { border-color: #34d399; }

/* Tools Autocomplete Styles */
#tools-autocomplete {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.dark #tools-autocomplete {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}
.tool-suggestion.active {
    background-color: #f3f4f6;
}
.dark .tool-suggestion.active {
    background-color: #374151;
}
.tool-chip {
    animation: fadeInScale 0.2s ease-out;
}
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}
.float-animation {
    animation: float 6s ease-in-out infinite;
}
.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}
.dark .shimmer {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200px 100%;
}
.project-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.project-card:hover {
    /* Removed elevation effect - keeping subtle shadow only */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Enhanced Engagement section styling with subtle divider */
.project-card .engagement-section {
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    border-top: 1px solid rgba(226, 232, 240, 0.6);
    padding: 0.875rem 1rem;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.dark .project-card .engagement-section {
    background: linear-gradient(135deg, #1e293b 0%, #1e3a8a 100%);
    border-top: 1px solid rgba(71, 85, 105, 0.4);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Very subtle hover effect for engagement section */
.project-card:hover .engagement-section {
    border-top-color: rgba(203, 213, 224, 0.7);
}

.dark .project-card:hover .engagement-section {
    border-top-color: rgba(100, 116, 139, 0.5);
}

/* Enhanced Engagement buttons with better visibility */
.engagement-section button {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    transition: all 0.2s ease;
}

.dark .engagement-section button {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.engagement-section button:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 1);
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dark .engagement-section button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Behance/Dribbble Style Modal */
#project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#project-modal.hidden {
    display: none !important;
}

#project-modal.show {
    opacity: 1;
    visibility: visible;
}

#project-modal-content {
    background: white;
    border-radius: 0;
    max-width: 100vw;
    max-height: 100vh;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark #project-modal-content {
    background: #1f2937;
}

#project-modal.show #project-modal-content {
    transform: scale(1);
}

/* Modal Header - Behance Style */
.modal-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 100;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.dark .modal-header {
    background: rgba(31, 41, 55, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header.hidden {
    transform: translateY(-100%);
}

.modal-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.modal-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
}

@media (max-width: 768px) {
    .modal-close-btn {
        width: 48px;
        height: 48px;
        background: rgba(0, 0, 0, 0.15);
    }
}

.dark .modal-close-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.modal-close-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

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

.modal-action-btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: white;
    color: #333;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dark .modal-action-btn {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #374151;
    color: #fff;
}

.modal-action-btn:hover {
    background: #f8f9fa;
    border-color: rgba(0, 0, 0, 0.2);
}

.dark .modal-action-btn:hover {
    background: #4b5563;
    border-color: rgba(255, 255, 255, 0.2);
}

.modal-action-btn.primary {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.modal-action-btn.primary:hover {
    background: #0056b3;
    border-color: #0056b3;
}

/* Iframe Container */
.modal-iframe-container {
    width: 100%;
    height: 100%;
    position: relative;
    min-height: 500px;
    flex: 1;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

.modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
    flex: 1;
    min-height: 0;
    margin: 0;
    padding: 0;
    display: block;
}

.dark .modal-iframe {
    background: #1f2937;
}

/* Loading Overlay */
.modal-loading {
    position: absolute;
    inset: 0;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    transition: opacity 0.3s ease;
}

.dark .modal-loading {
    background: #1f2937;
}

.modal-loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .modal-header {
        padding: 0.375rem 0.5rem;
        justify-content: space-between;
    }

    .modal-header-left {
        flex: 0 0 auto;
    }

    .modal-header-right {
        flex: 0 0 auto;
        gap: 0.25rem;
    }

    .modal-action-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }

    .modal-close-btn {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }

    /* Ensure iframe container has no padding on mobile */
    .modal-iframe-container {
        padding: 0;
    }

    #project-modal-body {
        margin-top: 50px; /* Further reduced margin for mobile */
    }
}

/* Fix for screens 769px and above - ensure proper spacing */
@media (min-width: 769px) {
    #project-modal-body {
        margin-top: 80px; /* Restore proper margin for desktop */
        height: calc(100vh - 80px);
    }

    .modal-iframe-container {
        padding: 0; /* Keep no padding for full utilization */
    }
}

/* Ensure consistent spacing for all screen sizes */
@media (min-width: 481px) and (max-width: 768px) {
    #project-modal-body {
        margin-top: 50px;
        height: calc(100vh - 50px);
    }
}

/* Extra small devices (phones) */
@media (max-width: 480px) {
    .modal-header {
        padding: 0.25rem 0.375rem;
        height: 50px;
    }

    .modal-close-btn {
        width: 36px;
        height: 36px;
    }

    #project-modal-body {
        margin-top: 0 !important; /* No margin for phones */
        height: calc(100vh - 50px) !important; /* Adjust height for smaller header */
        padding: 0 !important;
    }

    .modal-iframe-container {
        margin: 0 !important;
        padding: 0 !important;
        min-height: 0 !important;
    }

    .modal-iframe {
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
    }
}

/* Modal content styling */
#project-modal-body {
    height: calc(100vh - 80px); /* Account for header height */
    margin-top: 80px; /* Add space for the fixed header */
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f7fafc;
    overflow: hidden; /* Prevent scrolling in modal body */
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 0;
    margin-left: 0;
    margin-right: 0;
}

#project-modal-body::-webkit-scrollbar {
    width: 6px;
}

#project-modal-body::-webkit-scrollbar-track {
    background: #f7fafc;
}

#project-modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

#project-modal-body::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

.dark #project-modal-body {
    scrollbar-color: #4a5568 #2d3748;
}

.dark #project-modal-body::-webkit-scrollbar-track {
    background: #2d3748;
}

.dark #project-modal-body::-webkit-scrollbar-thumb {
    background: #4a5568;
}

.dark #project-modal-body::-webkit-scrollbar-thumb:hover {
    background: #718096;
}


.media-container,
.carousel-container {
    aspect-ratio: 16/9; /* Widescreen presentation */
    background: transparent;
    min-height: 300px;
    position: relative;
    overflow: hidden;
}

/* Portrait image handling */
.media-container.portrait-image,
.carousel-slide.portrait-image {
    aspect-ratio: auto;
    max-height: 600px;
}

.media-container.portrait-image img,
.carousel-slide.portrait-image img {
    object-fit: contain !important;
    object-position: center top;
}

/* Landscape images use contain to prevent cropping */
.media-container.landscape-image img,
.carousel-slide.landscape-image img {
    object-fit: contain;
    object-position: center top;
}
.figma-preview {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}
.video-preview {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}
.dark .loading-skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200px 100%;
}
.clap-button.clapped {
    color: #ef4444;
}
.clap-button.clapped i {
    animation: heartBeat 0.3s ease-in-out;
}
@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Pulse animation for clap button */
.animate-pulse {
    animation: pulse 0.5s ease-in-out;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Processing state for clap button */
.clap-button.processing {
    position: relative;
    transition: all 0.2s ease;
}
/* Carousel Styles */
.carousel-track {
    height: 100%;
    display: flex;
    will-change: transform;
}

.carousel-slide {
    height: 100%;
    flex-shrink: 0;
}

/* Ensure carousel starts at correct position on mobile and media is not cropped */
@media (max-width: 640px) {
    .project-card {
        padding: 0 !important;
    }
    .project-card > div:first-child {
        padding: 1rem;
    }
    .project-card .media-container,
    .project-card .media-container .carousel-container {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        left: 0 !important;
        border-radius: 0 !important;
    }
    .project-card .media-container .carousel-container .carousel-track {
        margin: 0 !important;
        padding: 0 !important;
    }
    .project-card .media-container .carousel-container .carousel-slide {
        margin: 0 !important;
        padding: 0 !important;
    }
}

.carousel-nav {
    z-index: 20;
    pointer-events: auto !important;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.carousel-indicators {
    z-index: 20;
    pointer-events: auto !important;
}

.indicator {
    pointer-events: auto !important;
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.indicator:hover {
    transform: scale(1.2);
}

/* Smooth transitions for carousel */
.carousel-track {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Media container hover effects */
.media-container:hover .carousel-nav {
    opacity: 1 !important;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .carousel-nav {
        opacity: 1 !important;
        padding: 0.75rem !important;
        min-width: 44px !important;
        min-height: 44px !important;
        pointer-events: auto !important;
        z-index: 30 !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    .carousel-indicators {
        bottom: 0.5rem;
        pointer-events: auto !important;
        z-index: 30 !important;
        touch-action: manipulation !important;
    }

    .indicator {
        pointer-events: auto !important;
        width: auto !important;
        height: auto !important;
        min-width: 32px !important;
        min-height: 32px !important;
        padding: 0.5rem !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: transparent !important;
        border-radius: 50% !important;
    }
}

/* Enhanced multi-format carousel styles */
.carousel-indicators .indicator {
    position: relative;
    transition: all 0.3s ease;
}

.carousel-indicators .indicator:hover {
    transform: scale(1.2);
}

.carousel-indicators .indicator.bg-opacity-100 {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

/* Media type badge styles */
.media-type-badge {
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Enhanced file type indicators */
.file-type-indicator {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    backdrop-filter: blur(4px);
}

/* Compact document section styles */
.document-section {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    margin-top: 0.18rem;
    padding: 0.18rem 0.5rem;
    max-height: 80px;
    border-radius: 0.4rem;
    transition: all 0.3s ease;
    overflow: hidden;
}

.document-section.expanded {
    max-height: none;
}

.document-item {
    min-height: 24px;
    padding: 0.08rem 0.3rem;
    display: flex;
    align-items: center;
}

.document-item .document-icon {
    font-size: 1.5rem !important; /* Tailwind text-2xl */
    width: 1.5rem !important;
    height: 1.5rem !important;
    line-height: 1.5rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.document-item span, .document-item label {
    font-size: 0.92rem;
    margin-left: 0.15rem;
    line-height: 1.25rem;
}

.dark .document-section {
    background: transparent !important;
}

.document-grid {
    transition: all 0.3s ease;
}

.document-grid.collapsed {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}

.document-grid.expanded {
    max-height: none;
}

.document-item {
    transition: all 0.2s ease;
    min-height: 60px;
}

.document-item:hover {
    transform: translateY(-1px);
}

.document-item .document-icon {
    transition: all 0.2s ease;
}

.document-item:hover .document-icon {
    transform: scale(1.05);
}

/* Immersive Modal Styles */
.immersive-modal {
    animation: modalFadeIn 0.3s ease-out;
}

.modal-content {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    backdrop-filter: blur(8px);
}

.modal-action-btn {
    transition: all 0.2s ease;
}

.modal-action-btn:hover {
    transform: scale(1.1);
}

.modal-close-btn {
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    transform: scale(1.1);
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 0.375rem;
}

/* Mobile optimizations for modal */
@media (max-width: 768px) {
    .immersive-modal {
        padding: 0.5rem;
    }

    .modal-content {
        max-height: 100vh;
        max-width: 100vw;
    }

    .modal-header {
        padding: 0.75rem;
    }

    .modal-header h3 {
        font-size: 1rem;
    }

    .modal-header .text-sm {
        font-size: 0.75rem;
    }
}

/* Responsive sizing for consistent 16:9 presentation */
@media (max-width: 640px) {
    .media-container,
    .carousel-container {
        aspect-ratio: 16/9;
        min-height: 280px;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .media-container,
    .carousel-container {
        aspect-ratio: 16/9;
        min-height: 320px;
    }
}

@media (min-width: 1024px) {
    .media-container,
    .carousel-container {
        aspect-ratio: 16/9;
        min-height: 350px;
    }
}

/* Dark mode optimizations */
.dark .immersive-modal {
    backdrop-filter: blur(12px);
}

.dark .modal-content {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}
/* File type preview styles */

.figma-preview {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.link-preview {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Interactive hover effects */
.media-container.cursor-pointer:hover {
    transform: scale(1.02);
    transition: transform 0.2s ease;
}

/* Video modal styles */
.video-modal {
    backdrop-filter: blur(5px);
}

/* Video preview styles */
.video-preview {
    cursor: pointer;
}

.video-preview:hover {
    transform: scale(1.02);
    transition: transform 0.2s ease;
}

.video-modal-trigger {
    cursor: pointer;
    transition: all 0.2s ease;
}

.video-modal-trigger:hover {
    transform: scale(1.02);
}

/* Video file indicators in document section */
.document-section .video-file-indicator {
    position: relative;
    overflow: hidden;
}

.document-section .video-file-indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    border-radius: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.document-section .video-file-indicator:hover::before {
    opacity: 1;
}

.document-section .video-file-indicator .play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    opacity: 0;
    transition: all 0.2s ease;
}

.document-section .video-file-indicator:hover .play-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.2);
}

.document-section .video-file-indicator .play-overlay i {
    color: white;
    font-size: 0.875rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

/* Video carousel item styles */
.video-carousel-item {
    position: relative;
}

.video-carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    border-radius: 0;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 1;
}

.video-carousel-item:hover::before {
    opacity: 1;
}

.video-carousel-item .video-badge {
    z-index: 2;
}

/* File type specific gradients */
.pdf-preview {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.document-preview {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
}

.archive-preview {
    background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
}

/* Loading states for media */
.media-loading {
    position: relative;
}

.media-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* PDF viewer styles - constrained for carousel */
.pdf-container {
    width: 100%;
    height: 100%;
    background: #f8fafc;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.pdf-viewer {
    position: relative;
    background: #f8fafc;
    border-radius: 0.75rem;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.pdf-content {
    padding: 1rem;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex: 1;
    overflow: auto;
    max-height: calc(100% - 60px); /* Account for controls height */
}

/* Compact PDF mode for carousel */
.carousel-slide .pdf-container {
    max-height: 100%;
}

.carousel-slide .pdf-content {
    padding: 0.5rem;
    max-height: calc(100% - 50px);
}

.carousel-slide .pdf-controls {
    padding: 0.5rem;
    font-size: 0.875rem;
}

.carousel-slide .pdf-button {
    padding: 0.25rem;
    font-size: 0.75rem;
}

.dark .pdf-content {
    background: #1f2937;
}

.pdf-content canvas {
    max-width: 100%;
    height: auto !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.pdf-controls {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: space-between;
    flex-shrink: 0;
}

.pdf-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dark .pdf-controls {
    background: rgba(31, 41, 55, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pdf-pages {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pdf-zoom {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pdf-button {
    padding: 0.5rem;
    border-radius: 0.375rem;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.dark .pdf-button {
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.pdf-button:hover {
    background: rgba(0, 0, 0, 0.05);
}

.dark .pdf-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.pdf-page-input {
    width: 4rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
    font-size: 0.875rem;
}

.dark .pdf-page-input {
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.pdf-loading {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.dark .pdf-loading {
    background: rgba(31, 41, 55, 0.9);
}

/* Elite Badge Styles */
.elite-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: linear-gradient(to right, #8b5cf6, #6366f1);
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: 9999px;
    margin-left: 6px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 1px 2px rgba(139, 92, 246, 0.3);
}

.elite-badge-small {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    background: linear-gradient(to right, #8b5cf6, #6366f1);
    color: white;
    font-size: 9px;
    font-weight: 600;
    border-radius: 9999px;
    margin-left: 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 1px 2px rgba(139, 92, 246, 0.3);
}

.dark .elite-badge,
.dark .elite-badge-small {
    background: linear-gradient(to right, #7c3aed, #4f46e5);
    box-shadow: 0 1px 2px rgba(124, 58, 237, 0.4);
}

/* Aggressive modal/iframe spacing reset */
#project-modal,
#project-modal-content,
#project-modal-body,
.modal-iframe-container,
.modal-iframe {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-sizing: border-box !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
}
/* Only remove background for iframe and its container */
.modal-iframe-container,
.modal-iframe {
    background: none !important;
}
/* Restore modal overlay and content backgrounds */
#project-modal {
    background: rgba(0,0,0,0.95) !important;
}
#project-modal-content {
    background: #fff !important;
}
.dark #project-modal-content {
    background: #1f2937 !important;
}

