.duanju-admin {
    padding: 20px;
}

.duanju-upload-section {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.form-field {
    margin-bottom: 15px;
}

.form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.progress-bar {
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-bar .progress {
    height: 100%;
    background: #2271b1;
    width: 0;
    transition: width 0.3s ease;
}

.frame-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.frame-gallery img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}



        
.duanju-sidebar {
            width: 250px;
            flex-shrink: 0;
        }
        
        .duanju-main {
            flex-grow: 1;
        }
        
        .manga-item,.manga-item-error, .chapter-item {
            padding: 10px;
            margin: 5px 0;
            background: #f5f5f5;
            cursor: pointer;
            border-radius: 4px;
        }
        
        .e-chapter-item {
            padding: 10px;
            margin: 5px 0;
            background: #f5f5f5;
            cursor: pointer;
            border-radius: 4px;
        }
        
        .manga-item:hover, .chapter-item:hover ,.manga-item-error:hover, .e-chapter-item:hover {
            background: #e5e5e5;
        }
        
        .manga-item.active, .manga-item-error.active,.chapter-item.active .e-chapter-item.active {
            background: #2271b1;
            color: white;
        }
        
        .task-list-container {
            background: white;
            padding: 15px;
            border-radius: 4px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }
         .task-list-container h2{
             margin: 0px;
             
         }
        .task-controls {
            margin-bottom: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .pagination-controls {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        #task-result {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 20px;
        }
        
        .task-image-item {
            position: relative;
            border: 1px solid #ddd;
            padding: 10px;
            border-radius: 4px;
        }
        
        .task-image-item img {
            width: 100%;
            height: auto;
            display: block;
        }
        
        .task-image-actions {
            margin-top: 10px;
            display: flex;
            justify-content: center;
            gap: 10px;
        }
        
        
        
    .duanju-container {
        display: flex;
        gap: 20px;
        margin-top: 20px;
    }
    
    .duanju-sidebar {
        width: 300px;
        flex-shrink: 0;
    }
    
    .manga-list-container{
        background: white;
        padding: 15px;
        width: 150px;
        border-radius: 4px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        margin-bottom: 20px;
    }
    .chapter-list-container {
        background: white;
       
        width: 150px;
        padding: 15px;
        border-radius: 4px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        margin-bottom: 20px;
    }
    
    .manga-list-container h2{
        margin-top: 0;
        margin-bottom: 15px;
        font-size: 16px;
        color: #23282d;
    }
    .chapter-list-container h2 {
        margin-top: 0;
        margin-bottom: 15px;
        font-size: 16px;
        color: #23282d;
    }
    
    #manga-list,
    #chapter-list {
        max-height: 1000px;
        overflow-y: auto;
    }
    
    .manga-item,.manga-item-error,
    .chapter-item,.e-chapter-item {
        padding: 10px;
        margin: 5px 0;
        background: #f5f5f5;
        cursor: pointer;
        border-radius: 4px;
        transition: all 0.2s ease;
    }
    
    .manga-item:hover,
    .chapter-item:hover,.e-chapter-item:hover {
        background: #e5e5e5;
    }
    
    .manga-item.active,
    .chapter-item.active , .e-chapter-item.active {
        background: #2271b1;
        color: white;
    }
    
    .no-chapters,
    .no-manga {
        padding: 10px;
        text-align: center;
        color: #666;
        font-style: italic;
    }
    
    /* 滚动条样式 */
    #manga-list::-webkit-scrollbar,
    #chapter-list::-webkit-scrollbar {
        width: 6px;
    }
    
    #manga-list::-webkit-scrollbar-track,
    #chapter-list::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
    }
    
    #manga-list::-webkit-scrollbar-thumb,
    #chapter-list::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 3px;
    }
    
    .duanju-frames-container {
            display: flex;
            gap: 20px;
            margin-top: 20px;
        }

        .manga-list-column,
        .chapter-list-column,
        .frames-list-column {
            flex: 1;
            min-width: 250px;
            background: #fff;
            padding: 15px;
            border-radius: 5px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }

        .list-container {
            max-height: 600px;
            overflow-y: auto;
            border: 1px solid #ddd;
        }

        .list-item {
            padding: 10px;
            border-bottom: 1px solid #eee;
            cursor: pointer;
        }

        .list-item:hover {
            background: #f5f5f5;
        }

        .list-item.active {
            background: #0073aa;
            color: #fff;
        }

        .frames-container {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 10px;
            max-height: 600px;
            overflow-y: auto;
            padding: 10px;
        }

        .frame-item {
            position: relative;
            overflow: hidden;
            border: 2px solid #ddd;
            border-radius: 4px;
        }

        .frame-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .frame-item.selected {
            border-color: #0073aa;
        }

        .frames-controls {
            margin-bottom: 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .frames-pagination {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .frame-item {
    position: relative;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    padding: 5px;
}

.frame-item img {
    max-width: 100%;
    height: auto;
}

.frame-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    display: none;
    background: rgba(255, 255, 255, 0.9);
    padding: 5px;
    border-radius: 3px;
}

.frame-item:hover .frame-actions {
    display: block;
}

.delete-frame {
    background: #dc3545;
    color: white;
    border: none;
    
    padding: 3px 8px;
    border-radius: 3px;
    cursor: pointer;
}

.delete-frame:hover {
    background: #c82333;
}


.xuan-frame {
    background: #2271b1;
    color: white;
    border: none;
    float: right;
    padding: 3px 8px;
    border-radius: 3px;
    cursor: pointer;
}

.xuan-frame:hover {
    background: #2271b1;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
}

.modal-content {
    background-color: #fefefe;
    margin: 3% auto;
    padding: 10px;
    border: 1px solid #888;
    width: 98%;
    height: 92%;
    max-width: 1800px;
    border-radius: 5px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 10px;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    transition: all 0.2s ease;
}

.close:hover {
    color: black;
}

.image-container {
    display: flex;
    gap: 20px;
    height: 90%;
    overflow-y: scroll;
    margin: 20px 0;
}

.original-image {
    flex: 1;
}

.generated-images {
    flex: 4;
}

.text-images {
    flex: 2;
}
.text-grid {
    display: grid;
    gap: 10px;
}


.generated-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.generated-item {
    position: relative;
    border: 1px solid #ddd;
    padding: 5px;
    text-align: center;
}

.generated-item img {
    max-width: 100%;
    height: 320px;
}

.modal-actions {
    text-align: right;
    margin-top: 20px;
}

.modal-actions button {
    margin-left: 10px;
}

.modal-actions button #aiImages {
    margin-left: 10px;
    background-color: #007cba;
    color: white;
}

