/* ========================================
   声网 Video Widget 样式
======================================== */

.sw_video_wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.sw_video_container {
    width: 100%;
}

/* ========================================
   视频标题样式
======================================== */

.sw_video_title {
    font-size: 24px;
    line-height: 32px;
    font-weight: 600;
    margin: 0 0 24px 0;
    text-align: left;
    color: #1e293b;
}

/* ========================================
   视频播放器容器
======================================== */

.sw_video_player_wrapper {
    position: relative;
    width: 832px;
    height: 468px;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 24px;
    overflow: hidden;
    background: #000;
    flex-shrink: 0;
    aspect-ratio: 16/9;
}

/* ========================================
   视频元素
======================================== */

.sw_video_element {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    background: #000;
}

.sw_video_element.sw-playing {
    display: block !important;
}

/* ========================================
   封面图和覆盖层
======================================== */

.sw_video_poster_overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.sw_video_poster_overlay:hover {
    background: rgba(0, 0, 0, 0.2);
}

.sw_video_poster_overlay.sw-hidden {
    display: none;
}

.sw_video_poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

/* ========================================
   播放按钮样式
======================================== */

.sw_video_play_button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    border: none;
    background: transparent;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.sw_video_play_button:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.sw_video_play_button:active {
    transform: translate(-50%, -50%) scale(0.95);
}

.sw_video_play_button svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(9, 157, 253, 0.3));
}

.sw_video_play_button:hover svg {
    filter: drop-shadow(0 6px 16px rgba(9, 157, 253, 0.4));
}

/* ========================================
   响应式设计
======================================== */

/* 平板设备 (max-width: 1024px) */
@media (max-width: 1024px) {
    .sw_video_player_wrapper {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }
    
    .sw_video_title {
        font-size: 22px;
        line-height: 30px;
        margin-bottom: 20px;
    }
    
    .sw_video_play_button {
        width: 52px;
        height: 52px;
    }
}

/* 移动设备 (max-width: 768px) */
@media (max-width: 768px) {
    .sw_video_player_wrapper {
        border-radius: 16px;
    }
    
    .sw_video_title {
        font-size: 20px;
        line-height: 28px;
        margin-bottom: 16px;
        text-align: center;
    }
    
    .sw_video_play_button {
        width: 48px;
        height: 48px;
    }
    
    /* 移动端显示移动端封面图 */
    .sw_video_poster_pc {
        display: none !important;
    }
    
    .sw_video_poster_mobile {
        display: block !important;
    }
}

/* 小屏移动设备 (max-width: 480px) */
@media (max-width: 480px) {
    .sw_video_player_wrapper {
        border-radius: 12px;
    }
    
    .sw_video_title {
        font-size: 18px;
        line-height: 26px;
        margin-bottom: 12px;
    }
    
    .sw_video_play_button {
        width: 44px;
        height: 44px;
    }
}

/* ========================================
   无障碍和交互状态
======================================== */

.sw_video_play_button:focus {
    outline: 2px solid rgba(9, 157, 253, 0.5);
    outline-offset: 4px;
}

.sw_video_play_button:focus:not(:focus-visible) {
    outline: none;
}

/* 暗黑模式支持 */
@media (prefers-color-scheme: dark) {
    .sw_video_title {
        color: #ffffff;
    }
    
    .sw_video_poster_overlay {
        background: rgba(0, 0, 0, 0.3);
    }
    
    .sw_video_poster_overlay:hover {
        background: rgba(0, 0, 0, 0.4);
    }
}

/* ========================================
   加载状态
======================================== */

.sw_video_wrapper.sw-loading .sw_video_play_button {
    pointer-events: none;
    opacity: 0.6;
}

.sw_video_wrapper.sw-loading .sw_video_play_button svg {
    animation: sw-video-loading 1s linear infinite;
}

@keyframes sw-video-loading {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ========================================
   错误状态
======================================== */

.sw_video_error {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f1f5f9;
    color: #64748b;
    font-size: 14px;
    text-align: center;
    border-radius: inherit;
}

.sw_video_error::before {
    content: "⚠️";
    margin-right: 8px;
    font-size: 16px;
} 