/* Reset dan base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #FF9800;
    --secondary: #FFB74D;
    --accent: #FFD54F;
    --danger: #FF5252;
    --success: #4CAF50;
    --dark: #121212;
    --darker: #0a0a0a;
    --card-dark: #1e1e1e;
    --light: #e0e0e0;
    --gray: #757575;
    --glossy: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--light);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: linear-gradient(145deg, #1a1a1a, #151515);
    border-radius: 25px;
    box-shadow: 
        0 20px 60px rgba(0,0,0,0.8),
        0 0 0 1px rgba(255, 152, 0, 0.1);
    overflow: hidden;
    border: 1px solid rgba(255, 152, 0, 0.15);
}

.header {
    background: linear-gradient(to right, #1a1a1a, #151515);
    color: white;
    padding: 30px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 152, 0, 0.2);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.8;
    color: var(--secondary);
}

/* Navigation */
.main-nav {
    background: linear-gradient(to right, #151515, #1a1a1a);
    /* padding: 0 20px; */
    border-bottom: 1px solid rgba(255, 152, 0, 0.2);
}

.nav-tabs {
    display: flex;
    justify-content: center;
    align-content: center;
    gap: 5px;
    padding: 10px 0;
}

.nav-tab {
    padding: 12px 25px;
    background: rgba(255, 152, 0, 0.1);
    color: var(--light);
    border: none;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 152, 0, 0.2);
    border-bottom: none;
}

.nav-tab:hover {
    background: rgba(255, 152, 0, 0.2);
    color: var(--accent);
}

.nav-tab.active {
    background: linear-gradient(to bottom, rgba(255, 152, 0, 0.3), rgba(255, 152, 0, 0.1));
    color: var(--accent);
    border-color: var(--primary);
}

/* Content Sections */
.content-section {
    display: none;
    padding: 30px;
}

.content-section.active {
    display: block;
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 40px;
    color: var(--accent);
    display: none;
}

.spinner {
    border: 3px solid rgba(255, 152, 0, 0.3);
    border-radius: 50%;
    border-top: 3px solid var(--primary);
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* Stats */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(145deg, #1e1e1e, #181818);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 152, 0, 0.2);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(255, 152, 0, 0.2);
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
}

.stat-label {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Controls */
.controls {
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 152, 0, 0.2);
    padding-bottom: 25px;
}

.search-box {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 152, 0, 0.3);
    border-radius: 25px;
    font-size: 1rem;
    color: var(--light);
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.1);
}

/* Filter Container */
.filter-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-btn {
    padding: 10px 20px;
    background: rgba(255, 152, 0, 0.1);
    color: var(--light);
    border: 2px solid rgba(255, 152, 0, 0.3);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn.active, .filter-btn:hover {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: var(--darker);
    border-color: transparent;
}

/* Filter Dropdown */
.filter-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 152, 0, 0.1);
    color: var(--light);
    border: 2px solid rgba(255, 152, 0, 0.3);
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.dropdown-toggle:hover {
    background: rgba(255, 152, 0, 0.2);
}

.dropdown-toggle.active {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: var(--darker);
    border-color: transparent;
}

.dropdown-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.dropdown-toggle.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 250px;
    background: linear-gradient(145deg, #1e1e1e, #181818);
    border: 1px solid rgba(255, 152, 0, 0.3);
    border-radius: 15px;
    padding: 15px;
    margin-top: 5px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 100;
    max-height: 400px;
    overflow-y: auto;
}

.dropdown-menu.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.extension-filters {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.extension-filter-group {
    margin-bottom: 15px;
}

.extension-filter-group h4 {
    color: var(--primary);
    margin-bottom: 8px;
    font-size: 0.9rem;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 152, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 5px;
}

.extension-filter-btn {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--light);
    border: 1px solid rgba(255, 152, 0, 0.2);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    text-align: left;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.extension-filter-btn:hover {
    background: rgba(255, 152, 0, 0.2);
    transform: translateX(5px);
}

.extension-filter-btn.active {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: var(--darker);
    border-color: transparent;
}

.extension-filter-btn .file-count {
    margin-left: auto;
    font-size: 0.8rem;
    opacity: 0.7;
    background: rgba(0,0,0,0.3);
    padding: 2px 6px;
    border-radius: 10px;
}

/* Gallery */
.gallery-container {
    padding: 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 10px;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: linear-gradient(145deg, #1e1e1e, #181818);
    border: 1px solid rgba(255, 152, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(255, 152, 0, 0.2);
}

.gallery-item img, .gallery-item video {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 152, 0, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    padding: 15px;
    transform: translateY(100%);
    transition: transform 0.2s ease;
    backdrop-filter: blur(5px);
}

.gallery-item, .item-overlay {
    transform: translateY(0);
}

/* .gallery-item:hover .item-overlay {
    transform: translateY(0);
} */

.item-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--light);
    flex: 1;
    display: flex;
    align-items: center;
    gap: 5px;
}

.item-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.action-btn {
    background: rgba(255, 152, 0, 0.2);
    color: var(--accent);
    border: 1px solid rgba(255, 152, 0, 0.3);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: var(--darker);
    transform: scale(1.1);
}

.item-details {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    font-size: 0.8rem;
    color: #aaa;
    flex-wrap: wrap;
}

.file-extension {
    background: rgba(255, 152, 0, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: bold;
}

.file-size, .file-date {
    opacity: 0.8;
}

/* Load More Button */
.load-more-btn {
    display: block;
    margin: 30px auto;
    padding: 12px 30px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: var(--darker);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.3);
}

/* Upload Section */
.upload-section {
    padding: 30px;
    background: linear-gradient(145deg, #1e1e1e, #181818);
    border-radius: 15px;
    border: 1px solid rgba(255, 152, 0, 0.2);
}

.upload-area {
    border: 3px dashed var(--primary);
    border-radius: 15px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    background: rgba(255, 152, 0, 0.05);
    transition: all 0.3s ease;
}

.upload-area:hover, .upload-area.dragover {
    background: rgba(255, 152, 0, 0.1);
    border-color: var(--accent);
}

.upload-icon {
    font-size: 3.5rem;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

.upload-area h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--light);
}

.upload-btn {
    display: inline-block;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: var(--darker);
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin: 15px 0;
    border: none;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.3);
}

