* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0b0f19;
    color: #f8fafc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Header Navbar */
.app-header {
    background: #111827;
    border-bottom: 1px solid #1f2937;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-title {
    font-size: 20px;
    font-weight: 700;
    color: #0284c7;
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-badge {
    font-size: 13px;
    color: #94a3b8;
    background: #1e293b;
    padding: 4px 10px;
    border-radius: 6px;
}

/* Source Dropdown */
.source-select {
    background: #1e293b;
    color: #38bdf8;
    border: 1px solid #0284c7;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

.top-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-input {
    background: #1e293b;
    border: 1px solid #334155;
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    width: 220px;
    outline: none;
}

.search-input:focus {
    border-color: #0284c7;
}

.btn-icon {
    background: #1e293b;
    border: 1px solid #334155;
    color: #f8fafc;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: #0284c7;
    border-color: #0284c7;
}

/* Main Layout: Sidebar + Grid Content */
.main-container {
    display: flex;
    flex: 1;
}

/* Sidebar Categories */
.sidebar {
    width: 260px;
    background: #0f172a;
    border-right: 1px solid #1e293b;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-radius: 8px;
    color: #94a3b8;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.category-item:hover, .category-item.active {
    background: #0284c7;
    color: #ffffff;
}

.cat-count {
    background: #1e293b;
    color: #38bdf8;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.category-item.active .cat-count {
    background: #0369a1;
    color: #fff;
}

/* Content Area */
.content-area {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #f8fafc;
}

.channel-count-text {
    font-size: 13px;
    color: #64748b;
}

/* Channel Grid Container */
.channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 14px;
}

.channel-list-mode {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Channel Card */
.channel-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.channel-card:hover {
    transform: translateY(-3px);
    border-color: #0284c7;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.3);
}

.channel-card.active {
    background: #0284c7;
    border-color: #38bdf8;
}

.channel-logo {
    width: 60px;
    height: 50px;
    object-fit: contain;
    margin-bottom: 8px;
}

.channel-name {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    color: #f8fafc;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Video Player Modal / Overlay */
.player-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.player-modal.active {
    display: flex;
}

.player-box {
    width: 85vw;
    max-width: 1000px;
    background: #0f172a;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #1e293b;
}

.player-header {
    padding: 12px 16px;
    background: #1e293b;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.player-title {
    font-size: 16px;
    font-weight: 700;
    color: #38bdf8;
}

.close-btn {
    background: none;
    border: none;
    color: #f8fafc;
    font-size: 20px;
    cursor: pointer;
}

video {
    width: 100%;
    height: 500px;
    background: #000;
}
