/* ===================
   FLOATING PARTICLES 
   =================== */
.floating-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) { 
    width: 80px; 
    height: 80px; 
    top: 10%; 
    left: 10%; 
    animation-delay: 0s; 
}

.particle:nth-child(2) { 
    width: 120px; 
    height: 120px; 
    top: 70%; 
    left: 80%; 
    animation-delay: 2s; 
}

.particle:nth-child(3) { 
    width: 60px; 
    height: 60px; 
    top: 40%; 
    left: 70%; 
    animation-delay: 4s; 
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    33% { 
        transform: translateY(-20px) rotate(120deg); 
    }
    66% { 
        transform: translateY(10px) rotate(240deg); 
    }
}

/* ===================
   HEADER ANIMATIONS 
   =================== */
.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: movePattern 20s linear infinite;
}

@keyframes movePattern {
    0% { 
        transform: translate(0, 0); 
    }
    100% { 
        transform: translate(50px, 50px); 
    }
}

/* =================
   LOADING SPINNER 
   ================= */
.loading-spinner {
    animation: spin 1s linear infinite;
}

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

/* ===================
   FILE ITEM ANIMATIONS 
   ===================== */
.file-item:hover .file-icon {
    transform: scale(1.1) rotate(5deg);
}

/* =================
   MODAL ANIMATIONS 
   ================= */
.modal {
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    animation: modalScale 0.3s ease forwards;
}

@keyframes modalScale {
    to { 
        transform: scale(1); 
    }
}

/* ====================
   SUCCESS MESSAGE ANIMATION 
   ======================= */
.success-message {
    animation: slideIn 0.3s ease;
}

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

/* ====================
   HOVER EFFECTS & TRANSITIONS 
   ======================= */
.file-item {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.file-item::before {
    transition: all 0.4s ease;
}

.file-icon {
    transition: all 0.3s ease;
}

.breadcrumb-item {
    transition: all 0.3s ease;
}

.nav-btn, .upload-btn, .refresh-btn, .btn {
    transition: all 0.3s ease;
}

.upload-drop-zone {
    transition: all 0.3s ease;
}

.modal input, .modal textarea {
    transition: border-color 0.3s ease;
}

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

.progress-fill {
    transition: width 0.3s ease;
}

/* ===================
   BUTTON SHINE EFFECT 
   =================== */
.btn::before {
    transition: left 0.5s ease;
}

/* =================
   PULSING EFFECTS 
   ================= */
.loading-spinner {
    animation: spin 1s linear infinite;
}

/* Add pulse animation for active upload */
.upload-progress.active {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 8px 32px rgba(102, 126, 234, 0.2);
    }
    100% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    }
}

/* ======================
   MICRO INTERACTIONS 
   ====================== */
.breadcrumb-item:active {
    transform: scale(0.95);
}

.nav-btn:active, .upload-btn:active, .refresh-btn:active, .btn:active {
    transform: translateY(0) scale(0.95);
}

.file-item:active {
    transform: translateY(-4px) scale(1.01);
}

/* ==================
   LOADING STATES 
   ================== */
.file-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.file-item.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}