/**
 * TikTok Video Downloader - Custom Styles
 * Modern, responsive styling with TikTok-inspired animations
 */

/* Custom animations and transitions - Simple and clean */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation utilities - Minimal and non-intrusive */
.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

.animate-slide-in {
    animation: slideIn 0.3s ease-out;
}

/* TikTok-specific gradients */
.gradient-tiktok {
    background: linear-gradient(135deg, #ff0050, #ff4081, #e91e63);
}

.gradient-tiktok-subtle {
    background: linear-gradient(135deg, rgba(255, 0, 80, 0.1), rgba(255, 64, 129, 0.1));
}

/* Enhanced input styling */
#tiktok-url {
    position: relative;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border: 2px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#tiktok-url:focus {
    background: #ffffff;
    border-color: #ec4899;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.1);
}

#tiktok-url::placeholder {
    color: #94a3b8;
    transition: color 0.2s ease;
}

#tiktok-url:focus::placeholder {
    color: #cbd5e1;
}

/* Simple button effects */
.btn-primary {
    background: #ec4899;
    transition: background-color 0.2s ease;
}

.btn-primary:hover {
    background: #db2777;
}

/* Quality option cards with enhanced interactions */
.quality-option {
    position: relative;
}

.quality-option::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(236, 72, 153, 0.05));
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.quality-option:hover::before {
    opacity: 1;
}

.quality-option input:checked + div {
    background: linear-gradient(135deg, #fce7f3, #fdf2f8);
    border-color: #ec4899;
    box-shadow: 0 2px 4px rgba(236, 72, 153, 0.1);
}

/* Simple video preview card */
#videoPreview {
    animation: fadeIn 0.3s ease-out;
}

/* Simple thumbnail effects */
#videoThumbnail {
    transition: transform 0.2s ease;
}

.group:hover #videoThumbnail {
    transform: scale(1.01);
}

/* Simple hashtag hover */
#videoHashtags span {
    transition: background-color 0.2s ease;
    cursor: default;
}

#videoHashtags span:hover {
    background-color: rgba(59, 130, 246, 0.15);
}

/* Toast notification enhancements */
#toast {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#toast > div {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Loading spinner enhancements */
#loadingSpinner .bg-white {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    animation: bounceIn 0.6s ease-out;
}

/* Error message styling */
#errorMessage .bg-white {
    background: linear-gradient(145deg, #ffffff, #fef2f2);
    border-color: #fecaca;
}

/* Badge hover effects */
.px-3.py-1 {
    transition: all 0.2s ease;
    cursor: default;
}

.px-3.py-1:hover {
    transform: translateY(-1px) scale(1.05);
}

/* Step cards in how-to section */
.group .w-12.h-12 {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.group:hover .w-12.h-12 {
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 8px 25px -8px rgba(236, 72, 153, 0.4);
}

/* Feature list item hover effects */
.flex.items-start.space-x-4:hover .w-8.h-8 {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, #fce7f3, #fdf2f8);
}

/* Responsive enhancements */
@media (max-width: 768px) {
    .animate-pulse-subtle {
        animation-duration: 3s;
    }

    /* Reduce motion for mobile */
    .transform {
        transition-duration: 0.2s;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    #tiktok-url {
        border-width: 3px;
    }

    .btn-primary {
        border: 2px solid #dc2626;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .animate-pulse-subtle,
    .animate-progress-bar,
    .animate-float,
    .animate-glow {
        animation: none;
    }
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ec4899, #dc2626);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #db2777, #b91c1c);
}

/* Focus styles for accessibility */
button:focus,
input:focus,
label:focus {
    outline: 2px solid #ec4899;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .animate-pulse-subtle,
    .animate-progress-bar,
    .animate-float,
    .animate-glow {
        animation: none;
    }

    .gradient-tiktok {
        background: #ec4899 !important;
    }
}

/* Additional utility classes */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Selection styling */
::selection {
    background: rgba(236, 72, 153, 0.2);
    color: #1f2937;
}

/* Smooth page transitions */
html {
    scroll-behavior: smooth;
}

/* Enhanced shadows */
.shadow-tiktok {
    box-shadow: 0 10px 25px -3px rgba(236, 72, 153, 0.1), 0 4px 6px -2px rgba(236, 72, 153, 0.05);
}

.shadow-tiktok-lg {
    box-shadow: 0 25px 50px -12px rgba(236, 72, 153, 0.25), 0 10px 10px -5px rgba(236, 72, 153, 0.04);
}
