/* Custom Styles for ImHost File Manager - Rich UI */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #8b5cf6;
    --secondary-color: #f1f5f9;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

* {
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--dark-color);
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

/* Enhanced Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar .nav-link {
    font-weight: 500;
    color: var(--dark-color) !important;
    padding: 0.75rem 1rem !important;
    border-radius: 0.75rem;
    margin: 0 0.25rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.navbar .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.navbar .nav-link:hover::before {
    left: 0;
}

.navbar .nav-link:hover {
    color: white !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Rich Sidebar Styles */
.sidebar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    min-height: calc(100vh - 76px);
    padding: 0;
    position: fixed;
    top: 76px;
    left: 0;
    width: 280px;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.sidebar-content {
    padding: 1.5rem;
}

.main-content {
    margin-left: 280px;
    padding: 2rem;
    min-height: calc(100vh - 76px);
}

/* Rich Folder Tree Styles */
.folder-tree {
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    padding-right: 0.5rem;
}

.folder-tree::-webkit-scrollbar {
    width: 6px;
}

.folder-tree::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.folder-tree::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.folder-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-radius: 0.75rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-weight: 500;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.5);
}

.folder-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    border-radius: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.folder-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.folder-item:hover::before {
    opacity: 0.1;
}

.folder-item.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-lg);
    transform: translateX(8px);
}

.folder-item .folder-icon {
    margin-right: 0.75rem;
    color: var(--warning-color);
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.folder-item.active .folder-icon {
    color: white;
    transform: scale(1.1);
}

.folder-item .folder-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.folder-children {
    margin-left: 1.5rem;
    border-left: 2px solid rgba(99, 102, 241, 0.2);
    padding-left: 1rem;
    margin-top: 0.5rem;
}

.folder-toggle {
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    border: none;
    color: white;
    font-size: 0.7rem;
    cursor: pointer;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.folder-toggle:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-md);
}