.preview-image {
    max-width: 100%;
    height: auto;
    cursor: pointer;
}

.frame-actions {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.edit-frame, .delete-frame,.xuan-frame,.times-frame {
    padding: 5px 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.edit-frame {
    background-color: #007cba;
    color: white;
}

.times-frame {
    background-color: #000;
    color: white;
}

.xuan-frame {
    background-color: #dc3545;
    color: white;
}

.delete-frame {
    background-color: #2271b1;
    color: white;
}
#originalImage{
    height: 350px;
}

.text-images {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
   
}

.text-images h3 {
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e5e5;
    color: #23282d;
    font-size: 1.3em;
}

.frame-info {
    background-color: #f8f9fa;
    margin-bottom: 10px;
    border-radius: 4px;
    border-left: 4px solid #0073aa;
}

.frame-info .label {
    font-weight: bold;
    color: #444;
    margin-right: 8px;
    margin-left: 15px;
}

.frame-info .label:first-child {
    margin-left: 0;
}

.frame-info .value {
    color: #666;
}

.frame-text {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
}

.frame-text h4 {
    margin: 0 0 10px 0;
    color: #23282d;
    font-size: 1.1em;
}

.text-grid {
    background: #fff;
    padding: 15px;
    border: 1px solid #e2e4e7;
    border-radius: 4px;
    margin: 0;
    white-space: pre-wrap;
    font-family: monospace;
    line-height: 1.5;
    max-height: 200px;
    overflow-y: auto;
}
.generated-grid.loading {
    position: relative;
    opacity: 0.7;
}

.generated-grid.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

#aiImages:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.seed-modal {
        display: none;
        position: fixed;
        z-index: 1000;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,0.5);
    }
    
    .seed-modal-content {
        background-color: #fff;
        margin: 5% auto;
        padding: 20px;
        width: 80%;
        max-width: 800px;
        border-radius: 5px;
    }
    
    .seed-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 20px;
        padding: 20px 0;
    }
    
    .seed-item {
        cursor: pointer;
        text-align: center;
        padding: 10px;
        border: 2px solid transparent;
        border-radius: 5px;
        transition: all 0.3s;
    }
    
    .seed-item:hover {
        border-color: #ddd;
    }
    
    .seed-item.selected {
        border-color: #2271b1;
        background-color: #f0f6fc;
    }
    
    .seed-item img {
        max-width: 100%;
        height: auto;
        margin-bottom: 10px;
    }
    
    .seed-modal-footer {
        text-align: right;
        padding-top: 20px;
        border-top: 1px solid #ddd;
    }
    
    .seed-modal-footer button {
        margin-left: 10px;
    }
    
    
/* ... 保留现有样式 ... */

/* 图片列表布局 */
/* ... 保留现有样式 ... */

