/**
 * VIP视频解析器样式
 * Version: 2.0.0 - 简约现代风格（与豆瓣海报一致）
 */

/* ========== 容器 ========== */
.vip-video-player-container {
    background: #fff;
}

.vip-video-player-container *,
.vip-video-player-container *::before,
.vip-video-player-container *::after {
    box-sizing: border-box;
}

/* ========== 输入区域 ========== */
.vip-video-player-container .vip-video-input-container {
    display: flex;
    padding: 16px 20px;
    gap: 12px;
    background: #f8f8f8;
    align-items: center;
    margin: 0;
}

.vip-video-player-container .vip-video-api-select {
    padding: 10px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 20px;
    background: #fff;
    font-size: 14px;
    min-width: 100px;
    flex-shrink: 0;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 36px;
}

.vip-video-player-container .vip-video-api-select:hover {
    border-color: #333;
}

.vip-video-player-container .vip-video-api-select:focus {
    outline: none;
    border-color: #333;
}

.vip-video-player-container .vip-video-url-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 20px;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: all 0.2s ease;
}

.vip-video-player-container .vip-video-url-input::placeholder {
    color: #999;
}

.vip-video-player-container .vip-video-url-input:hover {
    border-color: #ccc;
}

.vip-video-player-container .vip-video-url-input:focus {
    outline: none;
    border-color: #333;
}

.vip-video-player-container .vip-video-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.vip-video-player-container .vip-video-play-btn:hover {
    background: #555;
}

.vip-video-player-container .vip-video-play-btn:active {
    transform: scale(0.97);
}

.vip-video-player-container .vip-video-play-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.vip-video-player-container .vip-video-play-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ========== 播放器区域 ========== */
.vip-video-player-container .vip-video-player-wrapper {
    position: relative;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    width: 100%;
    overflow: hidden;
    margin: 0;
}

.vip-video-player-container .vip-video-player-wrapper[data-height="auto"] {
    height: auto;
    aspect-ratio: 16/9;
    width: 100%;
}

.vip-video-player-container .vip-video-player-wrapper:not([data-height="auto"]) {
    height: 400px;
}

.vip-video-player-container .vip-video-placeholder {
    text-align: center;
    color: #666;
    padding: 40px 20px;
}

.vip-video-player-container .vip-video-placeholder-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    opacity: 0.5;
}

.vip-video-player-container .vip-video-placeholder-icon svg {
    width: 100%;
    height: 100%;
}

.vip-video-player-container .vip-video-placeholder p {
    margin: 0;
    font-size: 14px;
    color: #999;
    line-height: 1.4;
}

.vip-video-player-container .vip-video-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ========== 消息提示 ========== */
.vip-video-player-container .vip-video-error {
    padding: 12px 20px;
    background: #fef2f2;
    color: #dc2626;
    margin: 0;
    font-size: 14px;
    text-align: center;
}

.vip-video-player-container .vip-video-success {
    padding: 12px 20px;
    background: #f0fdf4;
    color: #16a34a;
    margin: 0;
    font-size: 14px;
    text-align: center;
}

/* ========== 描述区域 ========== */
.vip-video-player-container .vip-video-description {
    padding: 12px 20px;
    background: #fafafa;
    font-size: 13px;
    color: #999;
    text-align: center;
    margin: 0;
}

.vip-video-player-container .vip-video-description p {
    margin: 0;
    line-height: 1.4;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .vip-video-player-container .vip-video-input-container {
        flex-direction: column;
        gap: 10px;
        padding: 16px;
    }
    
    .vip-video-player-container .vip-video-api-select {
        min-width: auto;
        width: 100%;
        padding: 12px 16px;
        padding-right: 36px;
        font-size: 16px;
    }
    
    .vip-video-player-container .vip-video-url-input {
        width: 100%;
        padding: 12px 16px;
        font-size: 16px;
    }
    
    .vip-video-player-container .vip-video-play-btn {
        width: 100%;
        padding: 12px 24px;
        font-size: 16px;
        justify-content: center;
    }
    
    .vip-video-player-container .vip-video-player-wrapper {
        min-height: 200px;
    }
    
    .vip-video-player-container .vip-video-player-wrapper[data-height="auto"] {
        min-height: 200px;
    }
    
    .vip-video-player-container .vip-video-iframe {
        min-height: 200px;
    }
    
    .vip-video-player-container .vip-video-placeholder {
        padding: 30px 16px;
    }
    
    .vip-video-player-container .vip-video-placeholder-icon {
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 480px) {
    .vip-video-player-container .vip-video-input-container {
        padding: 12px;
        gap: 8px;
    }
    
    .vip-video-player-container .vip-video-player-wrapper {
        min-height: 180px;
    }
    
    .vip-video-player-container .vip-video-player-wrapper[data-height="auto"] {
        min-height: 180px;
    }
    
    .vip-video-player-container .vip-video-iframe {
        min-height: 180px;
    }
    
    .vip-video-player-container .vip-video-placeholder {
        padding: 24px 12px;
    }
    
    .vip-video-player-container .vip-video-description {
        padding: 10px 12px;
        font-size: 12px;
    }
}

/* ========== WordPress 对齐 ========== */
.wp-block-image .vip-video-player-container,
.aligncenter .vip-video-player-container {
    margin: 20px auto;
}

.alignleft .vip-video-player-container {
    float: left;
    margin: 0 20px 20px 0;
}

.alignright .vip-video-player-container {
    float: right;
    margin: 0 0 20px 20px;
}

.alignwide .vip-video-player-container,
.alignfull .vip-video-player-container {
    width: 100%;
}