/* Rich Content Area Styles */
.content-view {
    animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInUp {
    from { 
        opacity: 0; 
        transform: translateY(30px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.toolbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.toolbar .btn {
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.toolbar .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.toolbar .btn:hover::before {
    left: 100%;
}

.toolbar .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.toolbar .btn-primary {
    background: var(--gradient-primary);
    border: none;
}

.toolbar .btn-success {
    background: var(--gradient-success);
    border: none;
}

.content-area {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    min-height: 500px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.content-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-primary);
}

/* Rich Grid View Styles */
.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.file-card, .folder-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.file-card::before, .folder-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.file-card:hover, .folder-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.file-card:hover::before, .folder-card:hover::before {
    opacity: 0.05;
}

.file-card.selected, .folder-card.selected {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.file-card.selected::before, .folder-card.selected::before {
    opacity: 0.1;
}

.file-icon, .folder-icon-large {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    display: block;
    transition: all 0.3s ease;
}

.file-card:hover .file-icon, .folder-card:hover .folder-icon-large {
    transform: scale(1.1) rotate(5deg);
}

.folder-icon-large {
    color: var(--warning-color);
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.file-icon.image {
    color: var(--success-color);
}

.file-icon.document {
    color: var(--danger-color);
}

.file-icon.archive {
    color: var(--primary-light);
}

.file-icon.video {
    color: var(--warning-color);
}

.file-icon.audio {
    color: var(--accent-color);
}

.file-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    word-break: break-word;
    color: var(--dark-color);
    font-size: 0.95rem;
}

.file-meta {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

/* List View Styles */
.list-view {
    display: block;
}

.list-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.list-item:hover {
    background-color: #f8f9fa;
}

.list-item.selected {
    background-color: #e7f3ff;
}

.list-item-icon {
    margin-right: 1rem;
    font-size: 1.5rem;
}

.list-item-content {
    flex: 1;
}

.list-item-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.list-item-meta {
    font-size: 0.875rem;
    color: #6c757d;
}

.list-item-actions {
    display: flex;
    gap: 0.5rem;
}

/* Upload Progress */
.upload-progress {
    margin-top: 1rem;
}

.upload-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
}

.upload-item-name {
    flex: 1;
    margin-right: 1rem;
}

.upload-item-progress {
    width: 200px;
    margin-right: 1rem;
}

/* Permissions Grid */
.permissions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* Rich Dashboard Cards */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.card-header {
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    padding: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.card-body {
    padding: 1.5rem;
}

/* Enhanced Dashboard Stats Cards */
.card.bg-primary {
    background: var(--gradient-primary) !important;
    border: none;
    color: white;
}

.card.bg-success {
    background: var(--gradient-success) !important;
    border: none;
    color: white;
}

.card.bg-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
    border: none;
    color: white;
}

.card.bg-primary::before,
.card.bg-success::before,
.card.bg-info::before {
    display: none;
}

.card.bg-primary .card-body,
.card.bg-success .card-body,
.card.bg-info .card-body {
    position: relative;
}

.card.bg-primary .card-body::after,
.card.bg-success .card-body::after,
.card.bg-info .card-body::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(30px, -30px);
}

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item a {
    text-decoration: none;
    color: #0d6efd;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* Context Menu */
.context-menu {
    position: absolute;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    z-index: 1050;
    min-width: 150px;
}

.context-menu-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
}

.context-menu-item:hover {
    background-color: #f8f9fa;
}

.context-menu-item:last-child {
    border-bottom: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .grid-view {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .permissions-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading States */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: #6c757d;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

.slide-in {
    animation: slideIn 0.3s ease-in-out;
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Selection Checkbox */
.selection-checkbox {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 10;
}

/* Drag and Drop */
.drag-over {
    border: 2px dashed #0d6efd !important;
    background-color: #e7f3ff !important;
}

.drop-zone {
    border: 2px dashed #dee2e6;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    color: #6c757d;
    transition: all 0.2s ease;
}

.drop-zone.active {
    border-color: #0d6efd;
    background-color: #e7f3ff;
    color: #0d6efd;
}

/* Upload Results Modal */
.uploaded-files {
    max-height: 400px;
    overflow-y: auto;
}

.uploaded-files .card {
    transition: all 0.2s ease;
}

.uploaded-files .card:hover {
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.file-icon-large {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
}

.file-icon-large svg {
    width: 48px;
    height: 48px;
    color: #6c757d;
}

.input-group-sm .form-control {
    font-size: 0.75rem;
}

.uploaded-files .img-thumbnail {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

/* Copy button animation */
.btn-outline-secondary:active {
    transform: scale(0.95);
}

/* Dashboard recent uploads */
.hover-bg-light:hover {
    background-color: #f8f9fa !important;
    transition: background-color 0.2s ease;
}

#recentUploads .btn-sm {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

#recentUploads .d-flex:hover .btn-sm {
    opacity: 1;
}

/* Enhanced upload success toast */
.toast .btn-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.toast .btn-light {
    background-color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.5);
    color: #198754;
}

.toast .btn-light:hover {
    background-color: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 0.8);
    color: #146c43;
}

.toast .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.5);
    color: rgba(255, 255, 255, 0.9);
}

.toast .btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
    color: white;
}

/* React-like refresh indicator */
.refresh-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(13, 110, 253, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    z-index: 1060;
    display: none;
    animation: refreshPulse 1s infinite;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.refresh-indicator i {
    animation: refreshSpin 1s linear infinite;
}

@keyframes refreshPulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

@keyframes refreshSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Data freshness indicator */
.data-fresh {
    position: relative;
}

.data-fresh::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #28a745;
    border-radius: 50%;
    border: 2px solid white;
}

/* Auto-refresh status */
.auto-refresh-status {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    z-index: 1050;
    display: none;
}

.auto-refresh-status.active {
    display: block;
    animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* Rich Modal Styles */
.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.modal-header {
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    padding: 1.5rem;
    position: relative;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.modal-title {
    font-weight: 600;
    color: var(--dark-color);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    background: rgba(248, 250, 252, 0.5);
    border-top: 1px solid rgba(226, 232, 240, 0.5);
    padding: 1.5rem;
}

/* Enhanced Form Controls */
.form-control, .form-select {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(226, 232, 240, 0.5);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    background: rgba(255, 255, 255, 1);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
    transform: translateY(-1px);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
}

/* Enhanced Buttons */
.btn {
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: none;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary {
    background: var(--gradient-primary);
}

.btn-success {
    background: var(--gradient-success);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

/* Enhanced Progress Bars */
.progress {
    background: rgba(226, 232, 240, 0.3);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    background: var(--gradient-primary);
    border-radius: 1rem;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShimmer 2s infinite;
}

@keyframes progressShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Enhanced Breadcrumb */
.breadcrumb {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.breadcrumb-item a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    transition: all 0.3s ease;
}

.breadcrumb-item a:hover {
    color: var(--primary-dark);
    transform: translateX(2px);
}

.breadcrumb-item.active {
    color: var(--dark-color);
    font-weight: 600;
}

/* Enhanced Input Groups */
.input-group .form-control {
    border-right: none;
}

.input-group .btn {
    border-left: none;
    border: 2px solid rgba(226, 232, 240, 0.5);
    border-left: none;
}

.input-group:focus-within .form-control,
.input-group:focus-within .btn {
    border-color: var(--primary-color);
}

/* Enhanced Alerts */
.alert {
    border: none;
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    background: currentColor;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border-left: 4px solid #10b981;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-left: 4px solid #ef4444;
}

.alert-info {
    background: rgba(6, 182, 212, 0.1);
    color: #0891b2;
    border-left: 4px solid #06b6d4;
}

/* Enhanced Navbar Styles */
.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    background: white;
    padding: 4px;
}

.logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0.5rem;
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-divider {
    width: 1px;
    height: 30px;
    background: rgba(0, 0, 0, 0.1);
    margin: 0 1rem;
}

.logout-btn {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color) !important;
    border-radius: 0.5rem;
}

.logout-btn:hover {
    background: var(--danger-color) !important;
    color: white !important;
}

/* Enhanced Dashboard Styles */
.dashboard-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.dashboard-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.dashboard-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-subtitle {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 0;
    font-weight: 500;
}

.dashboard-actions .btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
}

/* Enhanced Stats Cards */
.stats-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stats-card:hover {
    transform: translateY(-8px) scale(1.02);
}

.stats-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.stats-card:hover::after {
    top: -30%;
    right: -30%;
}

.stats-content {
    z-index: 2;
    position: relative;
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stats-label {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.stats-change {
    font-size: 0.8rem;
    opacity: 0.8;
    font-weight: 500;
}

.stats-icon {
    font-size: 3rem;
    opacity: 0.3;
    z-index: 1;
    position: relative;
}

/* Enhanced Recent Uploads Section */
.recent-uploads-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.recent-uploads-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0;
}

.view-all-btn {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.view-all-btn:hover {
    color: var(--primary-dark);
    transform: translateX(4px);
}

/* Enhanced File Items in Recent Uploads */
#recentUploads .d-flex {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

#recentUploads .d-flex:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
}

/* Enhanced Loading States */
.loading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 300px;
    color: var(--dark-color);
}

.loading .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
    border-color: var(--primary-color);
    border-right-color: transparent;
}

.loading p {
    margin-top: 1rem;
    font-weight: 500;
    font-size: 1.1rem;
}

/* Enhanced Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
}

.empty-state i {
    font-size: 5rem;
    margin-bottom: 2rem;
    opacity: 0.3;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.empty-state h5 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.empty-state .btn {
    margin: 0.5rem;
    padding: 0.75rem 2rem;
    font-weight: 600;
}

/* Enhanced Sidebar Styles */
.sidebar-header {
    border-bottom: 1px solid rgba(226, 232, 240, 0.3);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.sidebar-label {
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.sidebar-subtitle {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 500;
}

.sidebar-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.sidebar-action-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.sidebar-footer {
    border-top: 1px solid rgba(226, 232, 240, 0.3);
    padding-top: 1rem;
}

.storage-info {
    background: rgba(248, 250, 252, 0.8);
    border-radius: 0.75rem;
    padding: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.3);
}

.storage-header {
    margin-bottom: 0.75rem;
}

.storage-bar .progress {
    background: rgba(226, 232, 240, 0.5);
}

/* Enhanced Toolbar Styles */
.toolbar .input-group {
    max-width: 350px;
}

.toolbar .btn-group .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.toolbar .btn-group .btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

/* Enhanced List View */
.list-view .list-item {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 1rem 1.5rem;
    transition: all 0.3s ease;
}

.list-view .list-item:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
}

.list-view .list-item.selected {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary-color);
    transform: translateX(12px);
}

.list-item-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
}

.list-item-name {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.list-item-meta {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.list-item-actions .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    margin-left: 0.25rem;
}

/* Enhanced Selection Styles */
.selection-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--primary-color);
    border-radius: 0.25rem;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.selection-checkbox:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

/* Enhanced Context Menu */
.context-menu {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-xl);
    padding: 0.5rem;
    min-width: 180px;
}