/* 图片行布局 */
.image-row {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.scene-image {
    width: 20%;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.generated-images {
    width: 95%;
    min-height: 200px;
    display: flex;
    gap: 15px;
    position: relative;
}

.generated-images:empty {
    background: #f5f5f5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.generated-images:empty::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.generated-images:empty::after {
    content: '生成AI图片';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #2271b1;
    color: white;
    padding: 15px 30px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.generated-images:empty:hover::after {
    background: #135e96;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.generated-image {
    width: 25%;
    position: relative;
    border-radius: 6px;
    overflow: hidden;
}

.preview-image {
    width: 100%;
    height: auto;
    display: block;
}

.image-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    padding: 8px;
    color: white;
    font-size: 12px;
    text-align: center;
}

.select-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s;
    background: #2271b1;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.generated-image:hover .select-image {
    opacity: 1;
}
/* ... 保留现有样式 ... */

.generate-ai-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #a00;
    color: white;
    padding: 15px 30px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.generate-ai-button:hover {
    background: #135e96;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
/* 人设管理相关样式 */
.character-form {
    background: #fff;
    padding: 20px;
    margin-top: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.character-form .form-group {
    margin-bottom: 15px;
}

.character-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.character-form input[type="text"],
.character-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.character-form textarea {
    min-height: 100px;
}

#selected-image {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.select-ren-frame {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
}

.select-ren-frame:hover {
    background: #135e96;
}
/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
}

.modal-content {
    position: relative;
    background-color: #fefefe;
    margin: 2% auto;
    padding: 20px;
    width: 90%;
    max-width: 1200px;
    border-radius: 8px;
    max-height: 90vh;
    overflow-y: auto;
}

.close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.frame-preview {
    text-align: center;
    margin-bottom: 20px;
}

.frame-preview img {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
}

.frame-info {
   
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.frame-text {
    margin-bottom: 15px;
}

.frame-text:last-child {
    margin-bottom: 0;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.modal-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: #2271b1;
    color: #fff;
    font-size: 14px;
}

.modal-actions button:hover {
    background: #135e96;
}

#aiImages {
    background: #28a745;
}

#saveSelection {
    background: #dc3545;
}

/* 适配移动端 */
@media screen and (max-width: 768px) {
    .modal-content {
        margin: 5% auto;
        width: 95%;
        padding: 15px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions button {
        width: 100%;
        margin-bottom: 10px;
    }
}

.frame-text {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.frame-text h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
}

.prompt-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.prompt-tag {
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #495057;
    cursor: pointer;
    transition: background-color 0.2s;
}

.prompt-tag:hover {
    background: #dee2e6;
}

.character-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.character-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.loading {
    text-align: center;
    color: #666;
    padding: 10px;
}

.error {
    color: #dc3545;
    padding: 10px;
    background: #f8d7da;
    border-radius: 4px;
}
.analysis-result {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.result-item {
    margin-bottom: 20px;
}

.result-item:last-child {
    margin-bottom: 0;
}

.result-item h4 {
    color: #333;
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
}

.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feature-tag {
    background: #e9ecef;
    color: #495057;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.prompt-content {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
}

.prompt-content pre {
    margin: 0 0 10px 0;
    white-space: pre-wrap;
    font-size: 12px;
    color: #666;
}

.use-prompt-btn {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.use-prompt-btn:hover {
    background: #0056b3;
}

.reference-image {
    margin-top: 10px;
}

.reference-image img {
    max-width: 100%;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.error {
    color: #dc3545;
    padding: 10px;
    background: #f8d7da;
    border-radius: 4px;
    margin-top: 15px;
}

.loading {
    text-align: center;
    color: #666;
    padding: 20px;
}
/* Modal 基础样式 */
.modal-content {
    display: flex;
    flex-direction: column;
    max-width: 1500px;
    width: 90%;
    max-height: 90vh;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    position: relative;
}

.modal-body {
    display: flex;
    gap: 20px;
    flex: 1;
    min-height: 0;
    overflow: auto;
}

/* 左侧预览图区域 */
.frame-preview {
    flex: 0 0 50%;
    max-width: 25%;
    position: relative;
}

.frame-preview img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 右侧信息区域 */
.frame-info {
    flex: 0 0 70%;
    max-width: 70%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    overflow-y: auto;
}

/* 底部按钮区域 */
.modal-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: center; /* 修改为居中对齐 */
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
    width: 100%; /* 确保宽度占满 */
}

.modal-actions button {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    background: #007bff;
    color: #fff;
    font-size: 14px;
    min-width: 120px; /* 设置最小宽度使按钮大小一致 */
}

.modal-actions button:hover {
    background: #0056b3;
}

/* 关闭按钮 */
.close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.close:hover {
    color: #333;
}

/* Tab 样式 */
.nav-tab-wrapper {
    margin-bottom: 20px;
}

/* 人设网格布局 */
.ren-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(800px, 1fr));
    gap: 20px;
    padding: 20px;
}

.ren-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    margin-top:5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ren-image {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
}

.ren-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ren-info {
    padding: 5px;
}

.ren-info h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
}

.ren-duanju {
    color: #666;
    margin: 0 0 8px 0;
    font-size: 14px;
}

.ren-prompt {
    color: #888;
    margin: 0 0 15px 0;
    font-size: 12px;
    line-height: 1.4;
}

.ren-actions {
    display: flex;
    gap: 10px;
}

.ren-actions button {
    flex: 1;
}

.no-ren-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

/* 分页样式 */
.tablenav-pages {
    margin-top: 20px;
    text-align: center;
}

/* 人设列表样式 */
.ren-grid {
    width: 96%;
    padding: 10px;
}

.ren-row {
    display: flex;
    margin-bottom: 30px;
    gap: 20px;
    align-items: stretch;
}

