
        :root {
            --primary: #00d2ff;
            --secondary: #3a7bd5;
            --accent: #ff0055;
            --dark: #0f172a;
            --darker: #020617;
            --light: #f8fafc;
            --text-gray: #94a3b8;
            --header-h: 60px;
            --footer-h: 40px;
            --ticker-h: 40px;
        }

        * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; }

        body {
            background-color: var(--darker);
            color: var(--light);
            height: 100vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        /* --- Header --- */
        header {
            height: var(--header-h);
            background: rgba(15, 23, 42, 0.95);
            border-bottom: 1px solid #334155;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 20px;
            z-index: 50;
        }

        .brand { font-size: 1.2rem; font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: 10px; }
        .live-time { font-family: 'Courier New', monospace; font-weight: bold; color: var(--accent); background: rgba(255,0,85,0.1); padding: 5px 10px; border-radius: 4px; }

        /* --- Tickers --- */
        .ticker-wrap {
            height: var(--ticker-h);
            background: var(--secondary);
            color: white;
            display: flex;
            align-items: center;
            overflow: hidden;
            white-space: nowrap;
            position: relative;
            z-index: 40;
        }
        .ticker-wrap.top { border-bottom: 1px solid rgba(255,255,255,0.1); }
        .ticker-wrap.bottom { border-top: 1px solid rgba(255,255,255,0.1); }

        .ticker {
            display: inline-block;
            padding-left: 100%;
            animation: ticker 45s linear infinite;
        }
        .ticker-item { display: inline-block; padding: 0 2rem; font-size: 0.9rem; }

        @keyframes ticker {
            0% { transform: translate3d(0, 0, 0); }
            100% { transform: translate3d(-100%, 0, 0); }
        }

        /* --- Main Layout --- */
        main {
            flex: 1;
            display: flex;
            overflow: hidden;
            position: relative;
        }

        /* Video Section */
        .video-container {
            flex: 1;
            position: relative;
            background: #000;
            display: flex;
            justify-content: center;
            align-items: center;
            overflow: hidden;
        }

        video {
            width: 100%;
            height: 100%;
            max-height: 100%;
        }



/* --- INNER SCREEN OVERLAYS --- */

        /* 1. Logo (Top Right Inside Screen) */
        .screen-logo {
            position: absolute;
            top: 20px;
            right: 10px;
            z-index: 10;
            background: var(--glass);
            backdrop-filter: blur(5px);
            padding: 5px 5px;
            border-radius: 4px;
            border: 1px solid rgba(255,255,255,0.1);
            display: flex;
            align-items: center;
            gap: 10px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.5);
        }
        .screen-logo gif { height: 60px; width: auto; }
        .screen-logo span { font-weight: bold; font-size: 0.9rem; color: var(--primary); }





/* 1. Logo (Top Left Inside Screen)
.screen-logo1 {
    position: absolute;
    top: 20px;
    left: 10px;   /* anchored to left 
    z-index: 10;
    background: var(--glass);
    backdrop-filter: blur(5px);
    padding: 15px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.screen-logo1 img {
    height: 60px;
    width: auto;
    animation: rotateLogo 20s linear infinite; /* added rotation 
}

.screen-logo1 span {
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--primary);
}

/* Rotation animation 
@keyframes rotateLogo {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}*/

/* 1. Logo (Top Left Inside Screen) */
.screen-logo1 {
    position: absolute;
    top: 20px;
    left: 10px;   /* anchored to left */
    z-index: 10;
    background: var(--glass);
    backdrop-filter: blur(5px);
    padding: 5px 5px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.screen-logo1 img {
    height: 80px;
    width: auto;
    /*animation: rotateLogo 20s linear infinite;  image rotation */
}

.logo-texts {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.text-up {
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--primary);
  
}

.text-down {
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--primary);
    
}

.countdown {
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--primary);
    text-align: center;
    letter-spacing: 2px;
}

