* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', Arial, sans-serif;
}

body {
    background-color: #0f0f0f;
    color: #ffffff;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background-color: #0f0f0f;
    border-bottom: 1px solid #272727;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.play-icon {
    background-color: #ff0000;
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
}

.logo-section h1 {
    font-size: 20px;
    font-weight: 700;
}

.logo-section h1 span {
    color: #ff0000;
}

.search-section input {
    width: 350px;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #303030;
    background-color: #121212;
    color: #fff;
    outline: none;
    font-size: 14px;
}

.search-section input:focus {
    border-color: #1c62b9;
}

.main-container {
    display: flex;
    gap: 24px;
    padding: 24px;
    max-width: 1600px;
    margin: 0 auto;
}

.primary-section {
    flex: 2.5;
}

.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
}

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

.ad-overlay {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 650px;
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid #ff0000;
    border-radius: 8px;
    z-index: 50;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

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

.ad-timer {
    position: absolute;
    top: 6px;
    right: 8px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 3px 8px;
    font-size: 12px;
    border-radius: 4px;
    pointer-events: none;
}

.ad-overlay img {
    width: 100%;
    height: auto;
    max-height: 110px;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.video-info {
    margin-top: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #272727;
}

.video-info h2 {
    font-size: 20px;
    margin-bottom: 8px;
}

.channel-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #aaaaaa;
}

.live-badge {
    background-color: #cc0000;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.secondary-section {
    flex: 1;
    background-color: #181818;
    border: 1px solid #272727;
    border-radius: 12px;
    padding: 16px;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid #272727;
    margin-bottom: 10px;
}

.sidebar-header h3 {
    font-size: 16px;
}

.sidebar-header span {
    font-size: 12px;
    color: #aaaaaa;
}

/* Sidebar Filters (All / Favorites) */
.sidebar-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.filter-btn {
    flex: 1;
    background-color: #272727;
    color: #aaa;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
}

.filter-btn.active {
    background-color: #ff0000;
    color: #fff;
    font-weight: bold;
}

.channel-list {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.channel-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.channel-card:hover {
    background-color: #272727;
}

.channel-card.active {
    background-color: #2c2c2c;
    border-left: 4px solid #ff0000;
}

.channel-info-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    overflow: hidden;
}

.channel-thumb {
    width: 90px;
    height: 52px;
    background-color: #000;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

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

.channel-details h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #f1f1f1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-details p {
    font-size: 12px;
    color: #aaaaaa;
}

/* Favorite Star Button */
.fav-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 6px;
    color: #666;
    transition: transform 0.1s;
}

.fav-btn:hover {
    transform: scale(1.2);
}

.fav-btn.favorited {
    color: #ffcc00;
}

@media (max-width: 900px) {
    .main-container {
        flex-direction: column;
        padding: 12px;
    }
    .search-section input {
        width: 180px;
    }
}