.ren-frame,
.ren-mj-image {
    flex: 1;
    position: relative;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.ren-frame img{
    width: 100%;
    object-fit: cover;
    display: block;
}
.ren-mj-image img {
    width: 100%;
    object-fit: cover;
    display: block;
}

.frame-info,
.image-info {
    padding: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
}


.mj-actions {
    position: absolute;
    top: 10px;
    right: 10px;
}

.set-ren {
    background: #2271b1 !important;
    color: white !important;
    border: none !important;
}


.re-ren {
    background: #dc2626 !important;
    color: white !important;
    border: none !important;
}

.re-frame {
    background: #ffba00 !important;
    color: white !important;
    border: none !important;
}

.no-image {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    color: #666;
}

.tablenav {
    margin: 20px 0;
}

/* 人设预览容器样式 */
.ren-preview-container {
    width: 200px;
    padding: 15px;
    background: #fff;
    border-right: 3px solid #2271b1;
    margin-right: 5px;
}

#ren-preview-list {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

#ren-preview-list img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#ren-preview-list img.selected {
    border: 3px solid #ff4444;
    box-shadow: 0 4px 8px rgba(255,68,68,0.2);
}

.ren-preview-item {
    margin-bottom: 20px;
    position: relative;
}

.ren-preview-info {
    padding: 8px;
    background: rgba(255,255,255,0.9);
    font-size: 12px;
    text-align: center;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* 调整主容器布局 */
.duanju-container {
    display: flex;
    gap: 20px;
}


/* 弹窗样式 */
.duanju-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}


.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

/* 人设选择列表样式 */
.ren-radio-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.ren-radio-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.ren-radio-item:hover {
    background-color: #f5f5f5;
}

.ren-radio-item img {
    width: 100%;
    height: auto;
    margin-bottom: 10px;
}

.ren-radio-item input[type="radio"] {
    margin-right: 5px;
}

/* 预设角色下拉框样式 */
.preset-ren-select {
    margin: 20px 0;
}

#preset-ren {
    width: 100%;
    max-width: 300px;
    padding: 8px;
    margin-top: 10px;
}

.modal-actions {
    margin-top: 20px;
    text-align: right;
}

.modal-actions button {
    margin-left: 10px;
}
/* 图片预览弹窗样式 */
.image-preview-content {
    max-width: 90%;
    max-height: 90vh;
    margin: auto;
    padding: 20px;
    position: relative;
    background: transparent;
    box-shadow: none;
}

.image-preview-content .close {
    position: absolute;
    right: 10px;
    top: 10px;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1000;
    text-shadow: 0 0 3px rgba(0,0,0,0.5);
}

#fullSizeImage {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    margin: auto;
    display: block;
}

.ren-mj-image img {
    cursor: zoom-in;
}

/* 垂直人设列表样式 */
.vertical-ren-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.vertical-ren-list .ren-item {
    width: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.vertical-ren-list .ren-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
}

.vertical-ren-list .ren-info {
    padding: 10px 0;
}

.vertical-ren-list .ren-info h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #333;
}

.vertical-ren-list .ren-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.vertical-ren-list .ren-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.vertical-ren-list .ren-actions button {
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.vertical-ren-list .ren-actions .select-ren {
    background: #2271b1;
    color: white;
    border: none;
}

.vertical-ren-list .ren-actions .select-ren:hover {
    background: #135e96;
}

/* 适配移动端 */
@media screen and (max-width: 768px) {
    .vertical-ren-list {
        padding: 10px;
    }
    
    .vertical-ren-list .ren-item {
        padding: 10px;
    }
}

/* 人设图片容器样式 */
.ren-image-container {
    position: relative;
    width: 100%;
    margin-bottom: 10px;
}

.ren-image-container img {
    width: 100%;
    height: auto;
    display: block;
}

/* 信息层样式 */
.ren-info {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px;
}

.ren-info h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: white;
}

.ren-info p {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}
.nav-tab-wrapper {
    margin-bottom: 20px;
    border-bottom: 1px solid #ccc;
}

.nav-tab {
    padding: 10px 20px;
    font-size: 14px;
    line-height: 1.71428571;
    font-weight: 600;
    margin-left: 0.5em;
    margin-right: 0.5em;
}

.nav-tab-active {
    border-bottom: 2px solid #2271b1;
    color: #2271b1;
}

/* 下载内容包装器样式 */
.download-content-wrapper {
    display: grid;
    gap: 10px;
    margin-top: 20px;
    min-height: 1000px;
}

/* 最终图片容器样式 */
.final-images-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#final-images-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
}

/* 帧项目样式 */
.frame-item {
    position: relative;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 15px;
}

.frame-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* 帧操作区域样式 */
.frame-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    line-height: 20px;
    background: rgba(255, 255, 255, 0.9);
    text-align: center;
    padding: 0;
    transition: all 0.3s ease;
}

/* 下载按钮样式 */
.button.download-frame {
    height: 20px;
    line-height: 18px;
    padding: 0 10px;
    font-size: 12px;
}

