*{
    box-sizing:border-box;
}

body{
    margin:0;
    background:#000;
    font-family:Arial, sans-serif;
    color:#fff;
}

/* =========================================================
   TOP BAR
========================================================= */
.top{
    height:75px;
    background:linear-gradient(90deg,#0b0b0b,#191919,#0b0b0b);
    border-bottom:3px solid #d40000;
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:0 20px;
    box-shadow:0 3px 10px rgba(0,0,0,.5);
}

.left-header{
    display:flex;
    align-items:center;
}

.logo-img{
    width:58px;
    height:58px;
    object-fit:contain;
    margin-right:12px;
    border-radius:50%;
    background:#fff;
}

.channel-info{
    display:flex;
    flex-direction:column;
}

.channel-name{
    font-size:24px;
    font-weight:bold;
    color:#fff;
    letter-spacing:1px;
}

.channel-tag{
    font-size:12px;
    color:#cfcfcf;
}

.right-header{
    display:flex;
    align-items:center;
    gap:12px;
}

.date,
.time{
    color:#ddd;
    font-size:14px;
}

.live{
    background:#d90000;
    color:#fff;
    padding:7px 18px;
    border-radius:30px;
    font-weight:bold;
    animation:blink 1s infinite;
    box-shadow:0 0 15px rgba(255,0,0,.6);
}

@keyframes blink{
    50%{ opacity:.45; }
}

@media (prefers-reduced-motion: reduce){
    .live{ animation:none; }
}

.logo{
    font-weight:bold;
    font-size:18px;
    color:#ff2b2b;
}

/* =========================================================
   TITLE
========================================================= */
#title{
    text-align:center;
    margin:0;
    padding:10px;
    background:#fc0303;
    font-size:16px;
}

/* =========================================================
   MAIN CONTAINER / VIDEO PLAYER
========================================================= */

/* ---------------------------------------------------------
   player-card = video/embed stage + custom controls ka
   parent. Fixed 16:9 aspect ratio rakha hai taake "direct"
   video aur "embed" (YouTube/Facebook/Vimeo) dono modes
   mein size same rahe, layout jump na ho.
--------------------------------------------------------- */
.player-card{
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
}

/* Fullscreen mein player-card poori screen le - aspect-ratio
   force nahi karte taake real fullscreen (letterbox na ho) */
.player-card:fullscreen,
.player-card:-webkit-full-screen{
    aspect-ratio: unset;
    width: 100vw;
    height: 100vh;
}

#embedPlayer iframe,
#embedPlayer > div{
    width: 100%;
    height: 100%;
    border: 0;
}

/* Video aur embed (YouTube/Facebook/etc) dono ko explicitly
   ek hi jagah stack karte hain taake koi bhi element controls
   bar ke upar na chala jaye (YouTube iframe apni alag
   hardware/compositing layer banata hai jo z-index ko ignore
   kar sakta hai agar hum explicit stacking na dein). */
#fakeLiveVideo,
#embedPlayer{
    position: absolute;
    inset: 0;
    z-index: 1;
}

.player-controls{
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 14px 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.75), rgba(0,0,0,0));
    z-index: 50;                 /* embed/video (z-index:1) se hamesha upar */
    transform: translateZ(0);    /* apni alag GPU layer force karo taake YouTube
                                     iframe ki hardware layer ke neechay na chala jaye */
    will-change: transform, opacity;
}

.player-controls-row{
    display: flex;
    align-items: center;
    gap: 10px;
}

.player-progress-track{
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.25);
    border-radius: 2px;
    overflow: hidden;
    pointer-events: none; /* click/drag se seek na ho sake */
}

.player-progress-fill{
    height: 100%;
    width: 0%;
    background: #ff2d2d;
    border-radius: 2px;
    transition: width 0.3s linear;
}

.player-volume-slider{
    width: 80px;
    accent-color: #ff2d2d;
    cursor: pointer;
}

.player-ctrl-btn{
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease;
}

.player-ctrl-btn:hover{
    background: rgba(255,255,255,0.3);
}

.player-spacer{
    flex: 1;
}

.player-live-badge{
    display: flex;
    align-items: center;
    gap: 5px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.player-live-badge .dot{
    width: 8px;
    height: 8px;
    background: #ff2d2d;
    border-radius: 50%;
    animation: liveDotPulse 1.4s infinite;
}

@keyframes liveDotPulse{
    0%   { opacity: 1; }
    50%  { opacity: 0.3; }
    100% { opacity: 1; }
}
.container{
    display:flex;
    flex-direction:row;
    gap:10px;
    padding:10px;
}

.left{
    flex:3;
    min-width:0;
}

#player{
    width:100%;
    aspect-ratio:16/9;
    background:#000;
}

#player iframe,
#player video{
    width:100%;
    height:100%;
    border:0;
    display:block;
}

.right{
    flex:1;
}

/* =========================================================
   VIEWER COUNT BADGE
   Default hidden (opacity:0). JS 8 second baad "visible"
   class add karta hai jis se yeh fade-in ho kar dikhta hai.
========================================================= */
.viewer-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 6;
    pointer-events: none;
    backdrop-filter: blur(4px);
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .4s ease, transform .4s ease;
}

