/* Video HLS Converter - Custom Styles */

/* Drag and Drop Styles */
#dropZone.dragover {
    border-color: #6366f1;
    background-color: rgba(99, 102, 241, 0.1);
    transform: scale(1.02);
}

#dropZone.dragover svg {
    animation: bounce 0.5s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Video Card Styles */
.video-card {
    transition: all 0.3s ease;
}

.video-card:hover {
    transform: translateY(-4px);
}

.video-card:hover .thumbnail-overlay {
    opacity: 1;
}

.thumbnail-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Progress Animation */
.progress-bar {
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #6366f1);
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
}

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

/* Status Badge Styles */
.status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 500;
}

.status-uploading {
    background-color: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.status-processing {
    background-color: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.status-converting {
    background-color: rgba(168, 85, 247, 0.2);
    color: #a855f7;
}

.status-completed {
    background-color: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.status-error {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Quality Button Styles */
.quality-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.quality-btn:not(.active) {
    background-color: #374151;
    color: #9ca3af;
}

.quality-btn:not(.active):hover {
    background-color: #4b5563;
    color: #f3f4f6;
}

.quality-btn.active {
    background-color: #6366f1;
    color: white;
}

/* Toast Styles */
.toast {
    animation: slideIn 0.3s ease forwards;
}

.toast.hiding {
    animation: slideOut 0.3s ease forwards;
}

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

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Modal Animation */
#playerModal.flex {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Video Player Styles */
#videoPlayer {
    max-height: 70vh;
    background-color: #000;
}

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

::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Spinner Animation */
.spinner {
    animation: spin 1s linear infinite;
}

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

/* Pulse Animation for Processing */
.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Thumbnail Placeholder */
.thumbnail-placeholder {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
}

/* File Size Formatting */
.file-size {
    font-variant-numeric: tabular-nums;
}

/* Duration Badge */
.duration-badge {
    background-color: rgba(0, 0, 0, 0.75);
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Responsive Grid Adjustments */
@media (max-width: 640px) {
    #dropZone {
        padding: 2rem;
    }

    #dropZone p {
        font-size: 0.875rem;
    }
}

/* Delete Button Hover */
.delete-btn {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.video-card:hover .delete-btn {
    opacity: 1;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
