/* تنسيقات نظام التحكم في البث المباشر */

.bottom-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.broadcast-control-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.broadcast-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.broadcast-stats .stat-item {
    text-align: center;
    flex: 1;
}

.broadcast-stats .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.broadcast-stats .stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

.playlists-broadcast-control {
    max-height: 400px;
    overflow-y: auto;
}

.playlist-broadcast-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.playlist-broadcast-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.playlist-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 1.1rem;
}

.playlist-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-paused {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-stopped {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.playlist-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #6c757d;
}

.playlist-info .info-item {
    display: flex;
    flex-direction: column;
}

.playlist-info .info-label {
    font-weight: 600;
    margin-bottom: 2px;
}

.playlist-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.control-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 80px;
    justify-content: center;
}

.control-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-start {
    background: #28a745;
    color: white;
}

.btn-start:hover:not(:disabled) {
    background: #218838;
}

.btn-pause {
    background: #ffc107;
    color: #212529;
}

.btn-pause:hover:not(:disabled) {
    background: #e0a800;
}

.btn-resume {
    background: #17a2b8;
    color: white;
}

.btn-resume:hover:not(:disabled) {
    background: #138496;
}

.btn-stop {
    background: #dc3545;
    color: white;
}

.btn-stop:hover:not(:disabled) {
    background: #c82333;
}

.btn-restart {
    background: #6f42c1;
    color: white;
}

.btn-restart:hover:not(:disabled) {
    background: #5a32a3;
}

.current-video-info {
    background: #e3f2fd;
    padding: 10px;
    border-radius: 6px;
    margin: 10px 0;
    font-size: 0.9rem;
}

.current-video-info .video-name {
    font-weight: 600;
    color: #1976d2;
    margin-bottom: 5px;
}

.current-video-info .video-position {
    color: #424242;
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #dc3545;
    font-weight: 600;
    font-size: 0.85rem;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #dc3545;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.empty-playlists {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-playlists i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.loading-broadcast {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

.loading-broadcast i {
    font-size: 2rem;
    margin-bottom: 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* تنسيقات متجاوبة */
@media (max-width: 768px) {
    .bottom-sections {
        grid-template-columns: 1fr;
    }
    
    .broadcast-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .playlist-controls {
        justify-content: center;
    }
    
    .control-btn {
        flex: 1;
        min-width: auto;
    }
}

/* تحسينات إضافية */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.section-header h3 {
    margin: 0;
    color: #2d3748;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-header h3 i {
    color: #667eea;
}

.refresh-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.refresh-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* تأثيرات التحديث */
.updating {
    opacity: 0.7;
    pointer-events: none;
}

.updated {
    animation: highlight 0.5s ease;
}

@keyframes highlight {
    0% { background-color: #d4edda; }
    100% { background-color: transparent; }
}