/* Live TV Page Styles */

/* Channel List Styles */
.channel-list {
    max-height: 400px;
    overflow-y: auto;
}

.channel-item {
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.channel-item:hover {
    background-color: #f8f9fa;
    border-left-color: #dc3545;
}

.channel-item.active {
    background-color: #fff5f5;
    border-left-color: #dc3545;
}

.channel-item.active h6 {
    color: #dc3545;
    font-weight: 600;
}

/* Channel Card Styles */
.channel-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.channel-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
    border-color: #dc3545;
}

.channel-thumbnail img {
    transition: transform 0.3s ease;
}

.channel-card:hover .channel-thumbnail img {
    transform: scale(1.05);
}

/* Live Badge Animation */
.live-badge {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

/* Video Player Styles */
.video-wrapper {
    position: relative;
    background: #000;
    border-radius: 0 0 0.375rem 0.375rem;
}

.video-wrapper iframe,
.video-wrapper video {
    border-radius: 0 0 0.375rem 0.375rem;
}

/* Live Header Styles */
.live-header {
    border-radius: 0.375rem 0.375rem 0 0;
    position: relative;
    overflow: hidden;
}

.live-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.on-air-indicator {
    background: #fff;
    color: #dc3545;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-weight: 600;
    font-size: 0.75rem;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 50%, 100% {
        opacity: 1;
    }
    25%, 75% {
        opacity: 0.5;
    }
}

/* Chat Styles */
.chat-messages {
    background: #fff;
    border-radius: 0.375rem;
    max-height: 200px;
    overflow-y: auto;
}

.chat-message {
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s ease;
}

.chat-message:hover {
    background-color: #f8f9fa;
}

.chat-message strong {
    color: #dc3545;
    font-weight: 600;
}

.chat-form input:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Category Tabs */
.category-tabs .nav-pills .nav-link {
    border-radius: 2rem;
    padding: 0.5rem 1.5rem;
    margin: 0 0.25rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.category-tabs .nav-pills .nav-link:hover {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border-color: #dc3545;
}

.category-tabs .nav-pills .nav-link.active {
    background-color: #dc3545;
    border-color: #dc3545;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

/* Schedule Styles */
.schedule-item {
    transition: all 0.3s ease;
}

.schedule-item:hover {
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    padding-left: 1rem !important;
}

/* Viewer Count Animation */
.viewer-count {
    font-weight: 600;
    transition: color 0.3s ease;
}

.viewer-count.updating {
    color: #28a745;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #dc3545;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .category-tabs .nav-pills {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .category-tabs .nav-pills .nav-link {
        margin: 0.25rem;
        font-size: 0.875rem;
        padding: 0.375rem 1rem;
    }
    
    .channel-item {
        padding: 0.75rem !important;
    }
    
    .channel-thumbnail img,
    .channel-thumbnail div {
        width: 50px !important;
        height: 35px !important;
    }
    
    .video-wrapper iframe,
    .video-wrapper video {
        height: 300px !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .channel-item:hover {
        background-color: #2d3748;
    }
    
    .channel-item.active {
        background-color: #2a1a1a;
    }
    
    .chat-messages {
        background: #2d3748;
        color: #fff;
    }
    
    .chat-message:hover {
        background-color: #4a5568;
    }
}

/* Fullscreen Styles */
.video-wrapper:fullscreen {
    background: #000;
}

.video-wrapper:fullscreen iframe,
.video-wrapper:fullscreen video {
    width: 100vw;
    height: 100vh;
}

/* Status Badges */
.badge-live {
    background: linear-gradient(45deg, #dc3545, #ff6b6b);
    animation: pulse 2s infinite;
}

.badge-scheduled {
    background: linear-gradient(45deg, #ffc107, #ff9800);
}

.badge-offline {
    background: linear-gradient(45deg, #6c757d, #5a6268);
}

/* Channel Info Card */
.channel-info-card {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
}

.channel-info-card .card-header {
    background: linear-gradient(135deg, #dc3545, #c82333);
    border: none;
}

/* Watch Button */
.watch-btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.watch-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.watch-btn:hover::before {
    width: 300px;
    height: 300px;
}

.watch-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

/* Tab Content Animation */
.tab-pane {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