.viewer-badge.visible{
    opacity: 1;
    transform: translateY(0);
}

.viewer-badge .dot {
    width: 8px;
    height: 8px;
    background: #ff3b3b;
    border-radius: 50%;
    animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
    0%   { opacity: 1; }
    50%  { opacity: 0.3; }
    100% { opacity: 1; }
}

/* =========================================================
   AUTO-HIDE PLAYER CONTROLS
   ".hide" lagne par bar neechay slide + fade ho kar
   gayab ho jata hai (professional player jaisa behaviour).
========================================================= */
.player-controls.hide{
    opacity:0;
    transform:translateY(100%) translateZ(0);
    pointer-events:none;
    transition:.3s;
}

.player-controls{
    transition:.3s;
}

/* =========================================================
   MOBILE FIX
========================================================= */
@media(max-width:768px){
    .container{
        flex-direction:column;
    }

    .left,
    .right{
        width:100%;
    }

    .player-card{
        border-radius:0;
    }

    #player{
        aspect-ratio:16/9;
    }
}

/* =========================================================
   BOTTOM MENU
========================================================= */
.bottom{
    display:flex;
    gap:10px;
    padding:10px;
    background:#111;
    flex-wrap:wrap;
}

.btn{
    background:#222;
    padding:8px 12px;
    border-radius:5px;
    cursor:pointer;
}

.btn:hover{
    background:red;
}

/* =========================================================
   REPRESENTATIVES PANEL
========================================================= */
.rep-overlay{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.75);
    align-items:center;
    justify-content:center;
    z-index:999;
    padding:20px;
}

.rep-overlay.open{
    display:flex;
}

.rep-panel{
    background:#111;
    width:100%;
    max-width:420px;
    max-height:70vh;
    border-radius:8px;
    border:1px solid #333;
    display:flex;
    flex-direction:column;
    overflow:hidden;
}

.rep-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:12px 15px;
    background:#1c1c1c;
    font-weight:bold;
    border-bottom:2px solid red;
}

.rep-close{
    background:none;
    border:none;
    color:#fff;
    font-size:16px;
    cursor:pointer;
    padding:4px;
}

.rep-list{
    overflow-y:auto;
    padding:10px;
}

.rep-item{
    display:flex;
    align-items:center;
    gap:10px;
    background:#222;
    padding:8px 10px;
    margin-bottom:6px;
    border-radius:5px;
}

.rep-num{
    background:red;
    color:#fff;
    width:22px;
    height:22px;
    min-width:22px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:12px;
}

.rep-name{
    font-size:14px;
    word-break:break-word;
}

.rep-empty{
    color:#888;
    text-align:center;
    padding:20px 0;
}

/* =========================================================
   NEWS TICKER
========================================================= */
.news-ticker{
    display:flex;
    height:42px;
    overflow:hidden;
    background:#111;
    border-top:2px solid #cc0000;
    border-bottom:2px solid #cc0000;
}

.ticker-label{
    background:#cc0000;
    color:#fff;
    font-weight:bold;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:0 20px;
    white-space:nowrap;
    font-size:15px;
    text-transform:uppercase;
    letter-spacing:1px;
}

.ticker-wrapper{
    flex:1;
    overflow:hidden;
    display:flex;
    align-items:center;
    position:relative;
}

.ticker{
    display:inline-block;
    white-space:nowrap;
    padding-left:100%;
    font-size:15px;
    color:#fff;
    animation:tickerMove 28s linear infinite;
}

.ticker:hover{
    animation-play-state:paused;
}

@keyframes tickerMove{
    0%{ transform:translateX(0); }
    100%{ transform:translateX(-100%); }
}

/* =========================================================
   NAVIGATION
========================================================= */
nav {
    background: #222;
    padding: 10px 0;
    text-align: center;
    width: 100%;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav ul li {
    margin: 5px 10px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    padding: 8px 12px;
    display: inline-block;
    transition: all 0.3s ease-in-out;
    font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', Arial, sans-serif;
    white-space: nowrap;
}

nav ul li a:hover {
    color: #f1c40f;
    transform: scale(1.1);
}

nav .verification {
    width: 100%;
    text-align: center;
    margin-top: 10px;
}

@media (max-width: 768px) {
    nav ul {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }

    nav ul li {
        margin: 5px;
    }

    nav ul li a {
        font-size: 0.9rem;
        padding: 6px 10px;
    }

    nav .verification {
        margin-top: 5px;
    }
}

/* =========================================================
   VIDEO COMMENTS WIDGET (Dark Theme)
========================================================= */
.vc-widget {
    --vc-bg: #0f0f0f;
    --vc-surface: #1b1b1b;
    --vc-text: #f1f1f1;
    --vc-text-soft: #aaaaaa;
    --vc-line: #303030;
    --vc-accent: #3ea6ff;
    --vc-accent-soft: rgba(62, 166, 255, 0.12);
    --vc-danger: #f28b82;
    --vc-pin-bg: #272727;
    --vc-avatar-1: #3ea6ff;
    --vc-avatar-2: #a970ff;

    max-width: 720px;
    margin: 0 auto;
    padding: 20px;
    border-radius: 12px;
    font-family: "Roboto", "Segoe UI", Arial, sans-serif;
    color: var(--vc-text);
    background: var(--vc-bg);
}

.vc-widget * { box-sizing: border-box; }

.vc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.vc-count { font-size: 16px; font-weight: 600; letter-spacing: 0.2px; }

.vc-sort { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--vc-text-soft); }
.vc-sort select {
    border: none;
    background: transparent;
    font-weight: 600;
    color: var(--vc-text);
    font-size: 13px;
    cursor: pointer;
}
.vc-sort select option { background: var(--vc-surface); color: var(--vc-text); }

