:root {
    --netflix-red: #e50914;
    --netflix-dark: #141414;
    --netflix-gray: #2f2f2f;
    --netflix-light-gray: #757575;
    --netflix-white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--netflix-dark);
    color: var(--netflix-white);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    overflow-x: hidden;
}

/* Navigation */
.navbar {
    background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, transparent 100%);
    padding: 1rem 2rem;
    transition: background 0.3s ease;
}

.navbar.scrolled {
    background: var(--netflix-dark);
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--netflix-red) !important;
}

.brand-text {
    background: linear-gradient(45deg, var(--netflix-red), #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.viewer-count {
    color: var(--netflix-white);
    font-size: 0.9rem;
}

/* Main Container */
.main-container {
    margin-top: 76px;
    min-height: calc(100vh - 76px);
}

/* Video Section */
.video-section {
    padding: 2rem;
}

.video-container {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.7) 0%,
        transparent 20%,
        transparent 80%,
        rgba(0,0,0,0.9) 100%
    );
    pointer-events: none;
}

.video-overlay > * {
    pointer-events: auto;
}

/* Channel Info */
.channel-info {
    position: absolute;
    top: 2rem;
    left: 2rem;
}

.channel-badge {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(0,0,0,0.8);
    padding: 1rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.channel-logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, var(--netflix-red), #ff6b6b);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.channel-name {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.channel-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.quality-badge {
    background: var(--netflix-red);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.live-badge {
    background: rgba(229, 9, 20, 0.2);
    color: #ff6b6b;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    border: 1px solid var(--netflix-red);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.live-dot {
    color: var(--netflix-red);
    font-size: 0.6rem;
    animation: pulse 2s infinite;
}

/* Video Controls */
.video-controls {
    position: absolute;
    bottom: 2rem;
    left: 0;
    right: 0;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.video-controls.hidden {
    opacity: 0;
}

.controls-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    align-items: center;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(0,0,0,0.8);
    padding: 1rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.control-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.control-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.play-pause-btn {
    background: var(--netflix-red);
    width: 60px;
    height: 60px;
}

.play-pause-btn:hover {
    background: #f40612;
    transform: scale(1.1);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.volume-slider {
    width: 100px;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--netflix-red);
    cursor: pointer;
}

.volume-text {
    font-size: 0.8rem;
    color: var(--netflix-white);
    min-width: 40px;
}

/* Loading Spinner */
.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: none;
}

.loading-spinner.show {
    display: block;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid var(--netflix-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

/* Channels Sidebar */
.channels-sidebar {
    background: rgba(20,20,20,0.95);
    backdrop-filter: blur(10px);
    height: calc(100vh - 76px);
    overflow-y: auto;
    border-left: 1px solid var(--netflix-gray);
}

.sidebar-content {
    padding: 2rem;
}

/* Search Section */
.search-section {
    margin-bottom: 2rem;
}

.search-box {
    background: var(--netflix-gray);
    border-radius: 25px;
    border: 1px solid var(--netflix-light-gray);
    overflow: hidden;
}

.search-box .input-group-text {
    background: transparent;
    border: none;
    color: var(--netflix-light-gray);
}

.search-box .form-control {
    background: transparent;
    border: none;
    color: var(--netflix-white);
    padding: 0.75rem 0;
}

.search-box .form-control::placeholder {
    color: var(--netflix-light-gray);
}

.search-box .form-control:focus {
    box-shadow: none;
    color: var(--netflix-white);
}

.btn-clear {
    background: transparent;
    border: none;
    color: var(--netflix-light-gray);
    padding: 0.5rem;
}

.btn-clear:hover {
    color: var(--netflix-white);
}

/* Categories */
.categories-section {
    margin-bottom: 2rem;
}

.categories-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-btn {
    background: var(--netflix-gray);
    border: 1px solid var(--netflix-light-gray);
    color: var(--netflix-white);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-align: left;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.category-btn:hover,
.category-btn.active {
    background: var(--netflix-red);
    border-color: var(--netflix-red);
    transform: translateX(5px);
}

.category-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* Channels List */
.channels-section {
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header h4 {
    color: var(--netflix-white);
    font-size: 1.2rem;
    margin: 0;
}

.channel-count,
.favorites-count {
    background: var(--netflix-gray);
    color: var(--netflix-light-gray);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

.channels-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.channel-item {
    background: var(--netflix-gray);
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.channel-item:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--netflix-light-gray);
    transform: translateX(5px);
}

.channel-item.active {
    background: rgba(229, 9, 20, 0.2);
    border-color: var(--netflix-red);
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.3);
}

.channel-logo-small {
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, var(--netflix-red), #ff6b6b);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.channel-info-small {
    flex: 1;
}

.channel-name-small {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.channel-meta-small {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.quality-badge-small {
    background: var(--netflix-red);
    color: white;
    padding: 0.1rem 0.5rem;
    border-radius: 3px;
    font-size: 0.7rem;
}

.channel-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.playing-indicator {
    background: var(--netflix-red);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
}

.favorite-btn {
    background: transparent;
    border: none;
    color: var(--netflix-light-gray);
    cursor: pointer;
    padding: 0.25rem;
    transition: all 0.3s ease;
}

.favorite-btn:hover,
.favorite-btn.favorited {
    color: var(--netflix-red);
    transform: scale(1.2);
}

/* Favorites Section */
.favorites-section {
    border-top: 1px solid var(--netflix-gray);
    padding-top: 2rem;
}

.favorites-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.favorite-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--netflix-gray);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.favorite-item:hover {
    background: rgba(255,255,255,0.1);
    transform: translateX(3px);
}

.favorite-logo {
    width: 30px;
    height: 30px;
    background: linear-gradient(45deg, var(--netflix-red), #ff6b6b);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.favorite-name {
    flex: 1;
    font-size: 0.9rem;
}

.remove-favorite {
    background: transparent;
    border: none;
    color: var(--netflix-light-gray);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
}

.remove-favorite:hover {
    color: var(--netflix-red);
    background: rgba(255,255,255,0.1);
}

/* Animations */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 992px) {
    .channels-sidebar {
        height: auto;
        max-height: 50vh;
        border-left: none;
        border-top: 1px solid var(--netflix-gray);
    }
    
    .video-section {
        padding: 1rem;
    }
    
    .controls-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .control-group {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.4rem;
    }
    
    .channel-badge {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .channel-name {
        font-size: 1.4rem;
    }
    
    .play-pause-btn {
        width: 50px;
        height: 50px;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
    }
}

/* Scrollbar Styling */
.channels-sidebar::-webkit-scrollbar {
    width: 6px;
}

.channels-sidebar::-webkit-scrollbar-track {
    background: var(--netflix-dark);
}

.channels-sidebar::-webkit-scrollbar-thumb {
    background: var(--netflix-red);
    border-radius: 3px;
}

.channels-sidebar::-webkit-scrollbar-thumb:hover {
    background: #f40612;
}.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: none;
    z-index: 1000;
}

.loading-spinner.show {
    display: block;
}

.video-controls.hidden {
    opacity: 0;
    pointer-events: none;
}