/* 对话时间线容器样式 */
.dialogue-timeline-container {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.timeline {
    position: relative;
    max-height: 920px;
    overflow-y: auto;
    padding: 20px;
    margin-bottom: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e0e0e0;
}

.timeline-item {
    position: relative;
    padding-left: 45px;
    margin-bottom: 20px;
}

.timeline-dot {
    position: absolute;
    left: 16px;
    top: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2271b1;
}

.timeline-content {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 10px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid #f8f9fa;
}

.timeline-time {
    color: #666;
    font-size: 12px;
    margin-bottom: 5px;
}

.timeline-speaker {
    font-weight: bold;
    color: #2271b1;
    margin-bottom: 5px;
}

.timeline-text {
    color: #333;
    line-height: 1.5;
}

/* 按钮样式 */
.button-primary {
    width: 100%;
    text-align: center;
    margin-top: 10px;
}





/* 滚动条美化 */
.timeline::-webkit-scrollbar,
#final-images-list::-webkit-scrollbar {
    width: 6px;
}

.timeline::-webkit-scrollbar-thumb,
#final-images-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.timeline::-webkit-scrollbar-track,
#final-images-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}





 .region-modal { 
        width: 90%; 
        height: auto; 
        max-width: 1200px;
        margin: 5vh auto;
    }
    .edit-container { 
        display: flex; 
        flex-direction: row;
        height: calc(100% - 180px); /* 减去人设预览区域的高度 */
    }
    .edit-area { 
        flex: 3; 
        position: relative; 
        overflow: hidden;
        background: #f0f0f0;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 20px;
    }
    .image-wrapper { 
        position: relative; 
        overflow: visible;
        box-shadow: 0 0 10px rgba(0,0,0,0.2);
    }
    .mask-overlay { 
        position: absolute; 
        background: rgba(0,0,0,0.5);
        border: 2px solid #fff;
        cursor: move;
        z-index: 10;
    }
    .resize-handle {
        position: absolute;
        width: 12px;
        height: 12px;
        background: #fff;
        bottom: -6px;
        right: -6px;
        cursor: nwse-resize;
        border-radius: 2px;
        z-index: 11;
        box-shadow: 0 0 3px rgba(0,0,0,0.5);
    }
    .control-area { 
        flex: 1; 
        padding: 20px;
        background: #f5f5f5;
        display: flex;
        flex-direction: column;
        border-left: 1px solid #ddd;
        min-width: 250px;
    }
    .original-prompt { margin-bottom: 20px; }
    .prompt-tags span {
        display: inline-block;
        background: #e0e0e0;
        padding: 4px 8px;
        margin: 2px;
        border-radius: 3px;
    }
    .prompt-input { 
        flex: 1; 
        margin-bottom: 20px; 
        display: flex;
        flex-direction: column;
    }
    .prompt-input textarea { 
        width: 100%; 
        height: 100%;
        min-height: 150px;
        padding: 10px;
        resize: none;
        border: 1px solid #ddd;
        border-radius: 4px;
    }
    .action-buttons { 
        text-align: right; 
        margin-top: 10px;
    }
    .action-buttons button {
        margin-left: 10px;
    }
    /* 人设预览区域样式 */
    .ren-preview-container {
        padding: 15px;
        background: #f5f5f5;
        border-bottom: 1px solid #ddd;
        max-height: 800px;
    }
    .ren-preview-container h2 {
        margin-top: 0;
        margin-bottom: 10px;
        font-size: 16px;
    }
    .ren-filter {
        margin-bottom: 10px;
    }
    .ren-filter-select {
        width: 100%;
        padding: 5px;
        border: 1px solid #ddd;
        border-radius: 4px;
    }
    #region-ren-preview-list {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        max-height: 800px;
        overflow-y: auto;
        padding: 5px;
    }
    #region-ren-preview-list .ren-item {
        width: 80px;
        position: relative;
    }
    #region-ren-preview-list img {
        width: 100%;
        height: auto;
        border: 2px solid transparent;
        cursor: pointer;
        border-radius: 4px;
    }
    #region-ren-preview-list img.selected {
        border-color: #0073aa;
    }
    .no-ren-message {
        color: #888;
        font-style: italic;
        padding: 10px 0;
    }
    /* 修复弹窗样式 */
    .modal {
        display: none;
        position: fixed;
        z-index: 1000;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        overflow: auto;
        background-color: rgba(0,0,0,0.7);
    }
    .modal-content {
        background-color: #fefefe;
        margin: 5% auto;
        padding: 20px;
        border: 1px solid #888;
        border-radius: 5px;
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        position: relative;
    }
    .close {
        color: #aaa;
        float: right;
        font-size: 28px;
        font-weight: bold;
        cursor: pointer;
        position: absolute;
        right: 15px;
        top: 10px;
    }
    .close:hover,
    .close:focus {
        color: black;
        text-decoration: none;
    }
    
    
     .character-customization-form {
        background: #fff;
        padding: 20px;
        border-radius: 5px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
    
    .form-section {
        margin-bottom: 25px;
    }
    
    .form-field {
        margin-bottom: 15px;
    }
    
    .character-preview-image img {
        max-width: 200px;
        max-height: 200px;
        border: 1px solid #ddd;
        border-radius: 4px;
        padding: 5px;
    }
    
    .generated-images-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
        margin-top: 15px;
    }
    
    .generated-image-item {
        border: 1px solid #ddd;
        border-radius: 4px;
        padding: 10px;
        text-align: center;
    }
    
    .generated-image-item img {
        max-width: 100%;
        height: auto;
        margin-bottom: 10px;
    }
       
    #loading-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.7);
        z-index: 9999;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    .loading-spinner {
        border: 5px solid #f3f3f3;
        border-top: 5px solid #3498db;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        animation: spin 2s linear infinite;
    }
    
    .loading-text {
        color: white;
        margin-top: 15px;
        font-size: 16px;
    }
    
    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
    
    /* 视频上传模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 25px;
    border: 1px solid #ddd;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 场景/镜头分组选择弹框内容样式 */
