/* IPTV Player Styles v1.3 */
.iptv-player-container {
    display: grid;
    grid-template-columns: 280px 320px 1fr;
    gap: 15px;
    height: 75vh;
    min-height: 500px;
    background: #1e1e1e;
    color: #f1f1f1;
    padding: 15px;
    border-radius: 8px;
    font-family: sans-serif;
}

.iptv-column {
    display: flex;
    flex-direction: column;
    background: #2a2a2a;
    border-radius: 6px;
    overflow: hidden;
}

.iptv-column h2 {
    margin: 0;
    padding: 12px 15px;
    background: #333;
    font-size: 16px;
    text-align: center;
    border-bottom: 1px solid #444;
    flex-shrink: 0;
}

.iptv-search-wrapper {
    padding: 10px;
    background-color: #333;
    border-bottom: 1px solid #444;
    flex-shrink: 0;
}

.iptv-search-bar {
    width: 100%;
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid #555;
    background-color: #1e1e1e;
    color: #f1f1f1;
    font-size: 14px;
    box-sizing: border-box;
}

.iptv-list-container {
    overflow-y: auto;
    height: 100%;
}

/* Scrollbar styling */
.iptv-list-container::-webkit-scrollbar { width: 8px; }
.iptv-list-container::-webkit-scrollbar-track { background: #2a2a2a; }
.iptv-list-container::-webkit-scrollbar-thumb { background: #555; border-radius: 4px; }
.iptv-list-container::-webkit-scrollbar-thumb:hover { background: #777; }

.iptv-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.iptv-column li {
    padding: 12px 15px;
    border-bottom: 1px solid #3a3a3a;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.iptv-column li:hover {
    background-color: #3c3c3c;
}

.iptv-column li.active {
    background-color: #e50914; /* Red for active items */
    font-weight: bold;
}

/* Updated styles for logos and flags */
img.country-flag {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    flex-shrink: 0;
    object-fit: cover;
    box-shadow: 0 0 3px rgba(0,0,0,0.5);
}

img.channel-logo {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 4px;
    background-color: rgba(255,255,255,0.05); /* Slight background for transparent logos */
}

.iptv-loader {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: #888;
}

#iptv-video-player .video-wrapper {
    flex-grow: 1;
    background: #000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

#iptv-video {
    width: 100%;
    height: 100%;
    display: block;
}

#player-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    color: #ccc;
    font-size: 18px;
    pointer-events: none;
}

#player-overlay.hidden {
    display: none;
}

.iptv-error {
    background-color: #ffdddd;
    border-left: 6px solid #f44336;
    color: #333;
    padding: 15px;
}

@media (max-width: 768px) {
    .iptv-player-container {
        grid-template-columns: 1fr;
        height: auto;
    }
    .iptv-column {
        min-height: 250px;
    }
    #iptv-video-player {
        min-height: 300px;
    }
}