/* Broadcast System Styles - أنماط نظام البث المتزامن */

/* أنماط عامة لنظام البث */
.broadcast-system-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.broadcast-system-section .section-header h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.broadcast-system-section .section-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* حاوي عناصر تحكم البث */
.broadcast-controls-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.broadcast-controls-section h4 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* إعداد البث */
.broadcast-setup {
    margin-bottom: 25px;
}

.broadcast-setup .form-group {
    margin-bottom: 20px;
}

.broadcast-setup label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e;
}

.broadcast-setup select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
}

.broadcast-setup select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* أزرار التحكم في البث */
.broadcast-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.broadcast-actions .btn {
    padding: 12px 25px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 160px;
    justify-content: center;
}

.broadcast-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.broadcast-actions .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.broadcast-actions .btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.broadcast-actions .btn-danger {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
    color: white;
}

.broadcast-actions .btn-warning {
    background: linear-gradient(135deg, #ffc107, #f39c12);
    color: #212529;
}

/* معلومات قائمة التشغيل */
.broadcast-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.playlist-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.playlist-details > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.playlist-details strong {
    color: #495057;
}

/* حالة البث */
.broadcast-status {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.current-video {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #495057;
}

.broadcast-progress {
    margin-top: 15px;
}

.progress {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #6c757d;
}

/* الشاشات المتصلة */
.connected-screens {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
}

.connected-screens h5 {
    color: #495057;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.screens-list {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-style: italic;
}

/* قسم معاينة الفيديوهات */
.video-preview-section {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-preview-section .section-header h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.video-preview-section .section-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* حاوي مشغل المعاينة */
.video-preview-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.preview-player-section h4 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* عناصر تحكم المعاينة */
.preview-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.preview-controls select {
    flex: 1;
    min-width: 250px;
    padding: 10px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
}

.preview-controls button {
    padding: 10px 20px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* مشغل المعاينة */
.preview-player-wrapper {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.preview-video {
    width: 100%;
    max-height: 300px;
    background: #000;
    border-radius: 8px;
}

/* معلومات الفيديو */
.preview-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    color: #495057;
}

.video-details {
    display: grid;
    gap: 10px;
}

.video-details > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-details strong {
    min-width: 100px;
    color: #343a40;
}

/* حالات مختلفة للبث */
.broadcast-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.broadcast-status-indicator.active {
    background: #d4edda;
    color: #155724;
}

.broadcast-status-indicator.inactive {
    background: #f8d7da;
    color: #721c24;
}

.broadcast-status-indicator.loading {
    background: #fff3cd;
    color: #856404;
}

/* أنماط متجاوبة */
@media (max-width: 768px) {
    .broadcast-actions {
        flex-direction: column;
    }
    
    .broadcast-actions .btn {
        width: 100%;
        min-width: auto;
    }
    
    .preview-controls {
        flex-direction: column;
    }
    
    .preview-controls select {
        min-width: auto;
        width: 100%;
    }
    
    .playlist-details {
        grid-template-columns: 1fr;
    }
    
    .broadcast-system-section,
    .video-preview-section {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .broadcast-controls-container,
    .video-preview-container {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .broadcast-system-section .section-header h3,
    .video-preview-section .section-header h3 {
        font-size: 1.3rem;
    }
    
    .broadcast-controls-section h4,
    .preview-player-section h4 {
        font-size: 1.2rem;
    }
    
    .broadcast-actions .btn {
        padding: 10px 20px;
        font-size: 1rem;
    }
}

/* تأثيرات الحركة */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.broadcast-controls-container,
.video-preview-container {
    animation: fadeIn 0.5s ease-out;
}

/* تأثيرات التحميل */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    z-index: 10;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e9ecef;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* أنماط الإشعارات */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
    max-width: 400px;
}

.notification.success {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.notification.error {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
}

.notification.warning {
    background: linear-gradient(135deg, #ffc107, #f39c12);
    color: #212529;
}

.notification.info {
    background: linear-gradient(135deg, #17a2b8, #138496);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* أنماط الأيقونات */
.icon-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

