/* Player with Ads Wrapper */
.player-with-ads-wrapper {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 16px;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    min-height: 450px; /* Ensure minimum height for side ads */
}

.player-main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

/* Player Ads - Positioned around TV Player */
.player-ad {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
}

/* Top and Bottom Ads - Horizontal (width matches player) */
.player-ad-top,
.player-ad-bottom {
    width: 100%;
    height: 100px;
    flex-shrink: 0;
}

.player-ad-top .player-ad-container,
.player-ad-bottom .player-ad-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.player-ad-top .player-ad-slide img,
.player-ad-bottom .player-ad-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Left and Right Ads - Vertical (height matches player container) */
.player-ad-left,
.player-ad-right {
    width: 140px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-self: stretch;
    height: 100%;
}

.player-ad-left .player-ad-container,
.player-ad-right .player-ad-container {
    width: 100%;
    height: 100%;
    position: relative;
    flex: 1;
}

/* Ad Slides */
.player-ad-slide {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.player-ad-left .player-ad-slide,
.player-ad-right .player-ad-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: none;
}

.player-ad-slide.active {
    display: block;
}

.player-ad-left .player-ad-slide.active,
.player-ad-right .player-ad-slide.active {
    display: block;
}

.player-ad-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

/* Left and right ads should fill full height */
.player-ad-left .player-ad-slide img,
.player-ad-right .player-ad-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-ad-slide a {
    display: block;
    width: 100%;
    height: 100%;
    transition: opacity 0.2s;
}

.player-ad-slide a:hover {
    opacity: 0.9;
}

/* Player Ad Controls */
.player-ad-controls {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 8px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s;
}

.player-ad:hover .player-ad-controls {
    opacity: 1;
}

.player-ad-top .player-ad-controls,
.player-ad-bottom .player-ad-controls {
    flex-direction: row;
    left: auto;
    right: 12px;
    transform: translateY(-50%);
    top: 50%;
}

.player-ad-left .player-ad-controls,
.player-ad-right .player-ad-controls {
    flex-direction: column;
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    top: auto;
}

.player-ad-controls button {
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--border-color);
    color: var(--accent-color);
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-ad-controls button:hover {
    background-color: rgba(0, 0, 0, 0.9);
    border-color: var(--accent-color);
}

.player-ad-controls button i {
    font-size: 0.75rem;
}

/* Player Container Adjustments */
.player-container {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid var(--border-color);
    width: 100%;
    flex: 1;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .player-ad-left,
    .player-ad-right {
        width: 120px;
    }
}

@media (max-width: 1200px) {
    .player-ad-left,
    .player-ad-right {
        width: 100px;
    }
    
    .player-ad-top,
    .player-ad-bottom {
        height: 80px;
    }
}

@media (max-width: 992px) {
    .player-with-ads-wrapper {
        flex-direction: column;
        gap: 12px;
    }
    
    .player-ad-left,
    .player-ad-right {
        width: 100%;
        max-height: 150px;
        flex-direction: row;
    }
    
    .player-ad-left .player-ad-container,
    .player-ad-right .player-ad-container {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
    }
    
    .player-ad-left .player-ad-slide,
    .player-ad-right .player-ad-slide {
        min-width: 150px;
        scroll-snap-align: start;
    }
    
    .player-ad-top,
    .player-ad-bottom {
        height: 70px;
    }
}

@media (max-width: 768px) {
    .player-ad-left,
    .player-ad-right {
        display: none; /* Hide side ads on mobile */
    }
    
    .player-ad-top,
    .player-ad-bottom {
        height: 60px;
    }
    
    .player-container {
        padding: 12px;
    }
}

