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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Animated Background - Enhanced */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        #667eea 0%, 
        #764ba2 10%, 
        #f093fb 20%, 
        #4facfe 30%,
        #00f2fe 40%,
        #43e97b 50%,
        #667eea 60%,
        #764ba2 70%,
        #f093fb 80%,
        #4facfe 90%,
        #667eea 100%);
    background-size: 400% 400%;
    z-index: -2;
    opacity: 0.15;
    animation: gradientFlow 20s ease infinite;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    25% { background-position: 50% 100%; }
    50% { background-position: 100% 50%; }
    75% { background-position: 50% 0%; }
    100% { background-position: 0% 50%; }
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 40, 200, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 40, 120, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(200, 40, 255, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 60% 60%, rgba(100, 200, 255, 0.3) 0%, transparent 50%);
    z-index: -1;
    animation: float 25s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { 
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 1;
    }
    25% { 
        transform: translate(30px, -30px) scale(1.1) rotate(5deg);
        opacity: 0.8;
    }
    50% { 
        transform: translate(-20px, 20px) scale(0.9) rotate(-5deg);
        opacity: 1;
    }
    75% { 
        transform: translate(20px, 30px) scale(1.05) rotate(3deg);
        opacity: 0.9;
    }
}

/* Processing Animation - Enhanced */
body.processing::before {
    animation: gradientShift 1.5s ease infinite;
    opacity: 0.4;
}

@keyframes gradientShift {
    0% { 
        background-position: 0% 0%;
        opacity: 0.4;
        filter: hue-rotate(0deg);
    }
    50% { 
        background-position: 100% 100%;
        opacity: 0.6;
        filter: hue-rotate(30deg);
    }
    100% { 
        background-position: 0% 0%;
        opacity: 0.4;
        filter: hue-rotate(0deg);
    }
}

/* Glass Morphism */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.dark .glass {
    background: rgba(30, 30, 50, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Logo Animation */
.logo-container {
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo-container:hover {
    transform: scale(1.15);
}

.logo-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 12px rgba(102, 126, 234, 0.5));
}

.gear-main {
    animation: gearRotate 4s linear infinite;
}

.gear-small {
    animation: gearRotateReverse 3s linear infinite;
}

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

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

/* Particle Effect */
.particle {
    position: fixed;
    pointer-events: none;
    border-radius: 50%;
    animation: particleFloat 3s ease-out forwards;
    z-index: 9999;
}

@keyframes particleFloat {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

/* Tool Card Styles */
.tool-card {
    display: block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 8px 32px 0 rgba(120, 40, 200, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

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

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

.dark .tool-card {
    background: rgba(30, 30, 50, 0.4);
    box-shadow: 0 8px 32px 0 rgba(200, 40, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.tool-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(120, 40, 200, 0.4);
    border-color: rgba(255, 100, 200, 0.6);
}

.dark .tool-card:hover {
    box-shadow: 0 20px 40px rgba(200, 40, 255, 0.5);
}

.tool-card:active {
    transform: translateY(-4px) scale(0.98);
}

.tool-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    position: relative;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.tool-card:hover .tool-icon {
    animation: iconBounce 0.6s ease;
}

@keyframes iconBounce {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-5deg); }
    75% { transform: scale(1.1) rotate(5deg); }
}

.tool-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
}

.dark .tool-title {
    color: #f9fafb;
}

.tool-description {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

.dark .tool-description {
    color: #9ca3af;
}

/* Upload Area */
.upload-area {
    border: 2px dashed rgba(200, 100, 255, 0.5);
    border-radius: 20px;
    padding: 48px 24px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(200, 100, 255, 0.3), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.upload-area:hover::before {
    width: 300px;
    height: 300px;
}

.dark .upload-area {
    border-color: rgba(200, 100, 255, 0.4);
    background: rgba(30, 30, 50, 0.3);
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: rgba(255, 100, 200, 0.8);
    background: rgba(255, 100, 200, 0.15);
    transform: scale(1.02);
    box-shadow: 0 10px 40px rgba(200, 100, 255, 0.3);
}

.dark .upload-area:hover,
.dark .upload-area.drag-over {
    border-color: rgba(255, 100, 200, 0.8);
    background: rgba(200, 100, 255, 0.2);
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: none;
    font-size: 16px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(120, 40, 200, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(120, 40, 200, 0.6);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: #374151;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.dark .btn-secondary {
    background: rgba(30, 30, 50, 0.4);
    color: #e5e7eb;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.dark .btn-secondary:hover {
    background: rgba(30, 30, 50, 0.6);
}

/* Loading Spinner */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

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

/* Enhanced Loading Animation */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.loading-dots {
    display: flex;
    gap: 8px;
}

.loading-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    animation: dotPulse 1.4s ease-in-out infinite;
}

.loading-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotPulse {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.loading-text {
    color: #667eea;
    font-weight: 600;
    animation: textPulse 1.5s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.dark .progress-bar {
    background: rgba(30, 30, 50, 0.4);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 100%;
    animation: progressShine 2s linear infinite;
    transition: width 0.3s ease;
    border-radius: 4px;
}

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

/* File Preview */
.file-preview {
    display: flex;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideIn 0.3s ease;
}

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

.dark .file-preview {
    background: rgba(30, 30, 50, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.file-preview img {
    max-width: 60px;
    max-height: 60px;
    border-radius: 8px;
    margin-right: 12px;
    box-shadow: 0 4px 10px rgba(120, 40, 200, 0.3);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: rippleEffect 0.6s ease-out;
    pointer-events: none;
}

@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Glow Effect */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(120, 40, 200, 0.5),
                    0 0 40px rgba(200, 40, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(120, 40, 200, 0.8),
                    0 0 60px rgba(200, 40, 255, 0.5);
    }
}

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

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.dark ::-webkit-scrollbar-track {
    background: rgba(30, 30, 50, 0.3);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #f093fb 50%, #667eea 100%);
}

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


/* Floating Orbs Background */
.floating-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    pointer-events: none;
    z-index: -1;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(167, 85, 247, 0.8), transparent);
    top: -200px;
    left: -200px;
    animation: floatOrb1 20s ease-in-out infinite;
}

.orb-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.8), transparent);
    bottom: -175px;
    right: -175px;
    animation: floatOrb2 18s ease-in-out infinite;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.6), transparent);
    top: 50%;
    left: 50%;
    animation: floatOrb3 22s ease-in-out infinite;
}

@keyframes floatOrb1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(100px, 100px) scale(1.2); }
    66% { transform: translate(-50px, 150px) scale(0.9); }
}

@keyframes floatOrb2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-100px, -100px) scale(1.1); }
    66% { transform: translate(50px, -150px) scale(0.95); }
}

@keyframes floatOrb3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(calc(-50% + 100px), calc(-50% - 100px)) scale(1.15); }
}

/* Hover glow for interactive elements */
.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    filter: drop-shadow(0 0 20px rgba(167, 85, 247, 0.6));
}

/* Pulse animation for icons */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Shimmer effect */
.shimmer {
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

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


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

/* Copyright Protection */
body::after {
    content: '© 2024 SHUBHAMOS Utils - All Rights Reserved';
    position: fixed;
    bottom: -100px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 0;
    opacity: 0;
    pointer-events: none;
}

/* Disable text selection on most elements */
* {
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Allow selection in inputs */
input, textarea, [contenteditable="true"] {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}
