/* ================================================================
   BREADCRUMB
================================================================ */
.breadcrumb-bar {
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
}
.bc-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray);
}
.bc-inner a { color: var(--gray); transition: color .2s; }
.bc-inner a:hover { color: var(--red); }
.bc-sep  { color: var(--border); }
.bc-cat  { color: var(--red); font-weight: 600; }
.bc-name { color: var(--white); font-weight: 700; }

/* ================================================================
   WATCH LAYOUT
================================================================ */
.watch-layout {
    max-width: 1440px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    align-items: start;
}

/* ================================================================
   PLAYER BOX
================================================================ */
.player-box {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 2px solid var(--red);
}

.player-box iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    z-index: 2;
}

/* Loading spinner */
.player-loading {
    position: absolute;
    inset: 0;
    background: #000;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--gray);
    font-size: 14px;
}

.player-loading.hidden { display: none; }

/* ── Tap-to-play overlay (mobile popup shield) ─────────────── */
.tap-to-play {
    display: none; /* hidden on desktop */
    position: absolute;
    inset: 0;
    z-index: 5;
    background: linear-gradient(135deg, #0d0d0d 0%, #1a0000 100%);
    align-items: center;
    justify-content: center;
}
.tap-to-play.visible { display: flex; }
.ttp-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.ttp-btn {
    width: 80px; height: 80px;
    background: var(--red);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    box-shadow: 0 0 30px rgba(204,0,0,.5);
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
    -webkit-tap-highlight-color: transparent;
}
.ttp-btn:active { transform: scale(.92); box-shadow: 0 0 15px rgba(204,0,0,.4); }
.ttp-label { color: #ccc; font-size: 15px; font-weight: 600; letter-spacing: .5px; }

@media (max-width: 768px) {
    /* Show tap-to-play only on mobile by default (JS adds .visible) */
    .tap-to-play { display: none; }
}

.spinner {
    width: 44px; height: 44px;
    border: 3px solid rgba(204,0,0,0.2);
    border-top-color: var(--red);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ================================================================
   CHANNEL INFO BAR
================================================================ */
.ch-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg2);
    border-radius: 10px;
    padding: 14px 18px;
    margin-top: 12px;
    border: 1px solid var(--border);
    gap: 12px;
}

.cib-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.cib-thumb {
    width: 54px; height: 54px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border);
    flex-shrink: 0;
    background: var(--bg3);
}

.cib-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.cib-text h1 {
    font-family: 'Cairo', sans-serif;
    font-weight: 900;
    font-size: 20px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cib-sub {
    font-size: 12px;
    color: var(--gray);
}

.cib-cat {
    font-size: 11px;
    font-weight: 700;
    color: var(--red);
    background: rgba(204,0,0,0.1);
    border: 1px solid rgba(204,0,0,0.3);
    padding: 2px 8px;
    border-radius: 4px;
    width: fit-content;
}

.cib-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.live-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(204,0,0,0.15);
    border: 1px solid var(--red);
    color: var(--red);
    padding: 5px 12px;
    border-radius: 20px;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .5px;
    white-space: nowrap;
}

.btn-fullscreen {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--bg3);
    border: 1px solid var(--border);
    color: var(--light);
    padding: 7px 14px;
    border-radius: 7px;
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}
.btn-fullscreen:hover { border-color: var(--red); color: var(--red); }

/* ================================================================
   SERVER BAR
================================================================ */
.server-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 10px 14px;
    background: var(--bg2);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.server-label {
    font-size: 12px;
    color: var(--gray);
    font-weight: 600;
    white-space: nowrap;
}

.srv-btn {
    background: var(--bg3);
    border: 1px solid var(--border);
    color: var(--light);
    padding: 5px 16px;
    border-radius: 5px;
    font-family: 'Cairo', sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
}
.srv-btn:hover  { border-color: var(--red); color: #fff; }
.srv-btn.active { background: var(--red); border-color: var(--red); color: #fff; }

/* ================================================================
   SIDEBAR — Channel list
================================================================ */
.watch-sidebar {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    position: sticky;
    top: calc(var(--nav-h) + 10px);
    max-height: calc(100vh - var(--nav-h) - 30px);
    display: flex;
    flex-direction: column;
}

.sidebar-head {
    padding: 14px 14px 10px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.sidebar-head span {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900;
    font-size: 17px;
    letter-spacing: .5px;
    white-space: nowrap;
}

.side-search-input {
    flex: 1;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 5px 10px;
    color: var(--white);
    font-family: 'Cairo', sans-serif;
    font-size: 12px;
    outline: none;
}
.side-search-input::placeholder { color: var(--gray); }

.sidebar-cats {
    display: flex;
    gap: 4px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    flex-shrink: 0;
}

.scat-btn {
    background: var(--bg3);
    border: 1px solid var(--border);
    color: var(--gray);
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all .2s;
}
.scat-btn:hover  { border-color: var(--red); color: #fff; }
.scat-btn.active { background: var(--red); border-color: var(--red); color: #fff; }

.sidebar-channels {
    overflow-y: auto;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: var(--bg3) transparent;
}
.sidebar-channels::-webkit-scrollbar { width: 4px; }
.sidebar-channels::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 4px; }

/* Sidebar channel row */
.sc-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: background .15s;
    text-decoration: none;
    color: inherit;
}
.sc-row:hover      { background: var(--bg3); }
.sc-row.playing    { background: rgba(204,0,0,0.12); border-right: 3px solid var(--red); }

.sc-thumb {
    width: 42px; height: 28px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg3);
}

.sc-info { flex: 1; min-width: 0; }
.sc-name {
    font-size: 12px; font-weight: 700;
    color: var(--white);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sc-sub  {
    font-size: 10px; color: var(--gray);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-top: 1px;
}

.sc-live {
    font-size: 9px; font-weight: 700;
    color: var(--red);
    letter-spacing: .5px;
    flex-shrink: 0;
}

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 900px) {
    .watch-layout {
        grid-template-columns: 1fr;
    }
    .watch-sidebar {
        position: static;
        max-height: 400px;
    }
}

@media (max-width: 600px) {
    .watch-layout { padding: 10px; gap: 12px; }
    .ch-info-bar  { flex-direction: column; align-items: flex-start; }
    .cib-right    { width: 100%; justify-content: space-between; }
    .cib-text h1  { font-size: 16px; }
}
