/* ==============================================
   CHANNEL SLIDER - Embla Carousel
============================================== */

.channel-slider {
    position: relative;
    margin: 2rem 0;
}

.channel-slider-viewport {
    padding: 16px;
    margin: -16px;
    overflow: hidden;
}

.channel-slider-container {
    display: flex;
    gap: 16px;
    padding: 32px 24px;
    touch-action: pan-y;
    margin-left: calc(var(--slide-spacing, 0) * -1);
}

.channel-slider-slide {
    flex: 0 0 160px;
    min-width: 0;
}

/* Channel Card */
.channel-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    background: transparent;
}

.channel-card:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Active/Playing State */
.channel-card.is-active,
.channel-card.playing {
    outline: 1px solid hsl(356, 85%, 46%);
    box-shadow: 0 0 20px hsla(356, 85%, 46%, 0.5);
}

/* Image Wrapper */
.channel-card-image-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.channel-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.channel-card:hover .channel-card-image {
    transform: scale(1.1);
}

/* Gradient Overlay */
.channel-card-gradient {
    position: absolute;
    inset: 0;
    background: none;
    pointer-events: none;
}

/* Play Button */
.channel-card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: hsla(356, 85%, 46%, 0.9);
    backdrop-filter: blur(4px);
    border: none;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.channel-card:hover .channel-card-play,
.channel-card.is-active .channel-card-play,
.channel-card.playing .channel-card-play {
    opacity: 1;
}

.channel-card-play .play-icon {
    display: block;
}

.channel-card-play .pause-icon {
    display: none;
}

.channel-card-play.playing .play-icon {
    display: none;
}

.channel-card-play.playing .pause-icon {
    display: block;
}

/* Card Info */
.channel-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    z-index: 1;
}

.channel-card-name {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.channel-card-genre {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    display: none;
}

/* Navigation Controls - Centered with Button */
.channel-slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
}

.channel-slider-nav {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: hsla(356, 85%, 46%, 0.1);
    border: 2px solid hsl(356, 85%, 46%);
    color: hsl(356, 85%, 46%);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}

.channel-slider-nav:hover:not(:disabled) {
    background: hsl(356, 85%, 46%);
    color: #fff;
    transform: scale(1.1);
}

.channel-slider-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.channel-slider-controls .btn {
    flex-shrink: 0;
}

/* Desktop Styles */
@media (min-width: 768px) {
    .channel-slider-container {
        gap: 24px;
    }

    .channel-slider-slide {
        flex: 0 0 280px;
    }

    .channel-card-name {
        font-size: 18px;
    }

    .channel-card-genre {
        display: block;
    }

    .channel-card-play {
        width: 64px;
        height: 64px;
    }

    .channel-card-play svg {
        width: 28px;
        height: 28px;
    }

    .channel-slider-controls {
        gap: 24px;
    }

    .channel-slider-nav {
        width: 52px;
        height: 52px;
    }
}

@media (min-width: 1024px) {
    .channel-slider-slide {
        flex: 0 0 300px;
    }
}

/* Animation */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 hsla(356, 85%, 46%, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px hsla(356, 85%, 46%, 0);
    }
}

.channel-card-play.playing {
    animation: pulse 2s ease-in-out infinite;
}

/* Section Header Spacing */
.section-channels .section-header {
    margin-bottom: 2rem;
    margin-top: 2rem;
}

.section-channels {
    padding-top: 0;
}