#scene-group-modal .modal-content,
#shot-group-modal .modal-content {
    max-width: 500px;
    padding: 30px;
    background-color: #fff;
    border: none;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

/* 场景/镜头分组标签样式 */
.scene-grouping {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* 场景/镜头分组选择按钮样式 */
.select-scene-group,
.select-shot-group {
    padding: 5px 10px !important;
    font-size: 12px !important;
    height: auto !important;
    line-height: 1.5 !important;
    margin-right: 5px !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
}

.select-scene-group {
    background-color: #e1f5fe !important;
    color: #0277bd !important;
    border: 1px solid #b3e5fc !important;
}

.select-scene-group:hover {
    background-color: #b3e5fc !important;
    color: #01579b !important;
}

.select-shot-group {
    background-color: #f1f8e9 !important;
    color: #558b2f !important;
    border: 1px solid #dcedc8 !important;
}

.select-shot-group:hover {
    background-color: #dcedc8 !important;
    color: #33691e !important;
}

.scene-group-label,
.shot-group-label {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    margin: 0 3px;
    font-weight: 500;
}

.scene-group-label {
    background-color: #e1f5fe;
    color: #0277bd;
    border: 1px solid #b3e5fc;
}

.shot-group-label {
    background-color: #f1f8e9;
    color: #558b2f;
    border: 1px solid #dcedc8;
}

/* 场景/镜头分组选择弹框样式 */
#scene-group-modal,
#shot-group-modal {
    z-index: 10000;
}

#scene-group-modal h2,
#shot-group-modal h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 18px;
    text-align: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.group-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
    max-height: 300px;
    overflow-y: auto;
    padding: 5px;
}

.group-option {
    background-color: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #333;
}

.group-option:hover {
    background-color: #e9e9e9;
    border-color: #ccc;
}

.group-option.selected {
    background-color: #2271b1;
    border-color: #135e96;
    color: #fff;
}

.group-option.existing {
    background-color: #e8f5e9;
    border-color: #a5d6a7;
    color: #2e7d32;
}

.group-option.existing.selected {
    background-color: #2e7d32;
    border-color: #1b5e20;
    color: #fff;
}

.existing-groups-title {
    grid-column: 1 / -1;
    margin-bottom: 10px;
    font-weight: bold;
    color: #2e7d32;
    border-bottom: 1px solid #a5d6a7;
    padding-bottom: 5px;
}

.loading-groups {
    grid-column: 1 / -1;
    text-align: center;
    padding: 15px;
    color: #757575;
    font-style: italic;
}

.group-option.existing {
    color: #0c5460;
    font-weight: bold;
}

.custom-group {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
    margin-top: 10px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 6px;
    border: 1px solid #eee;
}

.custom-group input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.custom-group .add-custom-group {
    background-color: #2271b1;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.custom-group .add-custom-group:hover {
    background-color: #135e96;
}