#fileInput {
    display: none;
}

.file-types {
    margin-top: 20px;
    color: var(--gray);
    font-size: 0.85rem;
}

.upload-progress {
    margin-top: 25px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    width: 0%;
    transition: width 0.3s ease;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease;
}

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

.modal-content {
    background: linear-gradient(145deg, #1a1a1a, #151515);
    border-radius: 15px;
    max-width: 800px;
    width: 95%;
    max-height: 90vh;
    overflow: auto;
    border: 1px solid rgba(255, 152, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.close-modal {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--primary);
    z-index: 2;
    transition: all 0.3s ease;
}

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

.modal-body {
    padding: 30px;
    text-align: center;
}

.modal-body img, .modal-body video {
    max-width: 100%;
    max-height: 60vh;
    border-radius: 10px;
}

.modal-actions {
    padding: 20px 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
    border-top: 1px solid rgba(255, 152, 0, 0.2);
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: var(--darker);
}

.btn-secondary {
    background: linear-gradient(45deg, #757575, #9e9e9e);
    color: var(--darker);
}

.btn-danger {
    background: linear-gradient(45deg, #FF5252, #FF8A80);
    color: var(--darker);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.3);
}

/* Update Form */
.update-form {
    padding: 30px;
}

.update-form h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--light);
}

.file-input, .form-group input {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 152, 0, 0.3);
    border-radius: 10px;
    font-size: 1rem;
    color: var(--light);
}

.file-input:focus, .form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Delete Confirmation Modal */
.delete-modal-content {
    max-width: 500px;
    text-align: center;
    padding: 40px;
    background: linear-gradient(145deg, #1a1a1a, #151515);
    border: 1px solid rgba(255, 87, 34, 0.3);
    box-shadow: 0 20px 60px rgba(0,0,0,0.8),
                0 0 0 1px rgba(255, 87, 34, 0.2);
}

.delete-modal-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #FF5722, #FF9800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulseWarning 2s infinite;
}

@keyframes pulseWarning {
    0%, 100% { 
        transform: scale(1); 
        opacity: 1; 
    }
    50% { 
        transform: scale(1.1); 
        opacity: 0.8; 
    }
}

.delete-modal-title {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: #FF5722;
}

.delete-modal-message {
    font-size: 1.2rem;
    color: #e0e0e0;
    margin-bottom: 25px;
    line-height: 1.6;
}

.delete-modal-file-info {
    background: rgba(255, 87, 34, 0.1);
    border: 1px solid rgba(255, 87, 34, 0.2);
    border-radius: 15px;
    padding: 20px;
    margin: 25px 0;
    text-align: left;
}

