/* ==========================================
   诗歌合成视频弹窗样式
   适用于 PC端 和 H5端
   ========================================== */

/* 弹窗遮罩 */
#videoSynthModal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

#videoSynthModal.show {
    display: flex;
}

/* 弹窗主体 */
.video-synth-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.video-synth-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.video-synth-modal .modal-title {
    font-size: 17px;
    font-weight: 600;
    color: #333;
}

.video-synth-modal .modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

.video-synth-modal .modal-body {
    overflow-y: auto;
    padding: 20px;
    flex: 1;
}

/* 诗歌预览 */
.vs-poetry-preview {
    background: linear-gradient(135deg, #f8f4ff, #ede8ff);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 18px;
    text-align: center;
}

.vs-preview-title {
    font-size: 18px;
    font-weight: 600;
    color: #4a3080;
}

.vs-preview-author {
    font-size: 13px;
    color: #8a72b0;
    margin-top: 4px;
}

/* 区块 */
.vs-section {
    margin-bottom: 20px;
}

.vs-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #444;
    margin-bottom: 10px;
}

.vs-tip {
    font-size: 12px;
    color: #aaa;
    font-weight: 400;
}

/* 视频上传区 */
.vs-video-upload {
    border: 2px dashed #d0c8f0;
    border-radius: 12px;
    overflow: hidden;
}

#vsVideoPlaceholder {
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s;
}

#vsVideoPlaceholder:hover {
    background: #faf8ff;
}

.vs-upload-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.vs-upload-text {
    font-size: 15px;
    color: #7060b0;
    font-weight: 500;
}

.vs-upload-sub {
    font-size: 12px;
    color: #aaa;
    margin-top: 4px;
}

#vsVideoInfo {
    padding: 12px;
}

.vs-video-meta {
    font-size: 12px;
    color: #888;
    margin: 6px 0;
    text-align: center;
}

.vs-btn-remove {
    display: block;
    width: 100%;
    padding: 6px;
    background: #fff0f0;
    border: 1px solid #ffcccc;
    border-radius: 6px;
    color: #e44;
    font-size: 13px;
    cursor: pointer;
    margin-top: 6px;
}

/* 音频选择 */
.vs-audio-options {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.vs-radio-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    transition: all 0.2s;
}

.vs-radio-item:has(input:checked) {
    border-color: #7b60d0;
    background: #f4f0ff;
    color: #7b60d0;
}

.vs-radio-item input {
    display: none;
}

/* 音乐列表 */
.vs-music-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ece8f8;
    border-radius: 10px;
}

.vs-music-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid #f5f3ff;
    cursor: pointer;
    transition: background 0.15s;
}

.vs-music-item:last-child {
    border-bottom: none;
}

.vs-music-item:hover {
    background: #faf8ff;
}

.vs-music-item.selected {
    background: #f0ebff;
}

.vs-music-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.vs-music-title {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.vs-music-style {
    font-size: 11px;
    color: #9b7dd4;
    background: #f0ebff;
    padding: 1px 6px;
    border-radius: 10px;
    white-space: nowrap;
}

.vs-music-dur {
    font-size: 12px;
    color: #aaa;
    white-space: nowrap;
}

.vs-btn-listen {
    flex-shrink: 0;
    padding: 4px 10px;
    background: #7b60d0;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.vs-btn-listen:hover {
    background: #5a40b0;
}

/* 按钮 */
.vs-btn-primary {
    display: inline-block;
    padding: 12px 32px;
    background: linear-gradient(135deg, #7b60d0, #9b40d0);
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(123, 96, 208, 0.4);
    transition: all 0.2s;
}

.vs-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(123, 96, 208, 0.5);
}

.vs-btn-secondary {
    display: inline-block;
    padding: 12px 24px;
    background: #f5f3ff;
    color: #7b60d0;
    border: 1px solid #d0c0ff;
    border-radius: 24px;
    font-size: 14px;
    cursor: pointer;
    margin-left: 12px;
}

/* 合成中动画 */
.vs-loading-icon {
    font-size: 48px;
    animation: vsSpin 2s linear infinite;
    display: inline-block;
    margin-bottom: 16px;
}

@keyframes vsSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.vs-loading-text {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.vs-loading-sub {
    font-size: 13px;
    color: #999;
    margin-bottom: 24px;
}

.vs-progress-bar {
    height: 6px;
    background: #ede8ff;
    border-radius: 3px;
    overflow: hidden;
    max-width: 300px;
    margin: 0 auto;
}

.vs-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #7b60d0, #c080ff);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* 结果页 */
.vs-result-title {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #3a9a5c;
    margin-bottom: 16px;
}

.vs-video-container {
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.vs-result-tip {
    text-align: center;
    font-size: 12px;
    color: #f08030;
    margin-top: 12px;
}

/* H5 适配 */
@media (max-width: 540px) {
    .video-synth-modal {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 16px 16px 0 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
    }

    #videoSynthModal {
        align-items: flex-end;
        padding: 0;
    }

    .vs-audio-options {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .vs-radio-item {
        flex-shrink: 0;
    }

    .vs-btn-primary, .vs-btn-secondary {
        width: 100%;
        margin: 6px 0;
        text-align: center;
    }
}

/* 管理后台 - 背景音乐列表 */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table th, .admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.admin-table th {
    background: #f8f8f8;
    font-weight: 600;
    color: #555;
}

.style-tag {
    background: #ede8ff;
    color: #7b60d0;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.btn-mini {
    padding: 3px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    background: #fff;
    margin-right: 4px;
}

.btn-mini.btn-warning {
    border-color: #f0a020;
    color: #f0a020;
}

.btn-mini.btn-success {
    border-color: #3a9a5c;
    color: #3a9a5c;
}

.btn-mini.btn-danger {
    border-color: #e44;
    color: #e44;
}
