/* Live Stream Styles */

.live-tab {
    position: relative;
}

.live-indicator-small {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #ff4444;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.live-indicator-text {
    background: #ff4444;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.livestream-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.livestream-section h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    color: #333;
    font-size: 24px;
}

.livestream-section h3 i {
    color: #4CAF50;
}

.streams-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.stream-player-container {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.stream-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    background: white;
    border-bottom: 1px solid #eee;
}

.stream-info h4 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

.stream-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.stream-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #666;
}

.stream-meta i {
    color: #4CAF50;
}

.stream-quality {
    background: #4CAF50;
    color: white !important;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px !important;
}

.stream-status.live {
    background: #ff4444;
    color: white !important;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px !important;
    animation: pulse 2s infinite;
}

.stream-status.scheduled {
    background: #FF9800;
    color: white !important;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px !important;
}

.featured-badge {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stream-player {
    position: relative;
    background: #000;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
}

.stream-embed {
    width: 100%;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
}

.stream-embed iframe,
.stream-embed video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}

/* HLS Player responsive sizing */
.hls-player-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.hls-video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hls-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    text-align: center;
}

.stream-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.placeholder-content {
    max-width: 400px;
    padding: 40px;
}

.placeholder-content i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.8;
}

.placeholder-content h4 {
    font-size: 24px;
    margin-bottom: 12px;
    color: white;
}

.placeholder-content p {
    font-size: 16px;
    margin-bottom: 30px;
    opacity: 0.9;
    line-height: 1.5;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.countdown-item {
    text-align: center;
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 12px;
    min-width: 80px;
}

.countdown-number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin-bottom: 5px;
}

.countdown-label {
    font-size: 12px;
    opacity: 0.8;
    text-transform: uppercase;
}

.stream-description {
    padding: 20px;
    background: white;
    border-top: 1px solid #eee;
}

.stream-description p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

.stream-chat {
    background: white;
    border-top: 1px solid #eee;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.chat-header h5 {
    margin: 0;
    color: #333;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-header h5 i {
    color: #4CAF50;
}

.chat-toggle {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.chat-toggle:hover {
    background: #e9ecef;
    color: #333;
}

.chat-container {
    max-height: 300px;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    padding: 15px 20px;
    max-height: 250px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    display: flex;
    gap: 8px;
    font-size: 14px;
    line-height: 1.4;
}

.chat-user {
    font-weight: 600;
    color: #4CAF50;
    min-width: fit-content;
}

.chat-text {
    color: #333;
}

.chat-input {
    display: flex;
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    gap: 12px;
}

.chat-input input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
}

.chat-input input:focus {
    border-color: #4CAF50;
}

.chat-input button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-input button:hover {
    background: #45a049;
    transform: scale(1.05);
}

.chat-input button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.no-streams {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #ddd;
}

.no-streams-content {
    text-align: center;
    color: #666;
    max-width: 300px;
}

.no-streams-content i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-streams-content h4 {
    font-size: 20px;
    margin-bottom: 12px;
    color: #333;
}

.no-streams-content p {
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .livestream-section {
        padding: 20px;
    }
    
    .stream-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .stream-meta {
        gap: 12px;
    }
    
    .countdown-timer {
        gap: 15px;
    }
    
    .countdown-item {
        min-width: 60px;
        padding: 12px;
    }
    
    .countdown-number {
        font-size: 24px;
    }
    
    .chat-messages {
        max-height: 200px;
    }
    
    .placeholder-content {
        padding: 30px 20px;
    }
    
    .placeholder-content i {
        font-size: 48px;
    }
    
    .placeholder-content h4 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .stream-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .countdown-timer {
        gap: 10px;
    }
    
    .countdown-item {
        min-width: 50px;
        padding: 10px;
    }
    
    .countdown-number {
        font-size: 20px;
    }
    
    .countdown-label {
        font-size: 10px;
    }
}

/* Animation for stream loading */
.stream-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 18px;
}

.stream-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Chat scroll styling */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* New Compact Stream Header Styles */
.stream-title-section h4 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 15px 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
    flex-wrap: wrap;
}

.stream-title-section h4 i {
    color: #4CAF50;
    font-size: 18px;
}

.live-badge {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    animation: pulse 2s infinite;
    margin-right: 8px;
}

.scheduled-badge {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-right: 8px;
}

.featured-badge {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.stream-meta-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
    background: rgba(76, 175, 80, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(76, 175, 80, 0.2);
    transition: all 0.3s ease;
}

.meta-item:hover {
    background: rgba(76, 175, 80, 0.15);
    transform: translateY(-1px);
}

.meta-item i {
    color: #4CAF50;
    font-size: 12px;
}

.meta-item.quality {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
}

.meta-item.quality i {
    color: white;
}

.meta-item.language {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    border: none;
}

.meta-item.language i {
    color: white;
}

.meta-item.viewers {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
    border: none;
}

.meta-item.viewers i {
    color: white;
}

/* Responsive adjustments for new design */
@media (max-width: 768px) {
    .stream-title-section h4 {
        font-size: 18px;
        gap: 8px;
    }
    
    .live-badge,
    .scheduled-badge,
    .featured-badge {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .stream-meta-compact {
        gap: 8px;
    }
    
    .meta-item {
        font-size: 12px;
        padding: 5px 10px;
    }
}

@media (max-width: 480px) {
    .stream-title-section h4 {
        font-size: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .stream-meta-compact {
        justify-content: flex-start;
        gap: 6px;
    }
    
    .meta-item {
        font-size: 11px;
        padding: 4px 8px;
    }
}
