/* OBS HLS 直播播放器样式 */

.obs-hls-player-container {
    position: relative;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin: 20px 0;
}

.obs-hls-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.obs-hls-status {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 10;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-indicator.online {
    background: #4CAF50;
    animation: pulse 2s infinite;
}

.status-indicator.offline {
    background: #f44336;
}

.status-indicator.loading {
    background: #ff9800;
    animation: blink 1s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

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

/* 错误提示 */
.obs-hls-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(244, 67, 54, 0.9);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    max-width: 300px;
    z-index: 20;
}

.obs-hls-error h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.obs-hls-error p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

/* 加载动画 */
.obs-hls-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 15;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 重连按钮 */
.obs-hls-reconnect {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #2196F3;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    z-index: 20;
    transition: background 0.3s;
}

.obs-hls-reconnect:hover {
    background: #1976D2;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .obs-hls-player-container {
        margin: 10px 0;
        border-radius: 4px;
    }
    
    .obs-hls-status {
        top: 5px;
        right: 5px;
        padding: 3px 8px;
        font-size: 11px;
    }
    
    .obs-hls-error {
        padding: 15px;
        max-width: 250px;
    }
    
    .obs-hls-error h3 {
        font-size: 14px;
    }
    
    .obs-hls-error p {
        font-size: 12px;
    }
}

/* 管理后台样式 */
.obs-hls-info {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-left: 4px solid #2196F3;
}

.obs-hls-info h2 {
    margin-top: 0;
    color: #333;
}

.obs-hls-info h3 {
    color: #555;
    margin-top: 25px;
}

.obs-hls-info ol {
    padding-left: 20px;
}

.obs-hls-info li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.obs-hls-info pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.4;
}

.obs-hls-info code {
    background: #f1f1f1;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.obs-hls-info pre code {
    background: transparent;
    padding: 0;
}

/* 全屏模式 */
.obs-hls-player-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    border-radius: 0;
}

.fullscreen-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    z-index: 25;
    transition: background 0.3s;
}

.fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}
