.container {
    max-width: 1600px !important;
}

.video-create-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.form-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.form-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #555;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #c4a882;
    box-shadow: 0 0 0 3px rgba(196, 168, 130, 0.1);
}

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

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
    width: auto;
    min-width: 150px;
    max-width: 250px;
}

.form-select:focus {
    outline: none;
    border-color: #c4a882;
    box-shadow: 0 0 0 3px rgba(196, 168, 130, 0.1);
}

.form-select option {
    padding: 10px;
}

.image-upload-area {
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}

.image-upload-area:hover {
    border-color: #c4a882;
    background: #f8f9ff;
}

.image-upload-area.dragover {
    border-color: #c4a882;
    background: #f0f4ff;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.upload-text {
    color: #666;
    font-size: 0.95rem;
}

.upload-hint {
    color: #999;
    font-size: 0.85rem;
    margin-top: 8px;
}

.image-preview-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.image-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.image-preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
}

.image-preview-item .remove-btn:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
}

.checkbox-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.btn-submit {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #c4a882 0%, #a89070 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 168, 130, 0.4);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-submit .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-submit.loading .spinner {
    display: block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.video-list-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
}

.video-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.video-list-header h2 {
    color: #333;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.refresh-btn {
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.refresh-btn:hover {
    background: #e9ecef;
}

.video-list {
    display: grid;
    gap: 16px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 8px;
}

/* 自定义滚动条样式 */
.video-list::-webkit-scrollbar {
    width: 8px;
}

.video-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.video-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.video-list::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* 分页信息 */
.pagination-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.pagination-status {
    color: #666;
    font-size: 0.9rem;
}

.pagination-actions {
    display: flex;
    gap: 8px;
}

.pagination-btn {
    padding: 6px 14px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.85rem;
    font-weight: 500;
}

.pagination-btn:hover:not(:disabled) {
    background: #e9ecef;
    border-color: #c4a882;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.video-item {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 16px;
    transition: all 0.3s;
}

.video-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #c4a882;
}

.video-thumbnail {
    width: 160px;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
    flex-shrink: 0;
}

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

.video-thumbnail .placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 32px;
}

.video-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.video-prompt {
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    display: flex;
    gap: 16px;
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.video-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.video-status.pending {
    background: #fff3cd;
    color: #856404;
}

.video-status.processing {
    background: #cce5ff;
    color: #004085;
}

.video-status.completed {
    background: #d4edda;
    color: #155724;
}

.video-status.failed {
    background: #f8d7da;
    color: #721c24;
}

.video-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.video-action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.video-action-btn.download {
    background: linear-gradient(135deg, #c4a882 0%, #a89070 100%);
    color: white;
}

.video-action-btn.download:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(196, 168, 130, 0.4);
}

.video-action-btn.delete {
    background: #f8f9fa;
    color: #dc3545;
    border: 1px solid #e0e0e0;
}

.video-action-btn.delete:hover {
    background: #f8d7da;
    border-color: #f5c6cb;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state .icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 1rem;
}

.progress-bar {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #c4a882 0%, #a89070 100%);
    transition: width 0.3s;
}

.script-display {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8f9ff;
    border: 2px solid #c4a882;
    border-radius: 8px;
    margin-bottom: 20px;
}

.script-display-label {
    color: #c4a882;
    font-weight: 600;
    font-size: 0.9rem;
}

.script-display-name {
    color: #333;
    font-weight: 500;
    flex: 1;
}

.script-display-change {
    color: #c4a882;
    cursor: pointer;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.script-display-change:hover {
    color: #a89070;
    text-decoration: underline;
}

@media (max-width: 1024px) {
    .video-create-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .form-section, .video-list-section {
        padding: 20px;
        border-radius: 12px;
    }

    .video-item {
        flex-direction: column;
    }

    .video-thumbnail {
        width: 100%;
        height: 180px;
    }

    .checkbox-group {
        flex-direction: column;
        gap: 12px;
    }
}

/* 融合图片按钮样式 */
.btn-fusion {
    padding: 8px 16px;
    background: linear-gradient(135deg, #c4a882 0%, #a89070 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-fusion:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 168, 130, 0.4);
}

/* 表单区域头部样式 */
.form-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.form-section-header h2 {
    margin: 0;
}

/* 融合图片弹窗样式 */
.fusion-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.fusion-modal.active {
    display: flex;
}

.fusion-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.fusion-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fusion-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #1f2937;
}

.fusion-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    transition: color 0.2s;
}

.fusion-modal-close:hover {
    color: #1f2937;
}

.fusion-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.fusion-layout-options {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.fusion-layout-btn {
    flex: 1;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.fusion-layout-btn:hover {
    border-color: #c4a882;
    background: #f9fafb;
}

.fusion-layout-btn.active {
    border-color: #c4a882;
    background: #eef2ff;
}

.fusion-layout-btn-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.fusion-layout-btn-label {
    font-weight: 500;
    color: #374151;
}

.fusion-images-area {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 32px;
    text-align: center;
    margin-bottom: 24px;
    cursor: pointer;
    transition: all 0.2s;
}

.fusion-images-area:hover {
    border-color: #c4a882;
    background: #f9fafb;
}

.fusion-images-area.dragover {
    border-color: #c4a882;
    background: #eef2ff;
}

.fusion-images-area-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.fusion-images-area-text {
    color: #6b7280;
    font-size: 14px;
}

.fusion-selected-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.fusion-selected-image {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
}

.fusion-selected-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fusion-selected-image-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.fusion-selected-image-remove:hover {
    background: rgba(0, 0, 0, 0.8);
}

.fusion-preview {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.fusion-preview-title {
    font-weight: 500;
    color: #374151;
    margin-bottom: 12px;
}

.fusion-preview-canvas {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    background: #f3f4f6;
    border-radius: 4px;
    display: block;
    margin: 0 auto;
}

.fusion-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.fusion-modal-footer button {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.fusion-btn-cancel {
    background: white;
    border: 1px solid #d1d5db;
    color: #374151;
}

.fusion-btn-cancel:hover {
    background: #f9fafb;
}

.fusion-btn-confirm {
    background: linear-gradient(135deg, #c4a882 0%, #a89070 100%);
    border: none;
    color: white;
}

.fusion-btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 168, 130, 0.4);
}

/* 融合历史记录样式 */
.fusion-history {
    margin-top: 24px;
}

.fusion-history-title {
    font-weight: 500;
    color: #374151;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fusion-history-clear {
    font-size: 12px;
    color: #6b7280;
    background: none;
    border: none;
    cursor: pointer;
}

.fusion-history-clear:hover {
    color: #ef4444;
}

.fusion-history-hint {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 12px;
    text-align: center;
}

.fusion-history-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.fusion-history-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s;
}

.fusion-history-item:hover {
    border-color: #c4a882;
    transform: scale(1.05);
}

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

.fusion-history-item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 8px;
    font-size: 10px;
    text-align: center;
}

.fusion-history-item-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
    z-index: 10;
}

.fusion-history-item:hover .fusion-history-item-delete {
    opacity: 1;
}

.fusion-history-item-delete:hover {
    background: rgba(239, 68, 68, 1);
    transform: scale(1.1);
}

.fusion-history-empty {
    text-align: center;
    padding: 32px;
    color: #9ca3af;
}
