/* Fade Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scale Animations */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Loading Animations */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

/* Progress Bar Animation */
@keyframes progress {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* Button Hover Effects */
.primary-button {
    position: relative;
    overflow: hidden;
}

.primary-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s ease-out;
}

.primary-button:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

.fade-in-down {
    animation: fadeInDown 0.5s ease forwards;
}

.scale-in {
    animation: scaleIn 0.5s ease forwards;
}

.pulse {
    animation: pulse 2s infinite;
}

/* Loading States */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0,0,0,0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-shimmer {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.2),
        transparent
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
}

/* Upload Animation */
.dropzone.dragover {
    animation: pulse 0.5s ease;
}

/* Preview Card Animations */
.preview-card {
    animation: scaleIn 0.3s ease;
}

.preview-card:hover .preview-text {
    transform: translateY(0);
    opacity: 1;
}

.preview-text {
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.3s ease;
}

/* Button States */
.primary-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.primary-button:active {
    transform: translateY(1px);
}

/* Success/Error States */
.success {
    animation: fadeInUp 0.3s ease;
    background: var(--success-color);
}

.error {
    animation: fadeInUp 0.3s ease;
    background: var(--error-color);
}

/* Progress Animation */
.progress-bar {
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.2),
        transparent
    );
    animation: shimmer 2s infinite linear;
}

/* Form Field Animations */
input:focus,
select:focus,
textarea:focus {
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

/* Section Transitions */
.section {
    transition: all 0.3s ease;
}

.section:hover {
    transform: translateY(-2px);
}

/* Grid Item Animations */
.grid-item {
    opacity: 0;
    transform: translateY(20px);
}

.grid-item.visible {
    animation: fadeInUp 0.5s ease forwards;
}

/* Stagger Animation Delays */
.stagger-animation > * {
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.stagger-animation > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation > *:nth-child(5) { animation-delay: 0.5s; }
