 /* =======================================================
   BOOGAN 文生图/文生视频模块 - 完整样式（整理去重版）
   ======================================================= */

 /* -------------------- 1. 全局容器与通用设置 -------------------- */
 #wentu-container {
     width: 100%;
     background: transparent;
     padding: 0;
     margin: 0;
     box-sizing: border-box;
     flex: 1;
     height: 100%;
     display: flex;
     flex-direction: column;
     min-width: 0;
 }

 .wentu-content {
     flex: 1;
     display: flex;
     flex-direction: column;
     height: 100%;
 }

 .panel-content {
     flex: 1;
     min-height: 0;
     display: flex;
     flex-direction: column;
     overflow: hidden;
 }

 .prompt-content {
     flex: 1;
     overflow-y: auto;
     padding: 0 !important;
     margin: 0 !important;
     display: flex;
     flex-direction: column;
 }

 /* -------------------- 2. 选项卡样式 -------------------- */
 #wentu-container .tabs-container {
     margin-bottom: 20px;
     flex-shrink: 0;
 }

 #wentu-container .tabs {
     display: flex;
     gap: 4px;
     border-bottom: 1px solid #e2e8f0;
     padding-bottom: 0;
 }

 #wentu-container .tab {
     padding: 8px 20px;
     font-size: 14px;
     font-weight: 500;
     color: #4b5563;
     background: transparent;
     border: none;
     border-radius: 30px;
     cursor: pointer;
     transition: all 0.2s;
     display: inline-flex;
     align-items: center;
     gap: 8px;
 }

 #wentu-container .tab i {
     font-size: 14px;
 }

 #wentu-container .tab:hover {
     background: #f1f5f9;
     color: #1f2937;
 }

 #wentu-container .tab.active {
     background: #ffffff;
     color: #0f172a;
     box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
     border: 1px solid #e2e8f0;
     border-bottom-color: white;
     margin-bottom: -1px;
 }

 /* -------------------- 3. 卡片与输入控件 -------------------- */
 #wentu-container .generator-card {
     background: #ffffff;
     border-radius: 16px;
     border: 1px solid #e9edf2;
     box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
     margin-bottom: 24px;
     overflow: hidden;
     flex-shrink: 0;
 }

 #wentu-container .card-header {
     background: #fafbfc;
     border-bottom: 1px solid #edf2f7;
     padding: 14px 20px;
     display: flex;
     justify-content: space-between;
     align-items: center;
     flex-wrap: wrap;
     gap: 10px;
 }

 #wentu-container .card-header h2 {
     font-size: 1.1rem;
     font-weight: 600;
     margin: 0;
     color: #1e293b;
     display: flex;
     align-items: center;
     gap: 8px;
 }

 #wentu-container .card-header .counter {
     background: #f1f5f9;
     padding: 4px 12px;
     border-radius: 30px;
     font-size: 0.75rem;
     font-weight: 500;
     color: #334155;
     border: 1px solid #e2e8f0;
 }

 #wentu-container .card-body {
     padding: 20px;
 }

 #wentu-container .input-group {
     margin-bottom: 20px;
 }

 #wentu-container .input-group label {
     display: block;
     margin-bottom: 6px;
     font-size: 0.85rem;
     font-weight: 500;
     color: #334155;
 }

 #wentu-container .input-group textarea {
     width: 100%;
     min-height: 100px;
     padding: 10px 14px;
     border: 1px solid #cbd5e1;
     border-radius: 12px;
     font-family: inherit;
     font-size: 0.85rem;
     resize: vertical;
     background: #fff;
     transition: 0.2s;
     color: #0f172a;
 }

 #wentu-container .btn-group {
     display: flex;
     gap: 10px;
     flex-wrap: wrap;
 }

 #wentu-container .btn {
     padding: 6px 18px;
     border-radius: 30px;
     font-size: 0.8rem;
     font-weight: 500;
     cursor: pointer;
     transition: all 0.2s;
     display: inline-flex;
     align-items: center;
     gap: 6px;
     border: 1px solid transparent;
 }

 #wentu-container .btn-primary {
     background: #1e293b;
     color: white;
     border-color: #1e293b;
 }

 #wentu-container .btn-primary:hover {
     background: #0f172a;
     transform: translateY(-1px);
 }

 #wentu-container .btn-secondary {
     background: #ffffff;
     color: #334155;
     border: 1px solid #cbd5e1;
 }

 #wentu-container .btn-secondary:hover {
     background: #f8fafc;
     border-color: #94a3b8;
 }

 #wentu-container .btn-danger {
     background: #fef2f2;
     color: #b91c1c;
     border: 1px solid #fecaca;
 }

 /* -------------------- 4. 图片/视频生成结果（统一卡片 500px） -------------------- */
 #wentu-container .results-container {
     margin-top: 16px;
     flex: 1;
     overflow-y: auto;
 }

 #wentu-container .results-title {
     font-size: 1rem;
     font-weight: 600;
     color: #0f172a;
     margin-bottom: 14px;
     padding-left: 4px;
 }

 #wentu-container .results-grid {
     display: grid;
     grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
     gap: 16px;
 }

 /* 卡片固定总高 500px，三区域分离 */
 #image-results .result-card,
 #video-results .result-card {
     display: flex;
     flex-direction: column;
     height: 500px;
     background: #ffffff;
     border-radius: 16px;
     border: 1px solid #edf2f7;
     overflow: hidden;
     transition: transform 0.2s, box-shadow 0.2s;
 }

 #image-results .result-card:hover,
 #video-results .result-card:hover {
     transform: translateY(-2px);
     box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.1);
 }

 /* 媒体区域 220px，铺满 */
 #image-results .result-image,
 #video-results .result-image {
     height: 220px;
     flex-shrink: 0;
     background: #f8fafc;
     display: flex;
     align-items: center;
     justify-content: center;
     overflow: hidden;
 }

 #image-results .result-image img,
 #video-results .result-image img,
 #video-results .result-image video {
     width: 100%;
     height: 100%;
     object-fit: cover;
 }

 /* 描述区域 220px，独立滚动 */
 #image-results .result-content,
 #video-results .result-content {
     height: 220px;
     flex-shrink: 0;
     overflow-y: auto;
     padding: 12px;
     font-size: 0.8rem;
     line-height: 1.45;
     color: #334155;
     background: #ffffff;
     scrollbar-width: thin;
     word-break: break-word;
     box-sizing: border-box;
 }

 /* 滚动条美化 */
 #image-results .result-content::-webkit-scrollbar,
 #video-results .result-content::-webkit-scrollbar {
     width: 5px;
 }

 #image-results .result-content::-webkit-scrollbar-track {
     background: #f1f5f9;
     border-radius: 4px;
 }

 #image-results .result-content::-webkit-scrollbar-thumb {
     background: #cbd5e1;
     border-radius: 4px;
 }

 /* 按钮区域 60px，固定底部 */
 #image-results .result-actions,
 #video-results .result-actions {
     height: 60px;
     flex-shrink: 0;
     display: flex;
     align-items: center;
     justify-content: flex-end;
     padding: 0 16px;
     border-top: 1px solid #f0f2f5;
     background: #fafcff;
 }

 .result-actions .btn-danger {
     background: #fef2f2;
     color: #991b1b;
     border: 1px solid #fee2e2;
     border-radius: 30px;
     padding: 6px 20px;
     font-size: 0.75rem;
     font-weight: 500;
     cursor: pointer;
     transition: 0.1s;
 }

 .result-actions .btn-danger:hover {
     background: #fee2e2;
     color: #7f1d1d;
 }

 /* 清除卡片子元素可能的外边距 */
 #image-results .result-card>*,
 #video-results .result-card>* {
     margin: 0;
 }

 #wentu-container .empty-state {
     text-align: center;
     padding: 32px 16px;
     color: #64748b;
     background: #ffffff;
     border-radius: 16px;
     border: 1px solid #edf2f7;
     grid-column: 1 / -1;
 }

 /* -------------------- 5. 视频表格样式（保留） -------------------- */
 #video-results {
     overflow-x: auto;
     overflow-y: visible;
     margin-top: 16px;
     width: 100%;
 }

 .video-table {
     min-width: 800px;
     width: 100%;
     border: 1px solid #eef2f6;
     border-radius: 16px;
     background: #fff;
     overflow: hidden;
 }

 .video-table-header {
     display: grid;
     grid-template-columns: 1.8fr 0.8fr 0.8fr 1.2fr;
     background: #f8fafc;
     border-bottom: 1px solid #e2e8f0;
     padding: 12px 16px;
     font-weight: 600;
     font-size: 0.85rem;
     color: #1e293b;
 }

 .video-table-row {
     display: grid;
     grid-template-columns: 1.8fr 0.8fr 0.8fr 1.2fr;
     border-bottom: 1px solid #edf2f7;
     padding: 12px 16px;
     transition: background 0.1s;
     background: #ffffff;
     align-items: start;
 }

 .video-table-row:hover {
     background: #fafcff;
 }

 .video-table-header>div,
 .video-table-row>div {
     padding: 0 8px;
     word-break: break-word;
 }

 .video-prompt-cell {
     font-size: 0.85rem;
     line-height: 1.4;
     color: #334155;
 }

 .video-frame-img {
     max-width: 100px;
     max-height: 100px;
     border-radius: 8px;
     cursor: pointer;
     border: 1px solid #e2e8f0;
     object-fit: cover;
     aspect-ratio: 1 / 1;
     background: #f9f9fb;
 }

 .video-frame-empty {
     width: 100px;
     height: 100px;
     background: #f8fafc;
     border-radius: 8px;
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 0.7rem;
     color: #94a3b8;
     border: 1px dashed #cbd5e1;
 }

 .video-player-cell video {
     max-width: 180px;
     max-height: 120px;
     border-radius: 8px;
     background: #000;
     cursor: pointer;
 }

 .video-actions {
     margin-top: 10px;
     display: flex;
     gap: 8px;
     flex-wrap: wrap;
 }

 .video-actions button {
     padding: 4px 10px;
     font-size: 0.7rem;
     border-radius: 20px;
     background: #f1f5f9;
     border: 1px solid #e2e8f0;
     color: #334155;
     cursor: pointer;
 }

 .video-actions button:hover {
     background: #e2e8f0;
 }

 .video-actions .delete-video-btn {
     background: #fef2f2;
     border-color: #fecaca;
     color: #b91c1c;
 }

 @media (max-width: 768px) {
     .video-table {
         min-width: 700px;
     }
 }

 /* 调整表格为三列（若使用） */
 .video-table-header {
     grid-template-columns: 1.8fr 1.4fr 1.2fr;
 }

 .video-table-row {
     grid-template-columns: 1.8fr 1.4fr 1.2fr;
 }

 /* -------------------- 6. 多图选择区卡片 -------------------- */
 .multi-image-card {
     position: relative;
     width: 100px;
     height: 100px;
     border-radius: 8px;
     overflow: hidden;
     border: 1px solid #e2e8f0;
     cursor: grab;
     user-select: none;
     background: #fff;
 }

 .multi-image-card:active {
     cursor: grabbing;
 }

 .multi-image-card img {
     width: 100%;
     height: 100%;
     object-fit: cover;
 }

 .multi-image-card .remove-btn {
     position: absolute;
     top: 4px;
     right: 4px;
     width: 20px;
     height: 20px;
     border-radius: 50%;
     background: rgba(0, 0, 0, 0.5);
     color: #fff;
     border: none;
     font-size: 14px;
     line-height: 1;
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: center;
     z-index: 2;
 }

 .multi-image-card .drag-handle {
     position: absolute;
     bottom: 4px;
     left: 50%;
     transform: translateX(-50%);
     background: rgba(0, 0, 0, 0.4);
     color: #fff;
     font-size: 12px;
     padding: 2px 6px;
     border-radius: 10px;
     pointer-events: none;
 }

 .multi-image-card.sortable-ghost {
     opacity: 0.4;
     border: 2px dashed #3b82f6;
 }

 .video-images-grid {
     display: flex;
     flex-wrap: wrap;
     gap: 6px;
 }

 .video-thumb-img {
     width: 80px;
     height: 80px;
     object-fit: cover;
     border-radius: 6px;
     border: 1px solid #e2e8f0;
     cursor: pointer;
     background: #f9f9fb;
 }

 /* -------------------- 7. 加载动画 -------------------- */
 .loading-spinner {
     border: 3px solid #f3f3f3;
     border-top: 3px solid #3498db;
     border-radius: 50%;
     width: 24px;
     height: 24px;
     animation: spin 1s linear infinite;
     display: inline-block;
 }

 @keyframes spin {
     0% {
         transform: rotate(0deg);
     }

     100% {
         transform: rotate(360deg);
     }
 }

 /* -------------------- 8. 多模态AI助手样式 -------------------- */
 .multimodal-container {
     display: flex;
     flex-direction: column;
     height: 100%;
     background: #ffffff;
 }

 .multimodal-chat-display {
     flex: 1;
     overflow-y: auto;
     padding: 20px 16px;
     background: #fafcff;
     scroll-behavior: smooth;
 }

 .multimodal-chat-display .message-item {
     display: flex;
     flex-direction: column;
     max-width: 85%;
     margin-bottom: 16px;
     animation: fadeInUp 0.2s ease;
 }

 .multimodal-chat-display .message-item.user {
     align-self: flex-end;
 }

 .multimodal-chat-display .message-item.assistant {
     align-self: flex-start;
 }

 .multimodal-chat-display .message-bubble {
     padding: 10px 16px;
     border-radius: 20px;
     line-height: 1.5;
     word-break: break-word;
     white-space: pre-wrap;
     font-size: 14px;
 }

 .multimodal-chat-display .message-item.user .message-bubble {
     background: #3b82f6;
     color: white;
     border-bottom-right-radius: 6px;
 }

 .multimodal-chat-display .message-item.assistant .message-bubble {
     background: #ffffff;
     border: 1px solid #e2e8f0;
     color: #1e293b;
     border-bottom-left-radius: 6px;
 }

 .multimodal-chat-display .msg-time {
     font-size: 10px;
     color: #94a3b8;
     margin-top: 5px;
     margin-left: 12px;
 }

 .multimodal-upload-bar {
     display: flex;
     gap: 12px;
     align-items: center;
     padding: 8px 16px;
     background: #f8fafc;
     border-top: 1px solid #eef2f6;
     border-bottom: 1px solid #eef2f6;
 }

 .upload-btn-multi {
     background: #ffffff;
     border: 1px solid #cbd5e1;
     border-radius: 30px;
     padding: 6px 18px;
     font-size: 13px;
     font-weight: 500;
     cursor: pointer;
     transition: all 0.2s;
     color: #000000 !important;
 }

 .upload-btn-multi:hover {
     background: #dbd9d9;
     border-color: #3b82f6;
 }

 .upload-tip {
     font-size: 12px;
     color: #94a3b8;
     margin-left: auto;
 }

 .media-preview-list {
     padding: 8px 16px;
     background: #fefefe;
     min-height: 50px;
     border-bottom: 1px solid #eef2f6;
 }

 .media-preview-item {
     display: inline-flex;
     align-items: center;
     gap: 8px;
     background: #ffffff;
     border: 1px solid #e2e8f0;
     border-radius: 40px;
     padding: 4px 12px 4px 8px;
     box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
 }

 .media-preview-item img,
 .media-preview-item video {
     width: 32px;
     height: 32px;
     object-fit: cover;
     border-radius: 6px;
 }

 .remove-media {
     cursor: pointer;
     color: #94a3b8;
     margin-left: 6px;
 }

 .remove-media:hover {
     color: #ef4444;
 }

 .file-input-hidden {
     display: none;
 }

 #div7-multimodal-editor {
     width: 100% !important;
     height: 100%;
     overflow: hidden;
     background: #ffffff;
 }

 .multimodal-container {
     display: flex;
     flex-direction: column;
     width: 100%;
     height: 100%;
     overflow: hidden;
 }

 .multimodal-chat-display {
     flex: 1;
     width: 100%;
     overflow-y: auto;
     padding: 16px;
     box-sizing: border-box;
 }

 .multimodal-upload-bar {
     display: flex;
     flex-wrap: wrap;
     align-items: center;
     gap: 12px;
     width: 100%;
     padding: 8px 16px;
     box-sizing: border-box;
     background: #f8fafc;
     border-top: 1px solid #eef2f6;
     border-bottom: 1px solid #eef2f6;
 }

 .media-preview-list {
     width: 100%;
     padding: 8px 16px;
     box-sizing: border-box;
     min-height: 54px;
     background: #fefefe;
 }

 .ai-input-area {
     display: flex;
     gap: 12px;
     align-items: flex-end;
     width: 100%;
     padding: 12px 16px;
     box-sizing: border-box;
     background: #ffffff;
     border-top: 1px solid #eef2f6;
 }

 .ai-input-area textarea {
     flex: 1;
     width: auto;
     min-width: 0;
 }

 .message-item {
     max-width: 85%;
     width: auto;
 }

 @media (max-width: 768px) {
     .multimodal-upload-bar {
         flex-wrap: wrap;
         justify-content: flex-start;
     }

     .upload-tip {
         font-size: 10px;
         margin-left: 0;
         width: 100%;
         order: 3;
     }

     .message-item {
         max-width: 90%;
     }

     .ai-input-area textarea {
         font-size: 14px;
     }
 }

 /* -------------------- 9. 模态框统一风格（关闭按钮固定头部，内容滚动） -------------------- */
 .modal-overlay-custom,
 #image-library-modal {
     position: fixed;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     background: rgba(0, 0, 0, 0.65);
     backdrop-filter: blur(4px);
     z-index: 10030;
     display: flex;
     align-items: center;
     justify-content: center;
 }

 .modal-container-custom {
     background: #ffffff;
     border-radius: 28px;
     width: 90%;
     max-width: 1000px;
     max-height: 85vh;
     display: flex;
     flex-direction: column;
     box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.3);
     overflow: hidden;
     animation: modalFadeIn 0.2s ease;
 }

 @keyframes modalFadeIn {
     from {
         opacity: 0;
         transform: scale(0.96);
     }

     to {
         opacity: 1;
         transform: scale(1);
     }
 }

 .modal-header-custom {
     padding: 18px 24px;
     border-bottom: 1px solid #eef2f6;
     background: #ffffff;
     display: flex;
     justify-content: space-between;
     align-items: center;
     flex-shrink: 0;
 }

 .modal-header-custom h3 {
     margin: 0;
     font-size: 1.25rem;
     font-weight: 600;
     color: #0f172a;
     letter-spacing: -0.01em;
 }

 .modal-close-btn-custom {
     background: #f1f5f9;
     border: none;
     width: 36px;
     height: 36px;
     border-radius: 50%;
     font-size: 24px;
     cursor: pointer;
     color: #334155;
     display: inline-flex;
     align-items: center;
     justify-content: center;
     transition: all 0.2s;
 }

 .modal-close-btn-custom:hover {
     background: #e2e8f0;
     color: #0f172a;
     transform: scale(1.02);
 }

 .modal-body-custom {
     flex: 1;
     overflow-y: auto;
     padding: 24px;
     background: #fafcff;
 }

 .modal-grid-custom {
     display: grid;
     grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
     gap: 20px;
 }

 .modal-grid-custom .library-card {
     background: #ffffff;
     border-radius: 16px;
     border: 1px solid #eef2f6;
     overflow: hidden;
     transition: all 0.2s;
     box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
 }

 .modal-grid-custom .library-card:hover {
     transform: translateY(-3px);
     box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.12);
     border-color: #e2e8f0;
 }

 .modal-grid-custom .library-media {
     width: 100%;
     aspect-ratio: 1 / 1;
     object-fit: cover;
     background: #f8fafc;
     cursor: pointer;
 }

 .modal-grid-custom .library-info {
     padding: 12px;
     border-top: 1px solid #f0f2f5;
 }

 .modal-grid-custom .library-source {
     font-size: 0.7rem;
     color: #64748b;
     margin-bottom: 10px;
     display: flex;
     align-items: center;
     gap: 6px;
 }

 .modal-grid-custom .library-actions {
     display: flex;
     gap: 8px;
 }

 /* 模态框按钮强制居中 + 圆角8px（最终生效版） */
 .modal-grid-custom .library-actions button,
 #image-library-grid .vid-select-img,
 #image-library-grid .vid-delete-img,
 .library-actions button {
     display: inline-flex !important;
     align-items: center !important;
     justify-content: center !important;
     text-align: center !important;
     gap: 6px;
     padding: 6px 12px !important;
     border-radius: 8px !important;
     font-size: 0.75rem;
     font-weight: 500;
     border: none;
     cursor: pointer;
     transition: 0.15s;
     line-height: 1.2;
     background: #f1f5f9;
     color: #1e293b;
 }

 .modal-grid-custom .library-actions button.btn-select,
 #image-library-grid .vid-select-img {
     background: #eef2ff !important;
     color: #1e40af !important;
 }

 .modal-grid-custom .library-actions button.btn-delete,
 #image-library-grid .vid-delete-img {
     background: #fef2f2 !important;
     color: #991b1b !important;
 }

 .modal-grid-custom .library-actions button.btn-select:hover,
 #image-library-grid .vid-select-img:hover {
     background: #e0e7ff !important;
 }

 .modal-grid-custom .library-actions button.btn-delete:hover,
 #image-library-grid .vid-delete-img:hover {
     background: #fee2e2 !important;
 }

 /* 兼容旧模态框结构 */
 #image-library-modal>div {
     background: transparent !important;
     box-shadow: none !important;
     max-height: none !important;
     width: auto !important;
 }

 #image-library-modal .modal-container-custom {
     width: 90%;
     max-width: 900px;
 }

 /* 视频库封面铺满 */
 #dmt-vid-grid .library-media {
     width: 100%;
     aspect-ratio: 1 / 1;
     object-fit: cover;
     background: #000;
 }


 /* ========== 模态框按钮统一中性风格（无蓝色/红色） ========== */
 .modal-grid-custom .library-actions button,
 #image-library-grid .vid-select-img,
 #image-library-grid .vid-delete-img,
 .library-actions button {
     background: #f1f5f9 !important;
     color: #1e293b !important;
     border: 1px solid #e2e8f0 !important;
     border-radius: 8px !important;
     padding: 6px 12px !important;
     font-size: 0.75rem;
     font-weight: 500;
     cursor: pointer;
     transition: all 0.2s;
     display: inline-flex !important;
     align-items: center !important;
     justify-content: center !important;
     gap: 6px;
 }

 .modal-grid-custom .library-actions button:hover,
 #image-library-grid .vid-select-img:hover,
 #image-library-grid .vid-delete-img:hover,
 .library-actions button:hover {
     background: #e2e8f0 !important;
     color: #0f172a !important;
     border-color: #cbd5e1 !important;
 }

 /* 移除所有特殊颜色类（覆盖之前的蓝色/红色） */
 .modal-grid-custom .library-actions button.btn-select,
 #image-library-grid .vid-select-img,
 .modal-grid-custom .library-actions button.btn-delete,
 #image-library-grid .vid-delete-img {
     background: #f1f5f9 !important;
     color: #1e293b !important;
 }

 .modal-grid-custom .library-actions button.btn-select:hover,
 #image-library-grid .vid-select-img:hover,
 .modal-grid-custom .library-actions button.btn-delete:hover,
 #image-library-grid .vid-delete-img:hover {
     background: #e2e8f0 !important;
     color: #0f172a !important;
 }

 /* 确保全屏预览在最上层，不被图库/视频库遮挡 */
 #media-modal {
     z-index: 10050 !important;
     background: rgba(0, 0, 0, 0.9);
 }

 /* ========== 视频卡片图片区：最多3图，横向排列 ========== */
 #video-results .result-images {
     height: 100px;
     flex-shrink: 0;
     background: #f8fafc;
     display: flex;
     align-items: center;
     justify-content: center;
     gap: 2px;
     /* 图片之间留微小间隙 */
     overflow: hidden;
     border-top: 1px solid #eef2f6;
     border-bottom: 1px solid #eef2f6;
 }

 /* 单个图片容器：撑满等宽 */
 #video-results .result-images .image-item {
     flex: 1;
     height: 100%;
     display: flex;
     align-items: center;
     justify-content: center;
     overflow: hidden;
     background: #f1f5f9;
 }

 #video-results .result-images .image-item img {
     width: 100%;
     height: 100%;
     object-fit: cover;
     cursor: pointer;
     transition: transform 0.2s;
 }

 #video-results .result-images .image-item img:hover {
     transform: scale(1.02);
 }

 /* 无图片时的占位提示 */
 #video-results .result-images .no-images-placeholder {
     width: 100%;
     text-align: center;
     color: #94a3b8;
     font-size: 0.75rem;
     padding: 0 8px;
 }

 /* ========== 视频卡片内视频区域样式（未放大时） ========== */
 #video-results .result-video {
     height: 200px;
     flex-shrink: 0;
     background: #000;
     display: flex;
     align-items: center;
     justify-content: center;
     overflow: hidden;
 }

 #video-results .result-video video {
     width: 100%;
     height: 100%;
     object-fit: contain;
     /* 保证完整显示，不裁剪，不变形 */
     cursor: pointer;
     background: #000;
 }

 /* ========== 模态框（点击放大后）视频自适应宽高 ========== */
 #media-modal {
     position: fixed;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     background: rgba(0, 0, 0, 0.9);
     z-index: 10060;
     display: none;
     align-items: center;
     justify-content: center;
 }

 #media-modal video {
     max-width: 90vw;
     max-height: 90vh;
     width: auto;
     height: auto;
     object-fit: contain;
     border-radius: 8px;
     box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
 }

 #media-modal img {
     max-width: 90vw;
     max-height: 90vh;
     width: auto;
     height: auto;
     object-fit: contain;
     border-radius: 8px;
 }

 /* 关闭按钮样式（可选） */
 #media-modal .close-modal {
     position: absolute;
     top: 20px;
     right: 30px;
     font-size: 40px;
     color: white;
     cursor: pointer;
     z-index: 10070;
 }






 /* 卡片编辑表格样式（融合整体） */
 .card-edit-table {
     background-color: #fff;
     border-radius: 12px;
     overflow: hidden;
     box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
 }

 .card-edit-table th,
 .card-edit-table td {
     border: 1px solid #e9ecef;
     padding: 10px 8px;
     vertical-align: middle;
     color: #212529;
 }

 .card-edit-table th {
     background-color: #f1f3f5;
     font-weight: 600;
 }

 .card-edit-table input,
 .card-edit-table textarea {
     background-color: #fff;
     border: 1px solid #ced4da;
     border-radius: 6px;
     padding: 6px 8px;
     font-size: 13px;
     transition: 0.2s;
 }

 .card-edit-table input:focus,
 .card-edit-table textarea:focus {
     border-color: #3b82f6;
     outline: none;
     box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
 }

 .image-thumb {
     width: 150px;
     height: 150px;
     object-fit: cover;
     border-radius: 8px;
     cursor: pointer;
     border: 1px solid #dee2e6;
     background: #f8f9fa;
 }

 .select-image-btn {
     display: inline-block;
     margin-top: 6px;
     padding: 4px 12px;
     background: #3b82f6;
     color: white;
     border: none;
     border-radius: 6px;
     cursor: pointer;
     font-size: 11px;
 }

 .continuation-card-table th {
     background-color: #f8f9fa;
     font-weight: 600;
     color: #495057;
 }

 .continuation-preview-img {
     max-width: 100%;
     max-height: 80px;
     border-radius: 8px;
     box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
 }

 .card-select-continuation {
     background-color: #fff;
     border: 1px solid #ced4da;
     border-radius: 6px;
     padding: 4px 8px;
 }

 /* 让卡片编辑表格中描述列的 textarea 填满单元格 */
 .card-edit-table td:nth-child(3) {
     padding: 4px;
     /* 减小内边距让 textarea 更大 */
 }

 .card-edit-table textarea {
     width: 100%;
     min-height: 160px;
     margin: 0;
     resize: vertical;
     box-sizing: border-box;
     /* 确保宽度包含内边距 */
 }