/* Custom styles for Portfolio Generator */

/* Smooth scrolling behavior */
html {
    scroll-behavior: smooth;
}

/* Custom gradient animations */
@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Animated background */
.animated-bg {
    background: linear-gradient(-45deg, #667eea, #764ba2, #6B73FF, #9068BE);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

/* Custom select styling for better dark theme support */
select option {
    background-color: #1f2937;
    color: white;
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #06b6d4, #3b82f6);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #0891b2, #2563eb);
}

/* Preview frame styles */
.preview-frame {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Glass morphism effect */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hover effects for cards */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Pulse animation for loading states */
@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
    }
    50% {
        opacity: 0.8;
        box-shadow: 0 0 30px rgba(6, 182, 212, 0.5);
    }
}

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

/* Form input focus styles */
.form-input:focus {
    transform: scale(1.02);
    transition: transform 0.2s ease;
}

/* Custom theme preview cards */
.theme-card {
    position: relative;
    overflow: hidden;
}

.theme-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 ease;
}

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

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

/* Loading spinner */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #06b6d4;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

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

/* Success animation */
@keyframes bounce-in {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

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

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

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

/* Progress bar animation */
.progress-bar {
    background: linear-gradient(90deg, #06b6d4, #3b82f6, #8b5cf6);
    background-size: 200% 100%;
    animation: progress-flow 2s linear infinite;
}

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

/* Custom button styles */
.btn-primary {
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    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 ease;
}

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

/* Portfolio theme specific styles */
.portfolio-minimal {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.portfolio-creative {
    font-family: 'Inter', 'Helvetica Neue', sans-serif;
}

.portfolio-marketer {
    font-family: 'Poppins', 'Arial', sans-serif;
}

.portfolio-corporate {
    font-family: 'Roboto', 'Arial', sans-serif;
}

/* Dark mode optimizations */
@media (prefers-color-scheme: dark) {
    .auto-dark {
        color-scheme: dark;
    }
}