.sidebar {
    background-color: #2a2a2a;
    border-right: 1px solid #3a3a3a;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    width: 300px !important;
    min-width: 300px;
    max-width: 300px;
}

#startPanel {
    overflow-y: hidden;
}

.sidebar > div {
    flex: 1;
    overflow-y: auto;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#channelList {
    overflow-y: auto;
    flex: 1;
    padding-right: 4px;
}

#channelList::-webkit-scrollbar {
    width: 6px;
}

#channelList::-webkit-scrollbar-track {
    background: transparent;
}

#channelList::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

#channelList::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.sidebar .relative.mb-4 {
    flex-shrink: 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid #3a3a3a;
}

.channel-item {
    padding: 0.75rem;
    border-radius: 0.375rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.channel-item:hover {
    background-color: #3a3a3a;
}

.channel-item.active,
.channel-item.selected {
    background-color: #ef4444;
}

.channel-item.selected:hover {
    background-color: #dc2626;
}

.channel-item img {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
    margin-right: 0.75rem;
}

.progress-bar {
    border-radius: 9999px;
    overflow: hidden;
}

.progress {
    border-radius: 9999px;
    transition: width 0.3s ease;
}

#videoPlayerContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    height: 100%;
    background-color: black;
    flex: 1;
    cursor: pointer; /* Show pointer cursor when hovering over video area */
}

#video {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 1; /* Ensure video is above background */
}

#loadingSpinner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: white;
}

.custom-player-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10; /* Make sure controls are above video */
}

.custom-player-controls button {
    background: transparent;
    border: none;
    color: white;
    padding: 0.5rem;
    margin: 0 0.25rem;
    cursor: pointer;
    transition: color 0.2s;
}

.custom-player-controls button:hover {
    color: #ef4444;
}

#playPauseBtn,
#muteBtn,
#playFromStartBtn {
    width: 10px;
    transition: all 0.2s;
}

#muteBtn {
    text-align: center;
}

#playFromStartBtn:hover {
    color: #ef4444;
}

.play-from-start {
    font-size: 0.75rem;
    transition: all 0.2s;
}

.play-from-start:hover {
    transform: scale(1.05);
}

.play-from-start i {
    margin-right: 0.25rem;
}

#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #ef4444;
    border-radius: 50%;
    cursor: pointer;
}

#volumeSlider::-webkit-slider-runnable-track {
    width: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.live-indicator {
    background-color: #ef4444;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: bold;
    margin: 0 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease, box-shadow 0.3s ease;
    text-transform: uppercase;
}

.live-indicator.visible {
    display: inline-block !important;
    opacity: 1;
}

#qualitySelector {
    position: absolute;
    bottom: 70px;
    right: 10px;
    background-color: rgba(42, 42, 42, 0.527);
    border: 1px solid rgba(58, 58, 58, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 0.5rem;
    border-radius: 0.5rem;
    opacity: 0;
    pointer-events: none;
    min-width: 200px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.quality-menu-header {
    padding: 0.75rem 1rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.quality-options {
    max-height: 300px;
    overflow-y: auto;
}

.quality-option {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 0.375rem;
}

.quality-option:hover {
    background-color: rgba(239, 68, 68, 0.2);
}

.quality-option.selected {
    background-color: rgba(239, 68, 68, 0.589);
}

.quality-check {
    margin-right: 0.75rem;
    opacity: 0;
    width: 16px;
}

.quality-option.selected .quality-check {
    opacity: 1;
}

.quality-options::-webkit-scrollbar {
    width: 6px;
}

.quality-options::-webkit-scrollbar-track {
    background: transparent;
}

.quality-options::-webkit-scrollbar-thumb {
    background-color: #4a4a4a;
    border-radius: 3px;
}

#qualitySelector.visible {
    opacity: 1;
    pointer-events: auto;
}

#qualitySelector option {
    background-color: rgba(42, 42, 42, 0.95);
    color: white;
    padding: 0.75rem;
    cursor: pointer;
    border-radius: 0.375rem;
}

#qualitySelector option:hover {
    background-color: #ef4444;
}

#qualitySelector option:checked {
    background-color: #ef4444;
    color: white;
}

#qualitySelector:focus {
    outline: none;
    border-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

#catchupControls {
    flex: 1;
    margin: 0 1rem;
    display: none;
}

#catchupControls.visible {
    display: flex;
}

#timelineContainer {
    height: 8px;
    background-color: rgba(75, 85, 99, 0.3);
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    overflow: visible;
    margin: 8px 0;
    position: relative;
}

#timelineContainer:hover {
    height: 12px;
    transition: height 0.2s ease;
}

#timeline {
    background-color: #ef4444;
    border-radius: inherit;
    transition: width 0.1s linear, height 0.2s ease;
    position: absolute;
    height: 100%;
    left: 0;
    top: 0;
    min-width: 1px;
    width: 0%;
    z-index: 1;
}

#timelineLiveMarker {
    position: absolute;
    width: 3px;
    height: 16px;
    background-color: #ef4444;
    top: -4px;
    transform: translateX(-50%);
    z-index: 3;
}

#timelineLiveMarker::after {
    content: 'LIVE';
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: #ef4444;
    white-space: nowrap;
}

#timelineUnavailable {
    position: absolute;
    height: 100%;
    background-color: rgba(31, 41, 55, 0.8);
    pointer-events: none;
    right: 0;
    top: 0;
    z-index: 2;
    border-radius: inherit;
    backdrop-filter: brightness(0.6);
}

#liveMarker {
    position: absolute;
    right: 0;
    top: -4px;
    bottom: -4px;
    width: 2px;
    background-color: #ef4444;
    z-index: 2;
}

#timelineFuture {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    background-color: rgba(75, 85, 99, 0.3);
    pointer-events: none;
}

#liveMarker::after {
    content: 'LIVE';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: #ef4444;
    white-space: nowrap;
}

.info-popup {
    position: absolute;
    bottom: 70px;
    right: 50px;
    background-color: rgba(42, 42, 42, 0.527);
    border: 1px solid rgba(58, 58, 58, 0.158);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 350px;
    max-width: 450px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    visibility: hidden;
}

.info-popup.visible {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.info-header {
    margin-bottom: 0.5rem;
}

.info-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
}

#infoSubtitle {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    line-height: 1.2;
}

.info-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin: 0.5rem 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

.info-details {
    display: flex;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.7);
}

.info-details > span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.info-details > span:not(.hidden) {
    display: flex !important;
}

.info-details > span.hidden {
    display: none !important;
}

.info-details i {
    color: #ef4444;
    width: 16px;
    text-align: center;
}

#infoBtn {
    cursor: pointer;
    transition: color 0.2s ease;
}

#infoBtn:hover {
    color: #ef4444;
}

#livePanel > div {
    display: flex;
    width: 100%;
    height: calc(100vh - 72px);
    overflow: hidden;
}
    