:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #ec4899;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-gray: #f9fafb;
    --medium-gray: #e5e7eb;
    --dark-gray: #6b7280;
    --text-dark: #1f2937;
    --gradient-1: #667eea;
    --gradient-2: #764ba2;
    --gradient-3: #f093fb;
    --gradient-4: #f5576c;
}

body {
    background: linear-gradient(135deg, var(--gradient-1) 0%, var(--gradient-2) 50%, var(--gradient-3) 75%, var(--gradient-4) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
}

.card {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.drop-zone {
    border: 3px dashed var(--primary-color);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%);
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.drop-zone::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--success-color), var(--primary-color));
    border-radius: 20px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.drop-zone:hover {
    border-color: transparent;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    transform: translateY(-3px);
    box-shadow: 0 20px 40px -12px rgba(99, 102, 241, 0.4);
}

.drop-zone:hover::before {
    opacity: 0.7;
}

.drop-zone.dragover {
    border-color: transparent;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    transform: scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(16, 185, 129, 0.5);
}

.drop-zone.dragover::before {
    opacity: 1;
}

.file-item {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--medium-gray);
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 12px;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
}

.file-item:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

.file-preview {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.file-info h6 {
    margin: 0;
    color: #333;
}

.file-size {
    font-size: 0.9em;
    color: var(--dark-gray);
}

.result-item {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--medium-gray);
    border-radius: 18px;
    padding: 24px;
    margin-bottom: 18px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
}

.result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.result-image-container {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    overflow: hidden;
    background: var(--light-gray);
    border: 2px solid #e0e0e0;
}

.result-image-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.alert-sm {
    padding: 8px 12px;
    font-size: 0.875em;
    border-radius: 6px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.compression-stats {
    background: linear-gradient(135deg, var(--light-gray) 0%, rgba(255, 255, 255, 0.8) 100%);
    border-radius: 14px;
    padding: 20px;
    margin: 15px 0;
    border: 1px solid var(--medium-gray);
    backdrop-filter: blur(5px);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.9em;
    color: var(--dark-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.savings-positive {
    color: var(--success-color);
}

.savings-negative {
    color: var(--warning-color);
}

.btn {
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.4s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--primary-color) 100%);
    color: white;
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    backdrop-filter: blur(10px);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
    box-shadow: 0 12px 25px rgba(99, 102, 241, 0.4);
}

.btn-success:hover {
    box-shadow: 0 12px 25px rgba(16, 185, 129, 0.4);
}

.progress {
    height: 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--medium-gray) 0%, var(--light-gray) 100%);
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    border-radius: 12px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--success-color) 100%);
    background-size: 200% 100%;
    animation: progressGradient 2s ease-in-out infinite;
}

@keyframes progressGradient {
    0% { background-position: 200% 0%; }
    50% { background-position: 0% 0%; }
    100% { background-position: -200% 0%; }
}

.remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--danger-color);
    border: none;
    color: white;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

.compression-settings {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(236, 72, 153, 0.08) 100%);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    backdrop-filter: blur(10px);
}

.results-section {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(99, 102, 241, 0.08) 100%);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(16, 185, 129, 0.1);
    backdrop-filter: blur(10px);
}

.alert-custom {
    border: none;
    border-radius: 10px;
    padding: 15px 20px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container-fluid {
        padding: 10px;
    }
    
    .card-body {
        padding: 20px 15px;
    }
    
    .drop-zone {
        padding: 30px 15px;
    }
    
    .file-item {
        padding: 10px;
    }
    
    .result-item {
        padding: 15px;
    }
}