/* Enhanced Drag & Drop Styling */
[id^="drop-zone-"] {
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6 !important;
    border-radius: 12px !important;
    padding: 2rem !important;
    text-align: center !important;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

/* Hover state */
[id^="drop-zone-"]:hover {
    border-color: #00668c !important;
    background: linear-gradient(135deg, #e7f1ff 0%, #cce7ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 110, 253, 0.15);
}

/* Active drag over state */
[id^="drop-zone-"].bg-light {
    border-color: #198754 !important;
    background: linear-gradient(135deg, #d1eddb 0%, #a3d9a4 100%) !important;
    transform: scale(1.02);
    box-shadow: 0 12px 35px rgba(25, 135, 84, 0.2);
}

/* Animated background pattern */
[id^="drop-zone-"]::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 102, 140, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

[id^="drop-zone-"]:hover::before {
    opacity: 1;
}

/* Drag over animation */
[id^="drop-zone-"].bg-light::before {
    background: radial-gradient(circle, rgba(25, 135, 84, 0.1) 1px, transparent 1px);
    opacity: 1;
    animation: pulse-dots 1.5s ease-in-out infinite;
}

@keyframes pulse-dots {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

/* Text styling inside drop zone */
[id^="drop-zone-"] p {
    margin: 0 !important;
    font-weight: 500;
    color: #6c757d;
    transition: color 0.3s ease;
    position: relative;
    z-index: 1;
}

[id^="drop-zone-"]:hover p {
    color: #00668c;
}

[id^="drop-zone-"].bg-light p {
    color: #198754 !important;
    font-weight: 600;
}

/* Icon enhancement */
[id^="drop-zone-"]::after {
    content: '📁';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    opacity: 0.3;
    transition: all 0.3s ease;
    pointer-events: none;
}

[id^="drop-zone-"]:hover::after {
    opacity: 0.6;
    transform: scale(1.1);
}

[id^="drop-zone-"].bg-light::after {
    content: '✅';
    opacity: 0.8;
    transform: scale(1.2);
    animation: bounce 0.6s ease-in-out;
}

@keyframes bounce {

    0%,
    20%,
    53%,
    80%,
    100% {
        transform: scale(1.2);
    }

    40%,
    43% {
        transform: scale(1.4);
    }
}

/* File preview styling enhancement */
[id^="file-preview-"] {
    margin-top: 1rem !important;
}

[id^="file-preview-"] ul {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.5rem;
    border: 2px solid #00668c;
}

[id^="file-preview-"] li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.9rem;
    color: #495057;
}

[id^="file-preview-"] li:last-child {
    border-bottom: none;
}

/* Loading state animation */
.uploading [id^="drop-zone-"] {
    pointer-events: none;
    opacity: 0.7;
}

.uploading [id^="drop-zone-"]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #00668c;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 1;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success state */
.upload-success [id^="drop-zone-"] {
    border-color: #198754 !important;
    background: linear-gradient(135deg, #d1eddb 0%, #a3d9a4 100%);
    animation: success-pulse 0.6s ease-out;
}

@keyframes success-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Global Background Gradient */
.global-bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.12;
    will-change: transform;
    background: radial-gradient(ellipse 100vw 50vh at 5% 5%, var(--bs-primary, #6366f1), transparent 60%),
                radial-gradient(ellipse 80vw 40vh at 95% 10%, var(--bs-info, #06b6d4), transparent 65%),
                radial-gradient(ellipse 70vw 35vh at 50% 100%, var(--bs-warning, #f59e0b), transparent 70%);
}

/* Mobile-specific gradient optimization */
@media (max-width: 768px) {
    .global-bg-gradient {
        opacity: 0.08;
        background: radial-gradient(ellipse 120vw 60vh at 10% 10%, var(--bs-primary, #6366f1), transparent 70%),
                    radial-gradient(ellipse 100vw 50vh at 90% 20%, var(--bs-info, #06b6d4), transparent 75%);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    [id^="drop-zone-"] {
        padding: 1.5rem !important;
    }

    [id^="drop-zone-"]::after {
        top: 15px;
        right: 15px;
        font-size: 1.2rem;
    }
}