.vc-composer { display: flex; gap: 12px; margin-bottom: 22px; }

.vc-avatar {
    flex: 0 0 40px;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--vc-avatar-1), var(--vc-avatar-2));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 15px;
}

.vc-composer-body { flex: 1; min-width: 0; }

.vc-name-input {
    width: 100%;
    border: 1px solid var(--vc-accent);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    background: var(--vc-accent-soft);
    color: var(--vc-text);
}
.vc-name-input::placeholder,
.vc-text-input::placeholder { color: var(--vc-text-soft); }
.vc-name-input:focus { outline: none; border-bottom-color: var(--vc-accent); }

.vc-text-input {
    width: 100%;
    border: 1px solid var(--vc-line);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 14px;
    resize: none;
    background: var(--vc-surface);
    color: var(--vc-text);
    font-family: inherit;
    min-height: 24px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.vc-text-input:focus { outline: none; border-bottom-color: var(--vc-accent); }

.vc-composer-actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; position: relative; }
.vc-spacer { flex: 1; }

.vc-emoji-btn {
    border: none; background: transparent; font-size: 20px; cursor: pointer;
    line-height: 1; padding: 4px; border-radius: 50%;
    transition: background 0.15s ease;
}
.vc-emoji-btn:hover { background: var(--vc-pin-bg); }

.vc-btn {
    border: none;
    border-radius: 18px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease;
}
.vc-btn-ghost { background: transparent; color: var(--vc-text-soft); }
.vc-btn-ghost:hover { background: var(--vc-pin-bg); color: var(--vc-text); }
.vc-btn-solid { background: var(--vc-accent); color: #0f0f0f; }
.vc-btn-solid:hover:not(:disabled) { opacity: 0.9; }
.vc-btn-solid:disabled { background: #3a3a3a; color: #7a7a7a; cursor: default; }

.vc-emoji-picker {
    position: absolute;
    z-index: 5;
    top: 40px;
    left: 0;
    width: 260px;
    background: var(--vc-surface);
    border: 1px solid var(--vc-line);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.45);
    padding: 8px;
}
.vc-emoji-picker.hidden { display: none; }

.vc-emoji-tabs { display: flex; gap: 4px; margin-bottom: 6px; }
.vc-emoji-tab {
    flex: 1;
    border: none;
    background: var(--vc-pin-bg);
    border-radius: 8px;
    padding: 6px 4px;
    font-size: 12px;
    cursor: pointer;
    color: var(--vc-text-soft);
}
.vc-emoji-tab.active { background: var(--vc-accent-soft); color: var(--vc-accent); font-weight: 700; }

.vc-emoji-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    max-height: 150px;
    overflow-y: auto;
}
.vc-emoji-grid button {
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
    border-radius: 6px;
    padding: 4px 0;
}
.vc-emoji-grid button:hover { background: var(--vc-pin-bg); }

.vc-status { font-size: 12px; color: var(--vc-text-soft); min-height: 16px; margin-bottom: 8px; }

.vc-list { display: flex; flex-direction: column; gap: 20px; }

.vc-comment { display: flex; gap: 12px; }

.vc-comment .vc-avatar { flex: 0 0 36px; width: 36px; height: 36px; font-size: 13px; }

.vc-comment-body { flex: 1; min-width: 0; }

.vc-comment-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vc-comment-name { font-weight: 600; font-size: 13px; }
.vc-comment-time { font-size: 12px; color: var(--vc-text-soft); }

.vc-pin-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: var(--vc-accent);
    background: var(--vc-accent-soft);
    border-radius: 6px;
    padding: 2px 6px;
}

.vc-comment-text { font-size: 14px; line-height: 1.5; margin: 4px 0 6px; white-space: pre-wrap; word-break: break-word; color: #e8e8e8; }

.vc-comment-actions { display: flex; gap: 16px; }
.vc-action-link {
    border: none;
    background: transparent;
    color: var(--vc-text-soft);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s ease;
}
.vc-action-link:hover { color: var(--vc-text); }
.vc-action-link.pinned { color: var(--vc-accent); }
.vc-action-link.danger:hover { color: var(--vc-danger); }

.vc-empty { text-align: center; color: var(--vc-text-soft); font-size: 13px; padding: 28px 0; }

.vc-widget ::-webkit-scrollbar { width: 6px; }
.vc-widget ::-webkit-scrollbar-thumb { background: var(--vc-line); border-radius: 4px; }