.context-menu-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-radius: 0.5rem;
    margin-bottom: 0.25rem;
    font-weight: 500;
    color: var(--dark-color);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.context-menu-item:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateX(4px);
}

.context-menu-item:last-child {
    margin-bottom: 0;
}

.context-menu-item i {
    margin-right: 0.75rem;
    width: 16px;
    text-align: center;
}

/* Enhanced Toast Notifications */
.toast {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.toast.bg-success {
    background: rgba(16, 185, 129, 0.95);
    backdrop-filter: blur(20px);
}

.toast.bg-danger {
    background: rgba(239, 68, 68, 0.95);
    backdrop-filter: blur(20px);
}

.toast.bg-info {
    background: rgba(6, 182, 212, 0.95);
    backdrop-filter: blur(20px);
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .sidebar {
        width: 100%;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .dashboard-title {
        font-size: 2rem;
    }
    
    .stats-card {
        margin-bottom: 1rem;
    }
    
    .grid-view {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .navbar .nav-link span {
        display: none;
    }
}

/* Smooth Scrollbars */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(0, 0, 0, 0.1);
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

*::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* File Preview Modal Styles */
.modal-xl {
    max-width: 90vw;
}

.preview-file-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.preview-content {
    min-height: 60vh;
    max-height: 80vh;
    overflow: auto;
    background: #f8fafc;
    position: relative;
}

.preview-loading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 60vh;
    color: var(--dark-color);
}

.preview-loading .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Image Preview */
.preview-image {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    background: #000;
    display: block;
    margin: 0 auto;
}

.image-preview-container {
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    position: relative;
}

.image-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    border-radius: 2rem;
    padding: 0.5rem 1rem;
    display: flex;
    gap: 0.5rem;
}

.image-controls .btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-controls .btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Video Preview */
.preview-video {
    width: 100%;
    height: auto;
    max-height: 80vh;
    background: #000;
}

.video-preview-container {
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

/* Audio Preview */
.audio-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    background: var(--gradient-primary);
    color: white;
    text-align: center;
}

.audio-icon {
    font-size: 6rem;
    margin-bottom: 2rem;
    opacity: 0.8;
}

.preview-audio {
    width: 100%;
    max-width: 500px;
    margin-top: 2rem;
}

/* Document Preview */
.document-preview-container {
    padding: 2rem;
    background: white;
    min-height: 60vh;
}

.document-preview-iframe {
    width: 100%;
    height: 70vh;
    border: none;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
}

.document-fallback {
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
}

.document-fallback i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Code Preview */
.code-preview-container {
    background: #1e293b;
    color: #e2e8f0;
    font-family: 'Fira Code', 'Consolas', monospace;
    overflow: auto;
}

.code-preview {
    padding: 2rem;
    white-space: pre-wrap;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.code-header {
    background: #334155;
    padding: 1rem 2rem;
    border-bottom: 1px solid #475569;
    display: flex;
    justify-content: between;
    align-items: center;
}

.code-language {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 500;
}

.code-copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
}

.code-copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Text Preview */
.text-preview-container {
    background: white;
    padding: 2rem;
    font-family: 'Georgia', serif;
    line-height: 1.8;
    color: var(--dark-color);
}

.text-preview {
    white-space: pre-wrap;
    font-size: 1rem;
    max-height: 60vh;
    overflow-y: auto;
}

/* Archive Preview */
.archive-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    background: linear-gradient(135deg, #6f42c1 0%, #495057 100%);
    color: white;
    text-align: center;
}

.archive-icon {
    font-size: 6rem;
    margin-bottom: 2rem;
    opacity: 0.8;
}

/* Unsupported File Preview */
.unsupported-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    background: #f8fafc;
    color: #64748b;
    text-align: center;
}

