.images {
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.3) transparent;
    -ms-overflow-style: none;
}
.images::-webkit-scrollbar {
    width: 6px;
}
.images::-webkit-scrollbar-track {
    background: rgba(39, 39, 42, 0.3);
    border-radius: 3px;
}
.images::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    border-radius: 3px;
    transition: all 0.2s ease;
}
.images::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7c3aed, #9333ea);
}

.logo-glow {
    text-shadow: 0 0 20px rgba(139, 92, 246, 0.4), 0 0 40px rgba(139, 92, 246, 0.2);
    background: linear-gradient(135deg, #a855f7, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.upload-area {
    background: rgba(39, 39, 42, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.1);
    transition: all 0.3s ease;
}
.upload-area:hover {
    background: rgba(39, 39, 42, 0.8);
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(139, 92, 246, 0.1);
}

.preview-container {
    background: rgba(39, 39, 42, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(63, 63, 70, 0.5);
    transition: all 0.3s ease;
}
.preview-container:hover {
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.btn-primary {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border: 0;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}
.btn-primary:not(:disabled):hover::before {
    left: 100%;
}
.btn-primary:not(:disabled):hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.4);
}
.btn-primary:active {
    transform: translateY(0);
}
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: linear-gradient(135deg, #4b5563, #374151);
    border: 1px solid rgba(75, 85, 99, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}
.btn-secondary:not(:disabled):hover::before {
    left: 100%;
}
.btn-secondary:not(:disabled):hover {
    background: linear-gradient(135deg, #374151, #1f2937);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}
.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.progress-bar {
    background: linear-gradient(90deg, #8b5cf6, #a855f7, #c084fc);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
    animation: progress-glow 2s ease-in-out infinite alternate;
}
@keyframes progress-glow {
    0% { box-shadow: 0 0 20px rgba(139, 92, 246, 0.3); }
    100% { box-shadow: 0 0 30px rgba(139, 92, 246, 0.6); }
}

.modal-backdrop {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.modal-content {
    background: linear-gradient(135deg, rgba(24, 24, 27, 0.95), rgba(39, 39, 42, 0.9));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(63, 63, 70, 0.3);
}

.main-modal {
    background: linear-gradient(135deg, rgba(24, 24, 27, 0.95), rgba(39, 39, 42, 0.9));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(63, 63, 70, 0.3);
}

.images-grid {
    background: linear-gradient(135deg, rgba(24, 24, 27, 0.6), rgba(39, 39, 42, 0.4));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(63, 63, 70, 0.2);
}

@media (max-width: 640px) {
    .images {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 0.5rem !important;
        max-height: 220px !important;
        min-height: 120px !important;
        padding-right: 0 !important;
        scrollbar-width: none;
    }
    .images::-webkit-scrollbar {
        display: none;
    }
    .result-img-wrapper {
        width: 56px !important;
        height: 56px !important;
        min-width: 0 !important;
        min-height: 0 !important;
        margin: 0 auto !important;
        border-radius: 0.75rem !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15), 0 0 10px rgba(139, 92, 246, 0.1);
        border: 1.5px solid rgba(63, 63, 70, 0.6) !important;
        background: linear-gradient(135deg, #18181b, #27272a) !important;
        transition: all 0.2s ease !important;
    }
    .result-img-wrapper:hover {
        transform: scale(1.05) !important;
        box-shadow: 0 6px 20px rgba(0,0,0,0.2), 0 0 15px rgba(139, 92, 246, 0.2) !important;
    }
    .images img {
        width: 52px !important;
        height: 52px !important;
        object-fit: cover !important;
        border-radius: 0.7rem !important;
    }
    .images .result-checkbox,
    .images svg {
        top: 4px !important;
        right: 4px !important;
        width: 22px !important;
        height: 22px !important;
    }
} 

.discord-btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(24, 24, 27, 0.8), rgba(39, 39, 42, 0.6));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(63, 63, 70, 0.3);
    transition: all 0.3s ease;
}
.discord-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.1), transparent);
    transition: left 0.6s ease;
}
.discord-btn:hover::before {
    left: 100%;
}

.discord-icon {
    transition: all 0.3s ease;
}

.discord-btn:hover {
    background: linear-gradient(135deg, rgba(39, 39, 42, 0.95), rgba(24, 24, 27, 0.9));
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.15), 0 0 20px rgba(139, 92, 246, 0.1);
}

.discord-btn:hover .discord-icon,
.discord-btn:hover span {
    color: #a78bfa !important;
    filter: drop-shadow(0 0 8px rgba(167, 139, 250, 0.3));
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(139, 92, 246, 0.2);
    border-top: 3px solid #8b5cf6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.footer-enhanced {
    background: linear-gradient(135deg, rgba(24, 24, 27, 0.95), rgba(39, 39, 42, 0.9));
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(63, 63, 70, 0.2);
}

/* Clean Header Navigation Styles */
header {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-tab {
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-tab.active {
    background: rgba(139, 92, 246, 0.15);
    color: rgb(196, 181, 253);
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.1);
}

.tool-tab:not(.active):hover {
    background: rgba(63, 63, 70, 0.8);
    color: rgb(228, 228, 231);
    transform: translateY(-1px);
}

.tool-tab-mobile {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-tab-mobile.active {
    background: rgba(139, 92, 246, 0.15);
    color: rgb(196, 181, 253);
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.1);
}

.tool-tab-mobile:not(.active):hover {
    background: rgba(63, 63, 70, 0.8);
    color: rgb(228, 228, 231);
}

/* Smooth page transitions */
body {
    transition: opacity 0.3s ease;
}

/* Header animation on load */
@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header {
    animation: slideInFromTop 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile navigation enhancements */
@media (max-width: 768px) {
    .tool-tab-mobile {
        border-radius: 8px;
        font-weight: 500;
        padding: 12px 16px;
    }
    
    .tool-tab-mobile.active {
        font-weight: 600;
        box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
    }
    
    /* Mobile spacing adjustment */
    .pt-16.md\\:pt-16.pb-4 {
        padding-top: 8rem; /* Accounts for both header and mobile nav */
    }
}

@media (min-width: 768px) {
    .pt-16.md\\:pt-16.pb-4 {
        padding-bottom: 0;
    }
}

/* Subtle glow effect for active tab */
.tool-tab.active::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, rgba(139, 92, 246, 0.2), rgba(168, 85, 247, 0.2));
    border-radius: 10px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tool-tab.active:hover::before {
    opacity: 1;
}