:root {
    --bg-color: #000000;
    --sidebar-bg: #111111;
    --sidebar-light: #1a1a1a;
    --text-color: #ffffff;
    --text-muted: #888888;
    --accent-color: #e91e63;
    /* Pink/Red */
    --brand-cyan: #00e5ff;
    /* Cyan */
    --border-color: #2a2a2a;
    --hover-bg: #222222;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    overflow: hidden;
}

/* Header */
.top-header {
    height: 60px;
    background: #111;
    border-bottom: 1px solid #1a1a1a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.header-logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 30px;
}

.header-nav {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-link {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-link:hover {
    color: var(--accent-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

.header-icons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.h-icon {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    opacity: 0.8;
}

.lang-flag {
    font-size: 18px;
    cursor: pointer;
}

.logout-btn {
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    transition: color 0.3s;
}

.logout-btn:hover {
    color: var(--accent-color);
}

/* Layout */
.main-content-wrapper {
    display: flex;
    height: calc(100vh - 60px);
    padding-top: 60px;
}

/* Sidebars common */
.sidebar-header {
    height: 48px;
    min-height: 48px;
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    border-bottom: 2px solid #000;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    position: relative;
    z-index: 10;
    background: inherit;
}

.dark-header {
    background: #1a1a1a;
    color: #fff;
}

.light-header {
    background: #263238;
    color: #fff;
}

.nav-arrow {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 15px;
    font-weight: 900;
    transition: transform 0.2s;
    color: inherit;
}

.nav-arrow:active {
    transform: scale(0.9);
}

/* Specific Arrow Colors */
.channels-sidebar .nav-arrow {
    color: #e91e63;
}

.epg-schedule .nav-arrow {
    color: #00e5ff;
}

.header-title-text {
    flex: 1;
    text-align: center;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

/* Channels Sidebar */
.channels-sidebar {
    width: 260px;
    background: #111;
    border-right: 1px solid #000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.channels-list {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #333 #111;
    min-height: 0;
}

.channel-row {
    display: flex;
    align-items: center;
    padding: 0 10px;
    border-bottom: 1px solid #222;
    cursor: pointer;
    transition: all 0.2s;
    height: 46px;
}

.channel-row:hover {
    background: #222;
}

.channel-row.active {
    background: #c2185b;
    border-color: #e91e63;
}

.channel-logo-wrapper {
    width: 32px;
    height: 32px;
    background: #fff;
    border-radius: 2px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 2px;
}

.channel-logo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.default-logo {
    font-size: 10px;
    color: #000;
    font-weight: bold;
}

.channel-name {
    flex: 1;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 5px;
    color: #ccc;
    font-weight: 500;
}

.channel-row:hover .channel-name {
    color: #fff;
}

.channel-row.active .channel-name {
    color: #fff;
    font-weight: 600;
}

.channel-fav {
    color: #444;
    font-size: 1rem;
}

.channel-row.active .channel-fav {
    color: #fff;
}

/* EPG Schedule */
.epg-schedule {
    width: 320px;
    background: #151515;
    border-right: 1px solid #000;
    display: flex;
    flex-direction: column;
}

.epg-programs-list {
    flex: 1;
    overflow-y: auto;
    padding-top: 0;
    scrollbar-width: thin;
    scrollbar-color: #333 #151515;
}

.epg-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #222;
    font-size: 0.8rem;
    color: #999;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 44px;
}

.epg-item:hover {
    color: #fff;
    background: #1e1e1e;
}

.epg-item.active {
    background: rgba(0, 229, 255, 0.05);
    color: #fff;
    border: 1px solid #00e5ff;
    margin: -1px 0;
    position: relative;
    z-index: 1;
}

.epg-time {
    width: 45px;
    flex-shrink: 0;
    font-weight: 600;
    color: #eee;
    font-size: 0.75rem;
}

.epg-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 400;
}

/* Player Area */
.player-area {
    flex: 1;
    background: #000;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

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

#video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Watermark Logo */
.video-watermark {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 15;
    pointer-events: none;
}

.watermark-text {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
    opacity: 0.8;
    letter-spacing: 1px;
}

/* Overlay Info */
.video-info-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    gap: 5px;
}

.player-area:hover .video-info-overlay {
    opacity: 1;
}

.info-logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-direction: row-reverse;
}

.info-text h2 {
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
    font-size: 1.1rem;
}

.info-date-area {
    color: #ccc;
    font-size: 0.85rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

/* Controls */
.controls-container {
    height: auto;
    min-height: 100px;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.9) 20%, #000);
    padding: 10px 20px 15px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

/* Control Rows */
.controls-row-main {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
}

.info-brand {
    position: absolute;
    left: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-box-icon {
    width: 36px;
    height: 36px;
    background: #e91e63;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    color: #fff;
    font-size: 1.2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

#control-channel-name {
    font-size: 0.9rem;
    color: #ddd;
    font-weight: 600;
    text-transform: uppercase;
}

.seek-buttons {
    display: flex;
    gap: 6px;
}

.ctrl-btn-rect {
    background: #333;
    border: 1px solid #444;
    color: #eee;
    font-size: 0.7rem;
    padding: 6px 10px;
    border-radius: 3px;
    cursor: pointer;
    min-width: 55px;
    font-weight: 600;
    transition: all 0.1s;
}

.ctrl-btn-rect:hover {
    background: #444;
    border-color: #666;
    color: #fff;
}

.ctrl-btn-rect:active {
    transform: translateY(1px);
}

.play-btn-main {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    margin: 0 15px;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s;
}

.play-btn-main:hover {
    color: #e91e63;
    transform: scale(1.1);
}

.live-action {
    margin-left: 10px;
}

.ctrl-btn-rect.live {
    border: 1px solid #555;
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding-right: 12px;
}

.timer-volume {
    position: absolute;
    right: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.timer-display {
    background: #222;
    padding: 6px 10px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #00e5ff;
    border: 1px solid #333;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
    min-width: 60px;
    text-align: center;
}

.ctrl-btn-arrow {
    background: #333;
    border: 1px solid #444;
    color: #fff;
    width: 32px;
    height: 32px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ctrl-btn-arrow:hover {
    background: #444;
}

/* Timeline */
.timeline-row {
    position: relative;
    height: 30px;
    display: flex;
    align-items: center;
    margin-top: 5px;
    padding: 0 5px;
}

.timeline-progress-flag {
    position: absolute;
    top: -30px;
    left: 0;
    background: var(--brand-cyan);
    color: #000;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 5;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.timeline-progress-flag::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 50%;
    transform: translateX(50%);
    border-width: 4px 4px 0;
    border-style: solid;
    border-color: var(--brand-cyan) transparent;
}

.timeline-slider-container {
    width: 100%;
    height: 30px;
    position: relative;
    cursor: pointer;
}

.timeline-line {
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background: #444;
}

.timeline-current {
    position: absolute;
    top:
        15px;
    left: 0;
    height: 2px;
    background: var(--brand-cyan);
    box-shadow: 0 0 5px var(--brand-cyan);
}

.timeline-knob {
    position: absolute;
    top: 11px;
    width: 10px;
    height: 10px;
    background: var(--brand-cyan);
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 8px var(--brand-cyan);
    z-index: 2;
}

.timeline-markers {
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    pointer-events: none;
}

.marker-item {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.marker-dot {
    width: 6px;
    height: 6px;
    background: var(--brand-cyan);
    border-radius: 50%;
    margin-top: -2px;
    box-shadow: 0 0 3px var(--brand-cyan);
}

.marker-label {
    margin-top: 15px;
    font-size: 9px;
    color: var(--brand-cyan);
    font-family: monospace;
    opacity: 0.8;
}

/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */

@media (max-width: 768px) {
    .top-header {
        height: 50px;
        padding: 0 10px;
    }

    .header-logo {
        font-size: 18px;
    }

    .header-nav {
        display: none;
    }

    .main-content-wrapper {
        flex-direction: column;
        padding-top: 50px;
        height: calc(100vh - 50px);
    }

    .epg-schedule {
        display: none !important;
    }

    .channels-sidebar {
        width: 100%;
        height: auto;
        flex: 1;
        order: 2;
        border-right: none;
        border-top: 1px solid #333;
    }

    .sidebar-header {
        height: 40px;
        min-height: 40px;
        font-size: 0.75rem;
    }

    .channel-row {
        height: 50px;
        padding: 0 10px;
    }

    .channel-logo-wrapper {
        width: 30px;
        height: 30px;
    }

    .channel-name {
        font-size: 0.85rem;
    }

    .player-area {
        order: 1;
        flex: 0 0 auto;
    }

    .video-container {
        position: relative;
        padding-top: 56.25%;
        /* 16:9 aspect ratio */
        height: 0;
    }

    #video-player {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    .controls-container {
        position: relative;
        background: #111;
        padding: 10px;
    }

    .controls-row-main {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        margin-bottom: 10px;
        position: relative;
    }

    .info-brand,
    .timer-volume {
        position: static;
    }

    .timer-volume {
        justify-content: center;
    }

    .seek-buttons,
    .timeline-row,
    .timer-display {
        display: none;
    }

    .play-btn-main {
        font-size: 1.8rem;
        width: 50px;
        height: 50px;
    }

    .ctrl-btn-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
    }

    .watermark-text {
        font-size: 14px;
    }

    .video-info-overlay {
        top: 5px;
        right: 5px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .channels-sidebar {
        max-height: 35vh;
    }

    .player-area {
        min-height: 250px;
    }
}