/* ====== 视频播放器核心样式 ====== */
/* /var/www/naoneng/app/static/css/video-player.css */
/* 版本: 2.0.2 | 修复: 进度条hover效果、样式优化 */

/* 主视频流容器 */
#video-feed-container { 
    width: 100%; 
    height: 100%; 
    overflow: hidden; 
    position: relative; 
    touch-action: pan-y;
}

.video-wrapper { 
    position: absolute; 
    width: 100%; 
    height: 100%; 
    transition: transform 0.3s ease-out;
}

.video-item { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    background: #000;
}

/* 视频封面 */
.video-cover {
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: #000;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    z-index: 5;
}

.video-cover img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover;
    opacity: 0.8; 
}

/* 播放提示 */
.video-play-prompt {
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    z-index: 10;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 10px; 
    pointer-events: none;
}

.play-icon {
    width: 60px; 
    height: 60px; 
    background: rgba(255, 255, 255, 0.9); 
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 24px; 
    color: #000;
    cursor: pointer; 
    pointer-events: auto;
    transition: transform 0.2s;
}

.play-icon:hover { 
    transform: scale(1.1); 
}

.play-text { 
    color: #fff; 
    font-size: 14px; 
    background: rgba(0, 0, 0, 0.6); 
    padding: 5px 10px; 
    border-radius: 4px; 
}

/* 视频进度条 - 修复hover效果 */
.video-progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: rgba(0, 0, 0, 0.5);
    z-index: 20;
    opacity: 0;  /* 初始隐藏 */
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.video-wrapper:hover .video-progress-container {
    opacity: 1;  /* hover时显示 */
}

.video-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #007aff;  /* 使用CSS变量: var(--primary-color, #007aff) */
    width: 0%;
    transition: width 0.1s linear;
    border-radius: 0 3px 3px 0;
}

.video-progress-time {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 21;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.video-wrapper:hover .video-progress-time {
    opacity: 1;
}

/* 进度条悬停指示器 */
.video-progress-hover {
    position: absolute;
    top: -6px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 22;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}

.video-progress-container:hover .video-progress-hover {
    opacity: 1;
}

/* 右侧互动面板 - 视频相关部分 */
.right-panel {                                      
    position: fixed;                                
    right: 18px;                                    
    bottom: 128px;                                   
    z-index: var(--z-right-panel); 
    display: flex;                                  
    flex-direction: column;                         
    align-items: center;                            
    gap: 16px;                                      
}

.right-btn {                                        
    display: flex;                                  
    flex-direction: column;                         
    align-items: center;                            
    background: none;                               
    border: none;                                   
    color: #fff;                                    
    cursor: pointer;                                
    padding: 0;                                     
    text-decoration: none;                          
    transition: transform 0.2s ease;
}

.right-btn:hover {                      
    transform: translateY(-2px);                    
}

.right-icon {                                       
    width: 48px;                                    
    height: 48px;                                   
    border-radius: 0;                               
    background: none;                               
    display: flex;                                  
    align-items: center;                            
    justify-content: center;                        
    font-size: 28px;                                
    margin-bottom: 0px;                             
    transition: transform 0.2s;                     
    color: white;                                   
}

.right-icon svg {                                   
    width: 33px;                                    
    height: 33px;                                   
    fill: currentColor;                             
    stroke: none;                                   
    transition: fill 0.2s ease;
}

/* 修复点赞按钮颜色优先级 */
#like-btn.liked .right-icon {                       
    color: #ff3b30;  /* 主颜色 */                                 
}

#like-btn.liked .right-icon svg {                   
    fill: #ff3b30 !important;  /* 确保SVG填充色优先 */                                 
}

.right-btn .label {                                 
    font-size: 12px;                                
    font-weight: 500;                               
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.9);
}

.right-btn .count {                                 
    font-size: 12px;                                
    color: #ccc;                                    
    margin-top: 0px;                                
    font-weight: 500;
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .video-progress-container {
        opacity: 0.7;  /* 移动端默认显示部分 */
    }
    
    .right-btn:active .right-icon {
        transform: scale(0.95);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .right-panel {
        right: 8px;
        bottom: 80px;
        gap: 10px;
    }
    
    .right-icon {
        width: 42px;
        height: 42px;
        font-size: 24px;
    }
    
    .right-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .play-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .right-panel {
        right: 6px;
        bottom: 75px;
        gap: 8px;
    }
    
    .right-icon {
        width: 38px;
        height: 38px;
        font-size: 22px;
    }
    
    .right-icon svg {
        width: 26px;
        height: 26px;
    }
    
    .right-btn .label {
        font-size: 11px;
    }
    
    .right-btn .count {
        font-size: 11px;
    }
}
