/* IDtop Video Gallery - Youth-focused Modern Design */
/* ================================================= */

/* Video Hero Section */
.video-hero {
    position: relative;
    background: var(--primary-gradient);
    padding: 8rem 0 4rem;
    overflow: hidden;
    border-radius: 0 0 var(--radius-3xl) var(--radius-3xl);
}

.video-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(139, 92, 246, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(16, 185, 129, 0.2) 0%, transparent 50%);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.3), transparent);
    animation: particleFloat 8s ease-in-out infinite alternate;
}

@keyframes particleFloat {
    0% { transform: translateY(0px) translateX(0px); }
    100% { transform: translateY(-10px) translateX(5px); }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-title i {
    color: rgba(255, 255, 255, 0.9);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Filters Section */
.filters-section {
    background: var(--gray-50);
    padding: 3rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.video-filters {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
}

.search-input, .filter-select {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all var(--transition-normal);
    background: var(--white);
}

.search-input:focus, .filter-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all var(--transition-normal);
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* Main Videos Section */
.videos-main {
    padding: 4rem 0;
    background: var(--white);
}

.video-section {
    margin-bottom: 4rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.section-title i {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.video-card {
    background: var(--white);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    transition: all var(--transition-normal);
    position: relative;
}

.video-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-2xl);
    border-color: rgba(99, 102, 241, 0.3);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: var(--gray-100);
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.1);
}

.video-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--gray-200), var(--gray-300));
    color: var(--gray-500);
}

.video-placeholder i {
    font-size: 3rem;
    opacity: 0.6;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

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

.play-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 2rem;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
}

.play-button:hover {
    background: var(--white);
    transform: scale(1.1);
    color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.video-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-gradient);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: var(--shadow-md);
}

.product-badge {
    background: var(--accent-gradient);
}

.video-content {
    padding: 1.5rem;
}

.video-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.video-title a {
    color: var(--gray-900);
    text-decoration: none;
    transition: color var(--transition-normal);
}

.video-title a:hover {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.video-description {
    color: var(--gray-600);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.video-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--gray-500);
}

.video-location, .video-date, .video-price {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.video-location i, .video-date i, .video-price i {
    font-size: 0.8rem;
}

.product-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

/* Product Video Card Specific Styles */
.product-video-card .video-badge {
    background: linear-gradient(135deg, var(--sunset-orange), var(--accent-color));
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.product-video-card:hover {
    border-color: rgba(245, 158, 11, 0.3);
}

.product-video-card .video-badge i {
    font-size: 0.75rem;
}

.discount-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: var(--white);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: var(--shadow-md);
    animation: pulse 2s ease-in-out infinite;
}

.video-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.original-price {
    text-decoration: line-through;
    color: var(--gray-400);
    font-size: 0.8rem;
}

.current-price {
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 0.95rem;
}

.quick-add-btn {
    transition: all var(--transition-normal);
}

.quick-add-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.quick-add-btn.adding {
    background: var(--success-color) !important;
    border-color: var(--success-color) !important;
}

.quick-add-btn.adding i {
    animation: bounce 0.5s ease-in-out;
}

/* Product Video Modal Enhancements */
.video-modal .modal-header[data-video-type="product"] {
    background: linear-gradient(135deg, var(--sunset-orange), var(--accent-color));
    color: var(--white);
}

.video-modal .modal-header[data-video-type="product"] .btn-close {
    filter: invert(1);
}

.product-btn-detail {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-lg);
    background: transparent;
    color: var(--primary-color);
    text-decoration: none;
    transition: all var(--transition-normal);
    overflow: hidden;
    cursor: pointer;
    z-index: 1;
}


/* Loading state for quick add */
.product-video-card.adding-to-cart {
    opacity: 0.7;
    transform: scale(0.98);
    transition: all var(--transition-normal);
}

/* Success state animation */
.product-video-card.added-to-cart {
    animation: addedToCartPulse 0.6s ease-in-out;
}

@keyframes addedToCartPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Product video hover effects */
.product-video-card:hover .video-badge {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

.product-video-card:hover .discount-badge {
    transform: scale(1.1);
    animation-duration: 1s;
}

/* Video Modal */
.modal-content {
    border: none;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-2xl);
}

.modal-header {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    padding: 1.5rem 2rem;
}

.modal-title {
    font-weight: 700;
    color: var(--gray-900);
}

.video-player-wrapper {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--black);
}

#modalVideo {
    width: 100%;
    height: 100%;
    background: var(--black);
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray-600);
}

.no-results-content {
    max-width: 400px;
    margin: 0 auto;
}

.no-results i {
    font-size: 4rem;
    color: var(--gray-400);
    margin-bottom: 1.5rem;
    display: block;
}

.no-results h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 1rem;
}

.no-results p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .video-hero {
        padding: 6rem 0 3rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .filters-section {
        padding: 2rem 0;
    }
    
    .video-filters {
        padding: 1.5rem;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .video-card {
        margin: 0 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .video-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .play-button {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .video-filters .row {
        --bs-gutter-x: 1rem;
    }
    
    .video-card {
        margin: 0;
    }
    
    .video-content {
        padding: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    .hero-particles,
    .play-button:hover,
    .video-card:hover,
    .filter-btn:hover {
        animation: none;
        transform: none;
    }
    
    .video-thumbnail img {
        transition: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .video-card {
        border: 2px solid var(--gray-800);
    }
    
    .video-overlay {
        background: rgba(0, 0, 0, 0.8);
    }
    
    .play-button {
        background: var(--white);
        border: 2px solid var(--primary-color);
    }
}

/* Focus states for accessibility */
.play-button:focus,
.filter-btn:focus,
.search-input:focus,
.filter-select:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Loading states */
.video-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

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

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Custom scrollbar for modal */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: var(--radius-full);
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: var(--radius-full);
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}