:root {
    --bg-dark: #0f172a;
    --bg-panel: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
    --accent-hover: #0ea5e9;
    --border: #334155;
    --item-hover: #334155;
    --item-active: #0ea5e9;
}

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

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

.app-container {
    display: flex;
    height: 100%;
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: 320px;
    background-color: var(--bg-panel);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(10px);
}

.sidebar-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--accent);
}

#searchInput {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
    margin-bottom: 10px;
}

#searchInput:focus {
    border-color: #3b82f6;
}

.category-filter {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
    cursor: pointer;
    appearance: none;
}

.category-filter option {
    background: #1e293b;
    color: #fff;
}

.category-filter:focus {
    border-color: #3b82f6;
}

.channel-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

/* Scrollbar for channel list */
.channel-list::-webkit-scrollbar {
    width: 6px;
}
.channel-list::-webkit-scrollbar-thumb {
    background-color: #475569;
    border-radius: 4px;
}

.channel-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: background-color 0.2s;
}

.channel-item:hover {
    background-color: var(--item-hover);
}

.channel-item.active {
    background-color: var(--item-active);
    border-left: 4px solid #fff;
    padding-left: 16px;
}

.channel-logo {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background-color: #334155;
    margin-right: 12px;
    object-fit: contain;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.channel-info {
    flex: 1;
    overflow: hidden;
}

.channel-name {
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-group {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.loading {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Main Content (Video) */
.main-content {
    flex: 1;
    background-color: #000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-container {
    width: 100%;
    height: 100%;
    position: relative;
}

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

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.video-overlay.hidden {
    display: none;
}

#nowPlayingText {
    color: var(--text-muted);
    font-size: 1.5rem;
    font-weight: 400;
}

/* Responsive */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: 40vh;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .main-content {
        height: 60vh;
    }
}