.unsupported-icon {
    font-size: 6rem;
    margin-bottom: 2rem;
    opacity: 0.5;
}

/* Preview Navigation */
.preview-navigation {
    display: flex;
    align-items: center;
}

.preview-navigation .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.preview-navigation .btn:disabled {
    opacity: 0.5;
}

/* File Info in Preview */
.preview-file-info {
    background: rgba(248, 250, 252, 0.9);
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-metadata {
    display: flex;
    gap: 2rem;
    font-size: 0.9rem;
    color: #64748b;
}

.file-metadata .metadata-item {
    display: flex;
    flex-direction: column;
}

.file-metadata .metadata-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

/* Zoom Controls for Images */
.zoom-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 1rem;
    padding: 0.5rem;
    display: flex;
    gap: 0.25rem;
}

.zoom-controls .btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.zoom-level {
    color: white;
    padding: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    min-width: 60px;
    text-align: center;
}

/* Responsive Preview */
@media (max-width: 768px) {
    .modal-xl {
        max-width: 95vw;
    }
    
    .preview-content {
        min-height: 50vh;
        max-height: 60vh;
    }
    
    .image-preview-container,
    .video-preview-container {
        min-height: 50vh;
    }
    
    .preview-navigation {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .file-metadata {
        flex-direction: column;
        gap: 1rem;
    }
}

/* File Thumbnail Styles */
.file-thumbnail {
    position: relative;
    width: 100%;
    height: 120px;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #f8fafc;
}

.thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.file-card:hover .thumbnail-image {
    transform: scale(1.05);
}

.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.file-card:hover .thumbnail-overlay {
    opacity: 1;
}

.file-icon-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    margin-bottom: 1rem;
}