.modal-footer {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.modal-footer button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.modal-footer .confirm-group {
    background-color: #2271b1;
    color: white;
}

.modal-footer .confirm-group:hover {
    background-color: #135e96;
}

.modal-footer .cancel-group {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.modal-footer .cancel-group:hover {
    background-color: #e9e9e9;
}

.modal h2 {
    margin-top: 0;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* 预览容器样式 */
.preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.image-preview,
.video-preview {
    flex: 1;
    min-width: 300px;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.image-preview h3,
.video-preview h3 {
    margin-top: 0;
    font-size: 16px;
    color: #444;
}

.image-preview img {
    max-width: 100%;
    max-height: 300px;
    display: block;
    margin: 0 auto;
}

#video-preview-container {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #eee;
    border-radius: 4px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-actions {
    margin-top: 20px;
    text-align: right;
}

.form-actions button {
    margin-left: 10px;
}

/* 进度条样式 */
#upload-progress {
    margin-top: 20px;
}

.progress-bar {
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background-color: #4CAF50;
    width: 0;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-size: 14px;
    color: #666;
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .preview-container {
        flex-direction: column;
    }
    
    .image-preview,
    .video-preview {
        min-width: 100%;
    }
}


/* 下载按钮样式 */
.download-video {
    display: inline-block;
    background-color: #0073aa;
    color: white;
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.download-video:hover {
    background-color: #005177;
    text-decoration: none;
    color: white;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .video-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .download-video {
        margin-top: 5px;
        width: 100%;
        text-align: center;
    }
}


/* 基础样式 */
.duanju-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.manga-list-container, .chapter-list-container {
    flex: 0 0 150px;
}

.duanju-main {
    flex: 1;
    min-width: 600px;
}

.manga-item, .chapter-item {
    padding: 8px 12px;
    margin-bottom: 5px;
    background-color: #f0f0f0;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.manga-item:hover, .chapter-item:hover {
    background-color: #e0e0e0;
}

.manga-item.active, .chapter-item.active {
    background-color: #2271b1;
    color: white;
}

/* 场景标签页样式 */
.scene-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 15px;
}

.scene-tab {
    padding: 8px 15px;
    background-color: #f0f0f0;
    border-radius: 4px 4px 0 0;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.scene-tab:hover {
    background-color: #e0e0e0;
}

.scene-tab.active {
    background-color: #fff;
    border-bottom: 2px solid #2271b1;
}

/* 场景内容区域样式 */
.scene-content {
    display: none;
}

.scene-content.active {
    display: block;
}

/* 素材和镜头网格布局 */
.scene-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* 镜头列表样式 - 水平滚动 */
.shot-list {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 10px 0;
    scrollbar-width: thin;
    scroll-behavior: smooth;
}

.shot-list::-webkit-scrollbar {
    height: 8px;
}

.shot-list::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
}

.shot-item {
    flex: 0 0 auto;
    width: 150px;
    height: 180px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    background-color: #f9f9f9;
    overflow: hidden;
}

.shot-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 8px;
}

.shot-info {
    font-size: 12px;
    color: #555;
}

/* 素材项样式 */
.material-item {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
    background-color: #fff;
}

.material-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: bold;
}

.material-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.material-data {
    margin: 10px 0;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.data-item {
    margin-bottom: 5px;
    font-size: 14px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 50%;
    max-width: 600px;
    border-radius: 5px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

.group-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.group-option {
    padding: 8px 15px;
    background-color: #f0f0f0;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.group-option:hover {
    background-color: #e0e0e0;
}

.group-option.selected {
    background-color: #2271b1;
    color: white;
}

.custom-group {
    display: flex;
    gap: 5px;
    margin-top: 10px;
    width: 100%;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}


/* 基础样式 */
.duanju-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.manga-list-container, .chapter-list-container {
    flex: 0 0 150px;
}

.duanju-main {
    flex: 1;
    min-width: 600px;
}

.manga-item, .chapter-item ,.chapter-key{
    padding: 8px 12px;
    margin-bottom: 5px;
    background-color: #f0f0f0;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.sucai-item{
    padding: 8px 12px;
    margin-bottom: 5px;
    background-color: #999;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.sucai-item img{
    width: 200px;
}

.manga-item:hover, .chapter-item:hover  ,.sucai-item:hover,.chapter-key:hover{
    background-color: #e0e0e0;
}

.manga-item.active, .chapter-item.active ,.sucai-item.active,.chapter-key.active{
    background-color: #2271b1;
    color: white;
}

/* 场景标签页样式 */
.scene-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 15px;
}

.scene-tab {
    padding: 8px 15px;
    background-color: #f0f0f0;
    border-radius: 4px 4px 0 0;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.scene-tab:hover {
    background-color: #e0e0e0;
}

.scene-tab.active {
    background-color: #fff;
    border-bottom: 2px solid #2271b1;
}

/* 场景内容区域样式 */
.scene-content {
    display: none;
}

.scene-content.active {
    display: block;
}

/* 素材和镜头网格布局 */
.scene-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* 镜头列表样式 - 水平滚动 */
.shot-list {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 10px 0;
    scrollbar-width: thin;
    scroll-behavior: smooth;
}

.shot-list::-webkit-scrollbar {
    height: 8px;
}

.shot-list::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
}

.shot-item {
    flex: 0 0 auto;
    width: 150px;
    height: 180px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    background-color: #f9f9f9;
    overflow: hidden;
}

.shot-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 8px;
}

.shot-info {
    font-size: 12px;
    color: #555;
}

/* 素材项样式 */
.material-item {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
    background-color: #fff;
}

.material-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: bold;
}

