* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #141414;
    color: #fff;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 10%, transparent);
    z-index: 1000;
    transition: background 0.3s;
}

.navbar.scrolled {
    background: #141414;
}

.nav-brand h1 {
    color: #e50914;
    font-size: 24px;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    gap: 20px;
}

.nav-item {
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background 0.3s;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
}

.nav-item.active {
    font-weight: bold;
    color: #e50914;
}

.nav-search {
    display: flex;
    align-items: center;
    background: rgba(0,0,0,0.5);
    border: 1px solid #333;
    border-radius: 4px;
}

.nav-search input {
    background: transparent;
    border: none;
    padding: 8px 12px;
    color: #fff;
    width: 250px;
    outline: none;
}

.nav-search button {
    background: transparent;
    border: none;
    padding: 8px 12px;
    color: #fff;
    cursor: pointer;
}

/* Main Content */
.main-content {
    margin-top: 80px;
    padding: 20px 40px;
}

/* Hero Section */
.hero-section {
    height: 400px;
    background: linear-gradient(to right, #000 30%, transparent),
                url('https://images.unsplash.com/photo-1574375927938-d5a98e8ffe85?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
}

.hero-content {
    padding: 60px;
    max-width: 600px;
}

.hero-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 24px;
    color: #999;
}

/* Sections */
.content-section {
    margin-bottom: 50px;
}

.section-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #fff;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.category-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s;
}

.category-card:hover {
    transform: scale(1.05);
}

.category-card h3 {
    font-size: 18px;
    margin-top: 10px;
}

.category-card i {
    font-size: 40px;
    margin-bottom: 10px;
}

/* Channels Grid */
.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.channel-card {
    background: #1f1f1f;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s;
    position: relative;
}

.channel-card:hover {
    transform: scale(1.05);
    z-index: 2;
}

.channel-logo {
    width: 100%;
    height: 150px;
    object-fit: cover;
    background: #2a2a2a;
}

.channel-info {
    padding: 15px;
}

.channel-name {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-meta {
    font-size: 12px;
    color: #999;
    display: flex;
    gap: 10px;
}

/* Player Modal */
.player-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    padding: 40px;
}

.player-modal.active {
    display: block;
}

.player-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.player-header h3 {
    font-size: 24px;
}

.close-player {
    background: none;
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
}

.player-wrapper {
    flex: 1;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

#videoPlayer {
    width: 100%;
    height: 100%;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 4px solid rgba(255,255,255,0.1);
    border-left-color: #e50914;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 10px;
    }
    
    .nav-menu {
        margin: 10px 0;
    }
    
    .nav-search input {
        width: 150px;
    }
    
    .main-content {
        padding: 10px;
    }
    
    .hero-section {
        height: 300px;
    }
    
    .hero-content {
        padding: 30px;
    }
    
    .hero-content h2 {
        font-size: 32px;
    }
    
    .hero-content p {
        font-size: 18px;
    }
}