/* Tailwind CSS CDN */
@import url('https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css');

/* Custom CSS Variables */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --success-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Gradient Backgrounds */
.bg-gradient-primary {
    background: var(--primary-gradient);
}

.bg-gradient-secondary {
    background: var(--secondary-gradient);
}

.bg-gradient-accent {
    background: var(--accent-gradient);
}

.bg-gradient-success {
    background: var(--success-gradient);
}

/* Glassmorphism Effects */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Button Styles */
.btn-primary {
    background: var(--primary-gradient);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: var(--secondary-gradient);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(240, 147, 251, 0.3);
}

/* Card Styles */
.card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Upload Zone Styles */
.upload-zone {
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 48px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.5);
}

.upload-zone:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.upload-zone.dragover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.02);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Image Styles */
.image-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.image-container img,
.image-container canvas {
    width: 100%;
    height: auto;
    display: block;
}

/* Feature Icons */
.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: white;
    margin-bottom: 16px;
}

/* Navigation */
.nav-link {
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #667eea;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Footer Styles */
.footer {
    background: #1a202c;
    color: white;
    padding: 48px 0;
}

.footer-link {
    color: #a0aec0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .upload-zone {
        padding: 24px;
    }
    
    .card {
        margin-bottom: 16px;
    }
    
    .feature-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    /* Mobile navigation */
    .container {
        padding: 0 12px;
    }
    
    /* Mobile text sizing */
    .text-4xl { font-size: 28px !important; }
    .text-5xl { font-size: 32px !important; }
    .text-xl { font-size: 18px !important; }
    
    /* Mobile spacing */
    .py-16 { padding-top: 48px !important; padding-bottom: 48px !important; }
    .px-4 { padding-left: 16px !important; padding-right: 16px !important; }
    
    /* Mobile layout adjustments */
    .grid md:grid-cols-2 {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }
    
    .grid md:grid-cols-3 {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }
    
    /* Mobile button sizing */
    .px-8 { padding-left: 24px !important; padding-right: 24px !important; }
    .py-3 { padding-top: 12px !important; padding-bottom: 12px !important; }
    
    /* Mobile image preview */
    .image-container {
        margin-bottom: 16px;
    }
    
    /* Mobile footer adjustments */
    .grid md:grid-cols-3 {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 32px;
    }
}

/* Tablet responsive adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }
    
    .text-5xl { font-size: 36px !important; }
    
    /* Adjust grid gaps for tablet */
    .grid md:grid-cols-2 {
        gap: 32px;
    }
}

/* Large desktop optimizations */
@media (min-width: 1921px) {
    .container {
        max-width: 1400px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

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

.slide-in {
    animation: slideIn 0.8s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-gradient);
}

/* Utility Classes */
.text-gradient-primary {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-secondary {
    background: var(--secondary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-glow {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.border-gradient {
    border: 2px solid;
    border-image: var(--primary-gradient) 1;
}

/* Focus States */
button:focus,
input:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* Transitions */
.transition-all {
    transition: all 0.3s ease;
}

.transition-transform {
    transition: transform 0.3s ease;
}

.transition-colors {
    transition: color 0.3s ease;
}

/* Hidden Class */
.hidden {
    display: none !important;
}

/* Block Class */
.block {
    display: block !important;
}

/* Flex Classes */
.flex {
    display: flex !important;
}

.flex-center {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.flex-between {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

/* Spacing */
.mb-4 { margin-bottom: 16px !important; }
.mb-8 { margin-bottom: 32px !important; }
.mt-4 { margin-top: 16px !important; }
.mt-8 { margin-top: 32px !important; }
.p-4 { padding: 16px !important; }
.p-8 { padding: 32px !important; }

/* Text Alignment */
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

/* Border Radius */
.rounded { border-radius: 8px !important; }
.rounded-lg { border-radius: 12px !important; }
.rounded-xl { border-radius: 16px !important; }
.rounded-full { border-radius: 9999px !important; }

/* Shadows */
.shadow { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important; }
.shadow-md { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important; }
.shadow-lg { box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1) !important; }
.shadow-xl { box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1) !important; }

/* Font Sizes */
.text-sm { font-size: 14px !important; }
.text-base { font-size: 16px !important; }
.text-lg { font-size: 18px !important; }
.text-xl { font-size: 20px !important; }
.text-2xl { font-size: 24px !important; }
.text-3xl { font-size: 30px !important; }
.text-4xl { font-size: 36px !important; }

/* Font Weights */
.font-normal { font-weight: 400 !important; }
.font-medium { font-weight: 500 !important; }
.font-semibold { font-weight: 600 !important; }
.font-bold { font-weight: 700 !important; }

/* Colors */
.text-white { color: white !important; }
.text-gray-600 { color: #4a5568 !important; }
.text-gray-700 { color: #2d3748 !important; }
.text-gray-800 { color: #1a202c !important; }
.text-blue-600 { color: #667eea !important; }
.text-purple-600 { color: #764ba2 !important; }

/* Background Colors */
.bg-white { background-color: white !important; }
.bg-gray-50 { background-color: #f7fafc !important; }
.bg-gray-100 { background-color: #f3f4f6 !important; }
.bg-blue-50 { background-color: #ebf4ff !important; }
.bg-purple-50 { background-color: #f3e8ff !important; }

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }
}