/* YnoTV Style IPTV Player v2 - closer to screenshot */

.ynotv-container {
    background: #0d1117;
    color: #e6edf3;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,.6);
}

.ynotv-topbar {
    background: #161b22;
    border-bottom: 1px solid #30363d;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    flex-shrink: 0;
}

.ynotv-topbar .tab {
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    color: #8b949e;
    user-select: none;
}
.ynotv-topbar .tab.active,
.ynotv-topbar .tab:hover {
    background: #21262d;
    color: #58a6ff;
}

.ynotv-main {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.ynotv-sidebar {
    width: 250px;
    background: #0d1117;
    border-right: 1px solid #30363d;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.ynotv-sidebar-header {
    padding: 12px 14px 8px;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: .5px;
    color: #8b949e;
    display: flex;
    justify-content: space-between;
}

.ynotv-search {
    padding: 0 10px 8px;
}
.ynotv-search input,
#ynotv-global-search {
    width: 100%;
    background: #21262d;
    border: 1px solid #30363d;
    color: #e6edf3;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
}
.ynotv-search input:focus,
#ynotv-global-search:focus { border-color: #58a6ff; }

.ynotv-categories {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 8px;
}

.ynotv-cat-item {
    padding: 7px 14px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #c9d1d9;
}
.ynotv-cat-item:hover,
.ynotv-cat-item.active {
    background: #21262d;
    color: #58a6ff;
}
.ynotv-cat-item .count {
    background: #30363d;
    color: #8b949e;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 11px;
    min-width: 22px;
    text-align: center;
}

.ynotv-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #0d1117;
}

.ynotv-player-area {
    display: flex;
    height: 340px;
    border-bottom: 1px solid #30363d;
    flex-shrink: 0;
}

.ynotv-video-wrap {
    flex: 1;
    background: #000;
    position: relative;
    min-width: 0;
}
.ynotv-video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.ynotv-program-info {
    width: 320px;
    background: #161b22;
    padding: 18px 20px;
    overflow-y: auto;
    border-left: 1px solid #30363d;
    flex-shrink: 0;
}
.ynotv-program-info h2 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}
.ynotv-program-info .time {
    color: #8b949e;
    font-size: 12px;
    margin-bottom: 10px;
}
.ynotv-program-info .desc {
    font-size: 13.5px;
    line-height: 1.45;
    color: #c9d1d9;
    margin-bottom: 14px;
}
.ynotv-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.ynotv-badge {
    background: #238636;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 700;
    letter-spacing: .3px;
}

.ynotv-epg-area {
    flex: 1;
    overflow: auto;
    background: #0d1117;
}

.ynotv-channel-row {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    border-bottom: 1px solid #21262d;
    cursor: pointer;
    font-size: 13px;
    min-height: 48px;
}
.ynotv-channel-row:hover { background: #161b22; }
.ynotv-channel-row.active { background: rgba(31,111,235,.15); }

.ynotv-channel-logo {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    margin-right: 10px;
    object-fit: cover;
    background: #21262d;
    flex-shrink: 0;
}
.ynotv-channel-info {
    flex: 1;
    min-width: 0;
}
.ynotv-channel-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ynotv-channel-prog {
    font-size: 11px;
    color: #8b949e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ynotv-channel-quality {
    font-size: 10px;
    color: #58a6ff;
    margin-left: 8px;
    flex-shrink: 0;
}
.ynotv-fav {
    margin-right: 6px;
    cursor: pointer;
    color: #6e7681;
    font-size: 15px;
    user-select: none;
}
.ynotv-fav.active { color: #f0c14b; }

.ynotv-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #8b949e;
    font-size: 15px;
}

/* Popup / Modal Player */
.ynotv-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.85);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.ynotv-modal-content {
    background: #0d1117;
    border-radius: 10px;
    width: min(1100px, 95vw);
    height: min(80vh, 700px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.8);
}
.ynotv-modal-header {
    padding: 10px 16px;
    background: #161b22;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #30363d;
}
.ynotv-modal-header h3 { margin: 0; font-size: 15px; }
.ynotv-modal-close {
    background: none;
    border: none;
    color: #8b949e;
    font-size: 22px;
    cursor: pointer;
}
.ynotv-modal video {
    flex: 1;
    width: 100%;
    background: #000;
}
.ynotv-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}
.ynotv-actions button {
    background: #21262d;
    border: 1px solid #30363d;
    color: #c9d1d9;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}
.ynotv-actions button:hover { background: #30363d; }
.ynotv-categories::-webkit-scrollbar,
.ynotv-epg-area::-webkit-scrollbar,
.ynotv-program-info::-webkit-scrollbar {
    width: 6px;
}
.ynotv-categories::-webkit-scrollbar-thumb,
.ynotv-epg-area::-webkit-scrollbar-thumb,
.ynotv-program-info::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 3px;
}