/* Animations */
@keyframes rotateLogo {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes moveUp {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}

@keyframes moveDown {
    from { transform: translateY(0); }
    to { transform: translateY(10px); }
}





/* 1. Logo (Bottom Left Inside Screen) */
.screen-logo2 {
    position: absolute;
    bottom: 10px;   /* anchored to bottom */
    left: 20px;     /* anchored to left */
    z-index: 10;
    background: var(--glass);
    backdrop-filter: blur(5px);
    padding: 5px 5px;
    border-radius: 3px;
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5px;
    box-shadow: 0 4px 5px rgba(0,0,0,0.5);
}

/* Media flip/round animation */
.logo-media img,
.logo-media video {
    height: 100px;
    width: 120px;
    object-fit: cover;
    border-radius: 3px;
    animation: flipRound 10s ease-in-out infinite;
    backface-visibility: hidden;
}

/* Breaking news text auto come/close */
.breaking-text {
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--primary);
    opacity: 0;
    animation: textAppear 10s ease-in-out infinite;
}

/* Flip animation */
@keyframes flipRound {
    0%   { transform: rotateY(0deg); }
    20%   { transform: rotateY(90deg); }
    50%  { transform: rotateY(180deg); }
    100% { transform: rotateY(360deg); }
}

/* Text auto appear and disappear */
@keyframes textAppear {
    0%   { opacity: 0; transform: translateY(10px); }
    20%  { opacity: 1; transform: translateY(0); }
    80%  { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}



/* 1. Logo (Bottom Right Inside Screen) */
.screen-logo3 {
    position: absolute;
    bottom: 60px;   /* anchored to bottom */
    right: 10px;     /* anchored to left */
    z-index: 10;
    background: var(--glass);
    backdrop-filter: blur(5px);
    padding: 5px 5px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);

    /* Flip animation applied to the whole logo block */
    animation: flipLogo 10s ease-in-out infinite;
}

.screen-logo3 img {
    height: 80px;
    width: 100px;
    backface-visibility: hidden; /* ensures smooth flip */
}


/* Flip keyframes */
@keyframes flipLogo {
    0%   { transform: rotateY(0deg); }
    50%  { transform: rotateY(180deg); }
    100% { transform: rotateY(360deg); }
}




        /* 2. Bottom Ticker (Inside Screen Bottom) 
        .screen-ticker-wrap {
            position: absolute;
            bottom: 70px; /* Above the controls 
            left: 0;
            width: 100%;
            background: linear-gradient(90deg, rgba(0,0,0,0.8), rgba(0,0,0,0.6), rgba(0,0,0,0.8));
            z-index: 20;
            padding: 5px 0;
            border-top: 1px solid rgba(255,255,255,0.1);
            overflow: hidden;
            white-space: nowrap;
        }

        .screen-ticker {
            display: inline-block;
            padding-left: 100%;
            animation: ticker 50s linear infinite;
        }
        .ticker-item {
            display: inline-block;
            padding: 0 2rem;
            font-size: 0.95rem;
            color: #fff;
            text-shadow: 1px 1px 2px black;
        }

        @keyframes ticker {
            0% { transform: translate3d(0, 0, 0); }
            100% { transform: translate3d(-100%, 0, 0); }
        }
*/
/* 2. Bottom Ticker (Inside Screen Bottom) */
.screen-ticker-wrap {
    position: absolute;
    bottom: 30px; /* Above the controls */
    left: 0;
    width: 100%;
    background: var(--glass);
    z-index: 20;
    padding: 5px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
    white-space: nowrap;
}

.screen-ticker {
    display: inline-block;
    padding-left: 100%;
    animation: tickerMove 40s linear infinite; /* adjusted speed */
}

.ticker-item {
    display: inline-block;
    padding: 0 2rem;
    font-size: 2rem;
    color: #fff;
    text-shadow: 1px 1px 2px black;
}

