* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow-x: hidden;
}

/* Glass morphism effect */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Floating animation */
.floating-element {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #8b5cf6, #ec4899);
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #7c3aed, #db2777);
}

/* Operation card hover effects */
.operation-card {
    position: relative;
    overflow: hidden;
}

.operation-card::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;
}

.operation-card:hover::before {
    left: 100%;
}

/* Toast notification styles */
.toast {
    display: flex;
    align-items: center;
    min-width: 320px;
    max-width: 450px;
    padding: 18px;
    margin-bottom: 10px;
    border-radius: 16px;
    color: white;
    font-weight: 500;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.95), rgba(22, 163, 74, 0.95));
    border-color: rgba(34, 197, 94, 0.3);
}

.toast.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.95), rgba(220, 38, 38, 0.95));
    border-color: rgba(239, 68, 68, 0.3);
}

.toast.info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.95), rgba(37, 99, 235, 0.95));
    border-color: rgba(59, 130, 246, 0.3);
}

.toast.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.95), rgba(217, 119, 6, 0.95));
    border-color: rgba(245, 158, 11, 0.3);
}

.toast-icon {
    width: 24px;
    height: 24px;
    margin-right: 14px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    margin-bottom: 4px;
    font-size: 16px;
}

.toast-message {
    font-size: 14px;
    opacity: 0.95;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 6px;
    margin-left: 12px;
    opacity: 0.7;
    transition: all 0.2s;
    border-radius: 6px;
}

.toast-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

/* Progress bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 16px 16px;
    animation: progress 5s linear forwards;
}

@keyframes progress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Drag and drop states */
.drop-zone-active {
    border-color: #8b5cf6 !important;
    background: rgba(139, 92, 246, 0.15) !important;
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
}

.drop-zone-bulk-active {
    border-color: #06b6d4 !important;
    background: rgba(6, 182, 212, 0.15) !important;
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.3);
}

.drop-zone-invalid {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.15) !important;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Button loading state */
.btn-loading {
    pointer-events: none;
    opacity: 0.8;
    position: relative;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* File list items */
.file-item {
    display: flex;
    items-center: center;
    justify-content: space-between;
    padding: 12px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(71, 85, 105, 0.3);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.file-item:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateX(4px);
}

.file-item.invalid {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.1);
}

/* Pulse animation for upload zones */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(139, 92, 246, 0.6);
    }
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .glass-card {
        margin: 16px;
        padding: 20px !important;
    }
    
    .toast {
        min-width: 280px;
        max-width: 320px;
        margin: 0 16px 8px 0;
    }
    
    #toast-container {
        right: 0;
        left: 0;
        padding: 0 16px;
    }

    .operation-card {
        padding: 20px !important;
    }
}

@media (max-width: 640px) {
    .grid {
        grid-template-columns: 1fr;
    }
    
    .floating-element h1 {
        font-size: 2.5rem !important;
    }
}

/* Smooth transitions for all interactive elements */
button, input, .glass-card, .operation-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus states for accessibility */
button:focus-visible,
input:focus-visible {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
}

/* Custom file input styling */
input[type="file"] {
    opacity: 0;
    position: absolute;
    z-index: -1;
}

/* Advanced animations */
.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.fade-out {
    animation: fadeOut 0.4s ease-out forwards;
}

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

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

/* Success checkmark animation */
@keyframes checkmark {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.3) rotate(180deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

.checkmark-animation {
    animation: checkmark 0.6s ease-out forwards;
}

/* Loading spinner variations */
@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.spin-slow {
    animation: spin-slow 2s linear infinite;
}

/* Progress bar animations */
@keyframes progress-fill {
    from {
        width: 0%;
    }
    to {
        width: var(--progress-width);
    }
}

.progress-animate {
    animation: progress-fill 0.5s ease-out forwards;
}

/* Hover glow effects */
.hover-glow:hover {
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.4);
}

/* File validation states */
.file-valid {
    border-color: rgba(34, 197, 94, 0.5) !important;
    background: rgba(34, 197, 94, 0.05) !important;
}

.file-invalid {
    border-color: rgba(239, 68, 68, 0.5) !important;
    background: rgba(239, 68, 68, 0.05) !important;
}

/* Advanced button states */
.btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.4);
}

.btn-error {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    animation: shake 0.5s ease-in-out;
}

/* Notification entrance animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast-enter {
    animation: slideInRight 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast-exit {
    animation: slideOutRight 0.3s ease-in;
}

/* Enhanced visual feedback */
.processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.processing-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Advanced micro-interactions */
.micro-bounce:active {
    transform: scale(0.98);
}

.micro-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* File counter badge */
.file-counter {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ec4899, #be185d);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Enhanced focus states */
.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.5);
}

/* Gradient text effects */
.gradient-text {
    background: linear-gradient(135deg, #8b5cf6, #ec4899, #06b6d4);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Loading states */
.skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1) 25%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.1) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Success state animations */
@keyframes success-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(34, 197, 94, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.success-pulse {
    animation: success-pulse 1s ease-out;
}

/* Error state animations */
@keyframes error-shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}

.error-shake {
    animation: error-shake 0.6s ease-in-out;
}

/* Advanced hover states */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Responsive typography */
@media (max-width: 768px) {
    .text-responsive-xl {
        font-size: 1.5rem;
    }
    
    .text-responsive-2xl {
        font-size: 1.875rem;
    }
    
    .text-responsive-4xl {
        font-size: 2.5rem;
    }
}

/* Enhanced button styles */
.btn-primary {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    border: none;
    color: white;
    font-weight: 600;
    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.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(139, 92, 246, 0.4);
}

/* File upload progress */
.upload-progress {
    position: relative;
    overflow: hidden;
}

.upload-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.3), rgba(236, 72, 153, 0.3));
    transition: width 0.3s ease;
    width: var(--progress, 0%);
}

/* Advanced visual effects */
.neon-glow {
    box-shadow: 
        0 0 5px rgba(139, 92, 246, 0.5),
        0 0 10px rgba(139, 92, 246, 0.3),
        0 0 15px rgba(139, 92, 246, 0.2);
}

.neon-glow:hover {
    box-shadow: 
        0 0 10px rgba(139, 92, 246, 0.7),
        0 0 20px rgba(139, 92, 246, 0.5),
        0 0 30px rgba(139, 92, 246, 0.3);
}