/* Premium Live TV Dark Theme CSS */
:root {
    --bg-primary: #0B0F19;
    --bg-secondary: #171C26;
    --bg-card: #1E2433;
    --accent: #E50914;
    --accent-hover: #B20710;
    --text-primary: #FFFFFF;
    --text-secondary: #A0AEC0;
    --text-muted: #718096;
    --border-color: #2D3748;
    --gradient-red: linear-gradient(135deg, #E50914 0%, #B20710 100%);
    --gradient-dark: linear-gradient(135deg, #0B0F19 0%, #171C26 100%);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 30px rgba(229, 9, 20, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
}

/* Hero Section */
.hero-section {
    background: var(--gradient-dark);
    padding: 60px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="%23E50914" stroke-width="0.5" opacity="0.1"/></svg>');
    background-size: 100px 100px;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: var(--gradient-red);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.live-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gradient-red);
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.live-icon::before {
    content: '';
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(229, 9, 20, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(229, 9, 20, 0); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Search Bar */
.search-container {
    max-width: 600px;
    margin: 0 auto 30px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 18px 60px 18px 25px;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.3);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-icon {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* Country Filter */
.country-filter {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.country-btn {
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.country-btn:hover,
.country-btn.active {
    background: var(--gradient-red);
    border-color: var(--accent);
    color: white;
    transform: translateY(-2px);
}

/* Featured Player */
.featured-player {
    background: var(--bg-secondary);
    border-radius: 20px;
    overflow: hidden;
    margin: 40px 20px;
    box-shadow: var(--shadow-card);
}

.player-header {
    background: var(--gradient-dark);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border-color);
}

.channel-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.channel-logo-large {
    width: 60px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.channel-name {
    font-size: 1.5rem;
    font-weight: 700;
}

.player-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.control-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.control-btn:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

.control-btn.primary {
    background: var(--gradient-red);
}

.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: black;
}

.video-container iframe,
.video-container video {
    width: 100%;
    height: 100%;
    border: none;
}

/* Category Filter */
.category-filter {
    padding: 20px;
    background: var(--bg-secondary);
    margin: 20px;
    border-radius: 15px;
    overflow-x: auto;
}

.category-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.category-btn {
    padding: 12px 25px;
    border: 2px solid var(--border-color);
    border-radius: 30px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.category-btn:hover,
.category-btn.active {
    background: var(--gradient-red);
    border-color: var(--accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.3);
}

/* Channel Grid */
.channel-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px;
}

.channel-card {
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
}

.channel-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
}

.channel-card.active {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.4);
}

.card-image {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.channel-card:hover .card-image img {
    transform: scale(1.1);
}

.live-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--gradient-red);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
    animation: pulse 2s infinite;
}

.live-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.card-content {
    padding: 15px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.card-category {
    background: var(--bg-secondary);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
}

.card-viewers {
    display: flex;
    align-items: center;
    gap: 5px;
}

.watch-btn {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    border: none;
    border-radius: 25px;
    background: var(--gradient-red);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.watch-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

/* Trending Channels */
.trending-section {
    padding: 40px 20px;
    background: var(--bg-secondary);
    margin: 20px;
    border-radius: 20px;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '';
    width: 5px;
    height: 30px;
    background: var(--gradient-red);
    border-radius: 3px;
}

.trending-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 10px 0;
    scroll-behavior: smooth;
}

.trending-slider::-webkit-scrollbar {
    height: 8px;
}

.trending-slider::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 10px;
}

.trending-slider::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}

.trending-card {
    flex: 0 0 280px;
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.trending-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* Recently Viewed */
.recent-section {
    padding: 40px 20px;
}

.recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

/* Floating Player */
.floating-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    border: 2px solid var(--accent);
}

.floating-player.active {
    display: block;
}

.floating-player video,
.floating-player iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
}

.floating-controls {
    padding: 10px 15px;
    background: var(--bg-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-floating {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
}

.close-floating:hover {
    color: var(--accent);
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .channel-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .channel-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 15px;
    }
    
    .featured-player {
        margin: 20px 15px;
    }
    
    .player-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .category-buttons {
        justify-content: flex-start;
    }
    
    .category-btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }
    
    .floating-player {
        width: 280px;
        bottom: 10px;
        right: 10px;
    }
    
    .trending-card {
        flex: 0 0 220px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 40px 15px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .channel-grid {
        grid-template-columns: 1fr;
    }
    
    .search-input {
        padding: 15px 50px 15px 20px;
    }
    
    .country-filter {
        gap: 8px;
    }
    
    .country-btn {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
    
    .floating-player {
        width: 240px;
    }
    
    .trending-card {
        flex: 0 0 180px;
    }
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-secondary) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}
