/* ============================================
   NETFLIX-STYLE CAROUSEL SYSTEM
   ============================================ */

/* Carousels Container */
.carousels-container {
    padding: 0 0 40px;
    position: relative;
    z-index: 1;
}

/* Individual Carousel Row */
.carousel-row {
    margin-bottom: 3vw;
    position: relative;
}

.row-title {
    font-size: 1.4vw;
    font-weight: 700;
    color: #e5e5e5;
    margin: 0 0 0.5em 4%;
    line-height: 1.3;
    text-transform: none;
}

/* Carousel Track */
.carousel-track {
    display: flex;
    gap: 0.5vw;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 0 4%;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

/* Scroll Buttons */
.carousel-nav {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4%;
    background: rgba(0,0,0,0.5);
    border: none;
    color: #fff;
    font-size: 2vw;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s, background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-row:hover .carousel-nav {
    opacity: 1;
}

.carousel-nav:hover {
    background: rgba(0,0,0,0.7);
}

.carousel-nav.prev {
    left: 0;
}

.carousel-nav.next {
    right: 0;
}

/* Channel Card */
.channel-card {
    min-width: 250px;
    width: 250px;
    aspect-ratio: 16 / 9;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.5, 0, 0.1, 1), 
                z-index 0s 0.3s;
    position: relative;
    background: #1a1a1a;
}

.channel-card:hover {
    transform: scale(1.15);
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.5, 0, 0.1, 1), 
                z-index 0s;
}

/* Channel Card Image */
.channel-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s;
}

.channel-card:hover .channel-card-image {
    opacity: 0.7;
}

/* Channel Card Overlay */
.channel-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, transparent 100%);
    padding: 16px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
}

.channel-card:hover .channel-card-overlay {
    opacity: 1;
    transform: translateY(0);
}

.channel-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-card-category {
    font-size: 12px;
    color: #b3b3b3;
    margin: 0;
}

/* Play Button Overlay */
.channel-card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.3);
    border: 2px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}

.channel-card:hover .channel-card-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.channel-card-play::after {
    content: '▶';
    color: #fff;
    font-size: 18px;
    margin-left: 3px;
}

/* Loading Skeleton */
.channel-card.loading {
    background: linear-gradient(90deg, 
        #1a1a1a 0%, 
        #2a2a2a 50%, 
        #1a1a1a 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

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

/* Responsive Adjustments */
@media (max-width: 1400px) {
    .channel-card {
        min-width: 200px;
        width: 200px;
    }
}

@media (max-width: 800px) {
    .row-title {
        font-size: 18px;
    }
    
    .channel-card {
        min-width: 150px;
        width: 150px;
    }
    
    .carousel-nav {
        display: none;
    }
}

/* Smooth scroll for touch devices */
@media (hover: none) {
    .carousel-track {
        scroll-snap-type: x mandatory;
    }
    
    .channel-card {
        scroll-snap-align: start;
    }
}
