/* Advanced Features CSS */

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Notification System */
.notification {
    position: fixed;
    bottom: -100px;
    right: 2rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 10000;
    transition: bottom 0.3s ease;
    max-width: 400px;
}

.notification.show {
    bottom: 2rem;
}

.notification.success {
    border-left: 4px solid #4caf50;
}

.notification.error {
    border-left: 4px solid #f44336;
}

.notification.info {
    border-left: 4px solid #2196f3;
}

.notification::before {
    content: '';
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.notification.success::before {
    content: '✓';
    background: #4caf50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.notification.error::before {
    content: '✕';
    background: #f44336;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.notification.info::before {
    content: 'ℹ';
    background: #2196f3;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Video Player Enhancements */
video.preview-thumbnail {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

video.preview-thumbnail::-webkit-media-controls-panel {
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.7));
}

/* Media Grid Enhancements */
.media-grid {
    animation: fadeInUp 0.5s ease;
}

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

.media-item {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.media-item:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.media-item-overlay {
    font-size: 2rem;
    color: white;
}

/* Download Button Enhancements */
.quality-btn {
    position: relative;
    overflow: hidden;
}

.quality-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.quality-btn:hover::before {
    width: 300px;
    height: 300px;
}

.quality-btn:active {
    transform: scale(0.95);
}

/* Preview Info Enhancements */
.preview-info {
    animation: slideInFromLeft 0.5s ease;
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.preview-info h3 {
    background: linear-gradient(135deg, #e91e63 0%, #9c27b0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 4px;
    background: #f0f0f0;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 1rem;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #e91e63 0%, #9c27b0 100%);
    width: 0;
    transition: width 0.3s ease;
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    border-radius: 5px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    margin-bottom: 0.5rem;
}

.tooltip:hover::after {
    opacity: 1;
}

/* Pulse Animation for New Content */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Shimmer Effect */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .notification {
        right: 1rem;
        left: 1rem;
        max-width: none;
    }

    .notification.show {
        bottom: 1rem;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    .notification {
        background: #2d2d2d;
        color: white;
    }
}

/* Accessibility Enhancements */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Styles */
button:focus-visible,
input:focus-visible,
a:focus-visible {
    outline: 3px solid #e91e63;
    outline-offset: 2px;
}

/* Smooth Transitions */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