.material-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.material-data {
    margin: 10px 0;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.data-item {
    margin-bottom: 5px;
    font-size: 14px;
}

/* 表格样式 */
.material-table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.material-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.material-table th,
.material-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.material-table th {
    background-color: #f5f5f5;
    font-weight: bold;
    color: #333;
}

.material-table tr:hover {
    background-color: #f9f9f9;
}

.material-table .table-image {
    width: 150px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 50%;
    max-width: 600px;
    border-radius: 5px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

.group-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.group-option {
    padding: 8px 15px;
    background-color: #f0f0f0;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.group-option:hover {
    background-color: #e0e0e0;
}

.group-option.selected {
    background-color: #2271b1;
    color: white;
}

.custom-group {
    display: flex;
    gap: 5px;
    margin-top: 10px;
    width: 100%;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* 现有的 CSS 内容保持不变 */
.download-video:hover {
    background-color: #005177;
    text-decoration: none;
    color: white;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .video-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .download-video {
        margin-top: 5px;
        width: 100%;
        text-align: center;
    }
}

/* 图片选择复选框样式 */
.image-select-checkbox {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
}

.image-select-checkbox input[type="checkbox"] {
    display: none;
}

.image-select-checkbox label {
    display: block;
    width: 22px;
    height: 22px;
    background-color: rgba(255, 255, 255, 0.8);
    border: 2px solid #2271b1;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
}

.image-select-checkbox input[type="checkbox"]:checked + label::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #2271b1;
    font-size: 16px;
    font-weight: bold;
}

.image-select-checkbox label:hover {
    background-color: rgba(255, 255, 255, 1);
}



/* 调整素材项样式 */
.sucai-item {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sucai-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.sucai-item.selected {
    border: 2px solid #4CAF50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

/* jQuery UI 调整大小手柄样式 */
.ui-resizable-handle {
    background-color: #fff;
    border: 1px solid #4CAF50;
    width: 8px;
    height: 8px;
}

.ui-resizable-se {
    right: -5px;
    bottom: -5px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    #sucai-edit-modal .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .editor-controls button {
        padding: 6px 12px;
        font-size: 12px;
    }
}




.canvas-container {
        position: relative;
        display: inline-block;
        border: 2px solid #ddd;
        margin: 10px 0;
    }
    #image-canvas {
        cursor: crosshair;
    }
    .coordinates-display {
        background: #f9f9f9;
        border: 1px solid #ddd;
        padding: 15px;
        margin: 10px 0;
        border-radius: 5px;
    }
    .coordinates-display h4 {
        margin-top: 0;
        color: #333;
    }
    .coordinate-section {
        margin: 10px 0;
        padding: 10px;
        background: white;
        border-left: 3px solid #0073aa;
    }
    .coordinate-section h5 {
        margin: 0 0 8px 0;
        color: #0073aa;
    }
    .coordinate-list {
        font-family: monospace;
        background: #f5f5f5;
        padding: 8px;
        border-radius: 3px;
        margin: 5px 0;
    }
    .usage-note {
        background: #e7f3ff;
        border-left: 3px solid #0073aa;
        padding: 10px;
        margin: 10px 0;
        font-size: 14px;
    }
    .selection-status {
        background: #fff3cd;
        border: 1px solid #ffeaa7;
        padding: 10px;
        margin: 10px 0;
        border-radius: 5px;
        font-weight: bold;
    }
    .selection-status.completed {
        background: #d4edda;
        border-color: #c3e6cb;
        color: #155724;
    }
    .button-group {
        margin: 10px 0;
    }
    .button-group button {
        margin-right: 10px;
        padding: 8px 16px;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 14px;
    }
    .btn-primary {
        background-color: #0073aa;
        color: white;
    }
    .btn-primary:hover {
        background-color: #005a87;
    }
    .btn-secondary {
        background-color: #6c757d;
        color: white;
    }
    .btn-secondary:hover {
        background-color: #545b62;
    }
    .btn-success {
        background-color: #28a745;
        color: white;
    }
    .btn-success:hover {
        background-color: #218838;
    }
    .btn-success.saved {
        background-color: #155724;
        cursor: default;
    }
    .btn-danger {
        background-color: #dc3545;
        color: white;
    }
    .btn-danger:hover {
        background-color: #c82333;
    }
    button:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }
    
    /* 弹出层样式 */
    .sucai-modal {
        display: none;
        position: fixed;
        z-index: 1000;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,0.5);
    }
    
    .sucai-modal-content {
        background-color: #fefefe;
        margin: 5% auto;
        padding: 20px;
        border: 1px solid #888;
        width: 80%;
        max-width: 800px;
        border-radius: 10px;
        position: relative;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .sucai-modal-close {
        color: #aaa;
        float: right;
        font-size: 28px;
        font-weight: bold;
        cursor: pointer;
        position: absolute;
        right: 15px;
        top: 10px;
    }
    
    .sucai-modal-close:hover,
    .sucai-modal-close:focus {
        color: black;
        text-decoration: none;
    }
    
    .selected-images-panel {
        background: #f0f8ff;
        border: 2px solid #0073aa;
        padding: 15px;
        margin: 10px 0;
        border-radius: 5px;
    }
    
    .selected-images-list {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 10px;
    }
    
    .selected-image-item {
        position: relative;
        border: 2px solid #0073aa;
        border-radius: 5px;
        overflow: hidden;
    }
    
    .selected-image-item img {
        width: 80px;
        height: 80px;
        object-fit: cover;
    }
    
    .remove-selected {
        position: absolute;
        top: -5px;
        right: -5px;
        background: #dc3545;
        color: white;
        border: none;
        border-radius: 50%;
        width: 20px;
        height: 20px;
        font-size: 12px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    