/* Animation for moving text */
@keyframes tickerMove {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

        /* 3D Visualizer Overlay */
        #visualizer-canvas {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 40%;
            pointer-events: none;
            z-index: 10;
            opacity: 0.3;
        }

        /* Custom Controls Overlay */
        .controls-overlay {
            position: absolute;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0,0,0,0.1);
            backdrop-filter: blur(0.5px);
            padding: 10px 20px;
            border-radius: 30px;
            display: flex;
            gap: 15px;
            z-index: 20;
            transition: opacity 0.3s;
        }
        .video-container:hover .controls-overlay { opacity: 1; }
        .video-container:active .controls-overlay { opacity: 1; }
        
        .btn-control {
            background: none;
            border: none;
            color: white;
            cursor: pointer;
            font-size: 1.2rem;
            transition: transform 0.2s;
        }
        .btn-control:hover { color: var(--primary); transform: scale(1.1); }

        /* Playlist Sidebar */
        .playlist-sidebar {
            width: 350px;
            background: var(--dark);
            border-left: 1px solid #334155;
            display: flex;
            flex-direction: column;
            transition: transform 0.3s ease;
            z-index: 30;
        }
        
        .playlist-header {
            padding: 15px;
            background: #1e293b;
            font-weight: bold;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .playlist-content {
            flex: 1;
            overflow-y: auto;
        }

        .segment {
            border-bottom: 1px solid #334155;
        }
        .segment-header {
            padding: 12px 15px;
            background: #1e293b;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            font-size: 0.9rem;
            color: var(--primary);
        }
        .segment-header:hover { background: #334155; }
        .segment-header::after { content: '▼'; font-size: 0.7rem; }
        .segment.collapsed .segment-header::after { content: '▶'; }
        .segment.collapsed .segment-items { display: none; }

        .channel-item {
            padding: 10px 20px;
            cursor: pointer;
            border-bottom: 1px solid rgba(255,255,255,0.05);
            font-size: 0.85rem;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .channel-item:hover { background: var(--secondary); color: white; }
        .channel-item.active { background: var(--primary); color: var(--darker); font-weight: bold; }
        .channel-icon { width: 24px; height: 24px; border-radius: 50%; background: #ccc; display: inline-block; object-fit: cover; }

        /* --- Overlays: Ads & Popups --- */
        .ad-overlay {
            position: fixed;
            top: 15%;
            left: 20%;
            height:70%;
            transform: none;
            background: white;
            color: #333;
            padding: 0;
            border-radius: 5px;
            overflow: hidden;
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
            z-index: 100;
            display: none;
            width: 800px;
            max-width: 90%;
            text-align: center;
            animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }
        @keyframes popIn { from{transform: translate(-50%, -50%) scale(0.5); opacity:0;} to{transform: translate(-50%, -50%) scale(1); opacity:1;} }

        .ad-content img { width: 100%; height: 300px; object-fit: cover; }
        .ad-content-box video { max-width: 100%; max-height: 400px; }
        .ad-content h3 { padding: 10px; margin: 0; color: var(--secondary); }
        .ad-content p { padding: 0 10px 10px; font-size: 0.9rem; }
        .ad-timer {
            background: var(--accent);
            color: white;
            font-size: 0.8rem;
            padding: 5px 0;
            width: 100%;
            display: block;
        }

        .popup-message {
            position: absolute;
            top: 20px;
            right: 20px;
            background: rgba(15, 23, 42, 0.95);
            border-left: 4px solid var(--primary);
            color: white;
            padding: 15px;
            width: 300px;
            z-index: 101;
            display: none;
            box-shadow: 0 5px 15px rgba(0,0,0,0.3);
            animation: slideIn 0.5s ease;
        }
        @keyframes slideIn { from{transform: translateX(100%);} to{transform: translateX(0);} }

        /* --- Footer --- */
        footer {
            background: #000;
            padding: 10px;
            text-align: center;
            font-size: 0.8rem;
            color: #666;
            border-top: 1px solid #333;
        }

        /* Mobile Responsive */
        @media (max-width: 768px) {
            .playlist-sidebar {
                position: absolute;
                right: 0;
                top: 0;
                bottom: 0;
                transform: translateX(100%);
                box-shadow: -5px 0 15px rgba(0,0,0,0.5);
            }
            .playlist-sidebar.open { transform: translateX(0); }
            .ticker { font-size: 0.8rem; }
            .controls-overlay { width: 90%; justify-content: space-around; }
        }