/* ===================================
   NovaCup - Videos Section
   =================================== */

.videos-section {
    position: relative;
    padding: 60px 0 50px !important;
    background: #0a0a0f;
    z-index: 1;
    overflow: hidden;
}

/* Particle Canvas */
.videos-bg-fixed {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

#videosParticleCanvas {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
}

/* Dark overlay */
.videos-bg-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(10,10,15,0.82) 0%, rgba(10,10,15,0.55) 50%, rgba(10,10,15,0.88) 100%);
    z-index: 1;
    pointer-events: none;
}

/* Header */
.videos-header {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 24px 30px;
}

.videos-subtitle {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
    margin-top: 10px;
    opacity: 0;
    transform: translateY(16px);
    transition: all 0.8s cubic-bezier(0.16,1,0.3,1) var(--delay, 0s);
}

.videos-subtitle.active {
    opacity: 1;
    transform: translateY(0);
}

/* Scroll Viewport - clips cards, shows exactly 5 */
.videos-scroll-wrapper {
    position: relative;
    z-index: 2;
    overflow: hidden;
    padding: 10px 0 20px;
    cursor: grab;
    user-select: none;
}

.videos-scroll-wrapper:active { cursor: grabbing; }

/* Track - holds all cards in a row */
.videos-track {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 16px;
    padding: 0 24px;
    will-change: transform;
}

/* Video Card - exactly 1/5 of wrapper width */
.video-card {
    flex: 0 0 calc(20% - 13px);
    min-width: 0;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.4s ease;
}

.video-card:hover {
    border-color: rgba(220,38,38,0.45);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 30px rgba(220,38,38,0.1);
}

/* Thumbnail */
.video-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    display: block;
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16,1,0.3,1);
}

.video-card:hover .video-thumb img {
    transform: scale(1.07);
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(10,10,15,0.85) 100%);
    pointer-events: none;
}

/* Play Button */
.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    width: 44px;
    height: 44px;
    background: rgba(220,38,38,0.15);
    border: 2px solid rgba(220,38,38,0.65);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    opacity: 0.75;
    z-index: 2;
}

.video-play-btn svg {
    width: 14px;
    height: 14px;
    fill: #fff;
    stroke: none;
    margin-right: -2px;
}

.video-card:hover .video-play-btn {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    background: rgba(220,38,38,0.3);
    box-shadow: 0 0 24px rgba(220,38,38,0.4);
}

/* Duration Badge */
.video-duration {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(10,10,15,0.8);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 100px;
    backdrop-filter: blur(8px);
    z-index: 2;
}

/* Video Info */
.video-info {
    padding: 12px 14px 14px;
}

.video-tag {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    color: #3b82f6;
    background: rgba(232,184,75,0.1);
    border: 1px solid rgba(232,184,75,0.22);
    padding: 2px 8px;
    border-radius: 100px;
    margin-bottom: 6px;
}

.video-info h4 {
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 3px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-info p {
    font-size: 0.74rem;
    color: rgba(255,255,255,0.38);
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Progress Bar */
.videos-progress-bar {
    position: relative;
    z-index: 2;
    width: 100px;
    height: 2px;
    background: rgba(255,255,255,0.08);
    border-radius: 100px;
    margin: 20px auto 0;
    overflow: hidden;
}

.videos-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #dc2626, #e8b84b);
    border-radius: 100px;
    transition: width 0.1s linear;
    box-shadow: 0 0 6px rgba(220,38,38,0.5);
}

/* Responsive */
@media (max-width: 1200px) {
    .video-card {
        flex: 0 0 calc(25% - 12px);
    }
}

@media (max-width: 768px) {
    .videos-section {
        padding: 50px 0 40px !important;
    }

    .videos-scroll-wrapper {
        cursor: default;
    }

    .video-card {
        flex: 0 0 260px;
    }
}