.file-icon-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 0.5rem;
}

.file-card:hover .file-icon-overlay {
    opacity: 1;
}

.preview-btn {
    background: rgba(255, 255, 255, 0.9) !important;
    border: none !important;
    color: var(--dark-color) !important;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.preview-btn:hover {
    background: white !important;
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

/* List View Thumbnails */
.list-thumbnail {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

/* Enhanced File Cards with Thumbnails */
.file-card {
    position: relative;
    overflow: hidden;
}

.file-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(99, 102, 241, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.file-card:hover::after {
    opacity: 1;
}

/* Preview Button in List View */
.list-item-actions .btn {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.list-item:hover .list-item-actions .btn {
    opacity: 1;
}

/* File Type Indicators */
.file-type-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.file-card:hover .file-type-badge {
    opacity: 1;
}

/* Enhanced File Name Display */
.file-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    height: 2.6em;
}

/* URL input styling */
.uploaded-files .form-control[readonly] {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
}

/* Success indicators */
.upload-success-indicator {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #28a745;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}
/* 
Logo Styling */
.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    background: white;
    padding: 4px;
}

.logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0.5rem;
    transition: transform 0.3s ease;
}

.navbar-brand:hover .logo-image {
    transform: scale(1.05);
}

.navbar-brand:hover .brand-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-fallback {
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}
/* i
OS-specific file input improvements */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari specific styles */
    input[type="file"] {
        -webkit-appearance: none;
        appearance: none;
        background: rgba(255, 255, 255, 0.95);
        border: 2px solid var(--primary-color);
        border-radius: 0.75rem;
        padding: 1rem;
        font-size: 1rem;
        cursor: pointer;
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }
    
    input[type="file"]::-webkit-file-upload-button {
        -webkit-appearance: none;
        appearance: none;
        background: var(--gradient-primary);
        border: none;
        border-radius: 0.5rem;
        color: white;
        padding: 0.5rem 1rem;
        margin-right: 1rem;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    input[type="file"]::-webkit-file-upload-button:hover {
        transform: scale(1.05);
        box-shadow: var(--shadow-md);
    }
    
    input[type="file"]:focus {
        outline: none;
        border-color: var(--primary-dark);
        box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
        transform: translateY(-1px);
    }
    
    input[type="file"]:active {
        transform: scale(0.98);
    }
}

/* Enhanced file input for all platforms */
.form-control[type="file"] {
    background: rgba(255, 255, 255, 0.95);
    border: 2px dashed var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-control[type="file"]:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.form-control[type="file"]:focus {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

/* File input label enhancement */
.form-label[for="fileInput"] {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-label[for="fileInput"]:hover {
    color: var(--primary-color);
    transform: translateX(4px);
}

/* iOS touch improvements */
@media (hover: none) and (pointer: coarse) {
    /* Touch devices (iOS) */
    input[type="file"] {
        min-height: 60px;
        font-size: 1.1rem;
        padding: 1.25rem;
    }
    
    .form-control[type="file"] {
        min-height: 140px;
        font-size: 1.1rem;
    }
    
    .btn {
        min-height: 48px;
        font-size: 1rem;
        padding: 0.875rem 1.75rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-header {
        padding: 1.25rem;
    }
    
    .modal-footer {
        padding: 1.25rem;
    }
}

/* iOS Safari specific file input fixes */
@media screen and (-webkit-min-device-pixel-ratio: 2) {
    input[type="file"] {
        /* Ensure proper rendering on retina displays */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

/* File input accessibility improvements for iOS */
input[type="file"]:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Enhanced upload modal for iOS */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    .modal-content {
        border-radius: 1rem;
    }
    
    .form-control[type="file"] {
        min-height: 100px;
        padding: 1rem;
    }
    
    input[type="file"] {
        font-size: 1rem;
        padding: 1rem;
    }
}