.delete-file-preview {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.preview-thumb {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid rgba(255, 87, 34, 0.3);
}

.preview-info h4 {
    color: #FF9800;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.preview-info p {
    color: #aaa;
    font-size: 0.9rem;
    margin: 2px 0;
}

.delete-modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.btn-cancel {
    background: linear-gradient(45deg, #757575, #9e9e9e);
    color: white;
    padding: 15px 35px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 150px;
    justify-content: center;
}

.btn-confirm-delete {
    background: linear-gradient(45deg, #FF5722, #FF5252);
    color: white;
    padding: 15px 35px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 150px;
    justify-content: center;
}

.btn-cancel:hover {
    transform: translateY(-3px);
    background: linear-gradient(45deg, #616161, #757575);
}

.btn-confirm-delete:hover {
    transform: translateY(-3px);
    background: linear-gradient(45deg, #FF3D00, #FF5252);
}

.btn-confirm-delete.loading {
    opacity: 0.7;
    pointer-events: none;
}

.btn-confirm-delete.loading i {
    animation: spin 1s linear infinite;
}

.delete-close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 2.2rem;
    cursor: pointer;
    color: #FF9800;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0,0,0,0.3);
}

.delete-close:hover {
    color: #FF5722;
    transform: rotate(90deg);
    background: rgba(255, 87, 34, 0.2);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 40px;
    background: rgba(255, 152, 0, 0.05);
    border-radius: 20px;
    border: 2px dashed rgba(255, 152, 0, 0.3);
    margin: 40px 0;
    grid-column: 1 / -1;
}

.empty-icon {
    font-size: 5rem;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 30px;
}

.empty-state h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--light);
}

.empty-state p {
    color: var(--gray);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .nav-tabs {
        overflow-x: auto;
        padding-bottom: 5px;
    }
    
    .nav-tab {
        padding: 10px 20px;
        font-size: 0.9rem;
        white-space: nowrap;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-value {
        font-size: 1.8rem;
    }
    
    .modal-actions, .delete-modal-actions {
        flex-direction: column;
    }
    
    .btn, .btn-cancel, .btn-confirm-delete {
        width: 100%;
        min-width: unset;
    }
    
    .dropdown-menu {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 300px;
        max-height: 70vh;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .header {
        padding: 20px;
    }
    
    .content-section {
        padding: 15px;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .extension-filters {
        grid-template-columns: 1fr;
    }
}

/* Modal Navigation */
.modal-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 0 20px;
    position: relative;
}

.nav-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(255, 152, 0, 0.3);
    background: rgba(255, 152, 0, 0.1);
    color: var(--accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.nav-btn:hover {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: var(--darker);
    border-color: transparent;
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.4);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: rgba(255, 152, 0, 0.05);
    border-color: rgba(255, 152, 0, 0.1);
}

.nav-btn:disabled:hover {
    transform: none;
    background: rgba(255, 152, 0, 0.05);
    color: var(--accent);
    border-color: rgba(255, 152, 0, 0.1);
}

.modal-body {
    padding: 30px;
    text-align: center;
    flex: 1;
    max-width: calc(100% - 140px);
}

.modal-body img, .modal-body video {
    max-width: 100%;
    max-height: 60vh;
    border-radius: 10px;
    display: block;
    margin: 0 auto;
}

/* File Info Bar */
.file-info-bar {
    padding: 15px 30px;
    background: rgba(255, 152, 0, 0.05);
    border-top: 1px solid rgba(255, 152, 0, 0.2);
    border-bottom: 1px solid rgba(255, 152, 0, 0.2);
}

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

.file-name-preview {
    font-weight: 600;
    color: var(--light);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-name-preview i {
    color: var(--primary);
}

.file-details-preview {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #aaa;
}

.file-detail {
    display: flex;
    align-items: center;
    gap: 5px;
}

.file-detail i {
    color: var(--accent);
}

/* Pagination Info */
.pagination-info {
    text-align: center;
    padding: 15px;
    color: var(--gray);
    font-size: 0.9rem;
    background: rgba(0,0,0,0.1);
    border-top: 1px solid rgba(255, 152, 0, 0.1);
}

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

/* Loading Animation for Modal */
.modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.modal-spinner {
    border: 4px solid rgba(255, 152, 0, 0.1);
    border-left-color: var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

/* Keyboard Shortcut Hints */
.keyboard-hints {
    position: absolute;
    bottom: -40px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.8rem;
    color: var(--gray);
    display: flex;
    justify-content: center;
    gap: 20px;
}

.keyboard-key {
    display: inline-block;
    padding: 3px 8px;
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid rgba(255, 152, 0, 0.3);
    border-radius: 4px;
    font-family: monospace;
    margin: 0 5px;
}

/* Animation for navigation */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.slide-left {
    animation: slideInLeft 0.3s ease;
}

.slide-right {
    animation: slideInRight 0.3s ease;
}

/* Responsive styles for modal navigation */
@media (max-width: 768px) {
    .modal-navigation {
        padding: 0 10px;
        gap: 10px;
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .modal-body {
        max-width: calc(100% - 100px);
        padding: 20px 10px;
    }
    
    .file-info-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .file-details-preview {
        width: 100%;
        justify-content: space-between;
    }
}

/* Add to existing styles */
.modal-content {
    position: relative;
    overflow: visible;
}

/* Smooth transitions for modal content */
.modal-body img, .modal-body video {
    transition: opacity 0.3s ease;
}

/* Loading state */
.modal-body.loading img,
.modal-body.loading video {
    opacity: 0.5;
}

/* Touch feedback for mobile */
.nav-btn:active {
    transform: scale(0.95);
}

/* Progress indicator for image loading */
.media-loading {
    position: relative;
}

.media-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 152, 0, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Fullscreen support */
.modal-body img.fullscreen,
.modal-body video.fullscreen {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.modal-body img.fullscreen:hover,
.modal-body video.fullscreen:hover {
    transform: scale(1.02);
}

/* Video controls customization */
.modal-body video::-webkit-media-controls {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
}

.modal-body video::-webkit-media-controls-panel {
    background-color: rgba(0, 0, 0, 0.3);
}

/* Auto-play indicator */
.autoplay-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 1;
}