* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4361ee;
    --primary-hover: #3a56d4;
    --secondary-color: #48cae4;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --border-color: #e9ecef;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --radius: 12px;
}

body {
    font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

.sidebar {
    width: 320px;
    background-color: var(--card-bg);
    border-right: 1px solid var(--border-color);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.03);
    z-index: 10;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* 自定义滚动条 */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0;
}

.logo i {
    font-size: 24px;
    color: var(--primary-color);
}

.logo h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

.main-content {
    flex: 1;
    padding: 24px;
    overflow: auto;
    background-color: var(--bg-color);
}

.model-selection, .input-area, .info-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 8px;
}

h3 i {
    color: var(--primary-color);
    font-size: 14px;
}

select {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    background-color: var(--card-bg);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23333333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

select:hover, select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
    outline: none;
}

textarea {
    height: 220px;
    resize: vertical;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 15px;
    line-height: 1.6;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
    outline: none;
}

button {
    padding: 12px 18px;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 500;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(67, 97, 238, 0.2);
}

button:active {
    transform: translateY(0);
}

#submit-btn {
    margin-top: 8px;
    height: 48px;
    font-size: 16px;
}

.tooltip {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background-color: rgba(67, 97, 238, 0.08);
    border-radius: var(--radius);
    font-size: 12px;
    color: var(--primary-color);
}

.tooltip i {
    font-size: 14px;
}

.tooltip span {
    flex: 1;
    color: #4a5568;
    font-size: 12px;
    line-height: 1.4;
}

/* 新的内容区样式 */
.content-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
}

.tab-buttons {
    display: flex;
    gap: 8px;
}

.tab-btn {
    background: transparent;
    color: #6c757d;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-weight: 500;
    box-shadow: none;
}

.tab-btn:hover {
    background-color: rgba(67, 97, 238, 0.08);
    box-shadow: none;
    transform: none;
}

.tab-btn.active {
    background-color: rgba(67, 97, 238, 0.12);
    color: var(--primary-color);
}

.content-area {
    flex: 1;
    overflow: auto;
    padding: 24px;
    position: relative;
}

.content-pane {
    display: none;
    height: 100%;
    flex-direction: column;
    gap: 24px;
}

.content-pane.active {
    display: flex;
}

.canvas-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--border-color);
    background-color: #ffffff;
    border-radius: var(--radius);
    overflow: auto;
    padding: 16px;
    position: relative;
}

#canvas-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #a0aec0;
    text-align: center;
    padding: 40px;
}

#canvas-placeholder i {
    color: #cbd5e0;
    margin-bottom: 8px;
}

#canvas-placeholder p {
    font-size: 18px;
    color: #718096;
}

#canvas-placeholder p.small {
    font-size: 14px;
    color: #a0aec0;
    max-width: 300px;
    line-height: 1.4;
}

canvas {
    background-color: white;
    box-shadow: var(--shadow);
    border-radius: 8px;
}

pre {
    background-color: #f1f3f5;
    padding: 20px;
    border-radius: var(--radius);
    overflow: auto;
    height: 100%;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 14px;
    line-height: 1.5;
}

.canvas-actions, .code-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 16px;
}

.canvas-actions button, .code-actions button {
    background-color: #f8f9fa;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.canvas-actions button:hover, .code-actions button:hover {
    background-color: #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 确保代码区域完全隐藏 */
#code-pane {
    display: none;
}

#code-pane.active {
    display: flex;
    flex-direction: column;
}

#code-display {
    flex: 1;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 60vh;
        padding: 16px;
        gap: 16px;
    }
    
    textarea {
        height: 120px;
        min-height: 100px;
    }
    
    .logo {
        padding-bottom: 16px;
    }
    
    .header-actions {
        padding: 12px 16px;
    }
    
    .content-area {
        padding: 16px;
    }
}

/* Toast消息样式 */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background-color: white;
    color: #333;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 400px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast i {
    font-size: 20px;
}

.toast-success {
    border-left: 4px solid #10b981;
}

.toast-success i {
    color: #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-error i {
    color: #ef4444;
}

.toast-warning {
    border-left: 4px solid #f59e0b;
}

.toast-warning i {
    color: #f59e0b;
}

.toast-info {
    border-left: 4px solid #3b82f6;
}

.toast-info i {
    color: #3b82f6;
}

/* 输入框焦点状态 */
.input-area.focused textarea {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

/* 交互相关样式 */
.draggable {
    cursor: grab;
}

.dragging {
    cursor: grabbing !important;
}

.highlight-point {
    cursor: pointer;
    transition: all 0.2s ease;
}

.highlight-point:hover {
    fill: var(--primary-color);
    stroke: var(--primary-color);
    stroke-width: 3px;
    r: 8px; /* 增加半径 */
}

.highlight-text {
    cursor: move;
    transition: all 0.2s ease;
}

.highlight-text:hover {
    fill: var(--primary-color);
    font-weight: bold;
}

.control-point {
    fill: #fff;
    stroke: var(--primary-color);
    stroke-width: 2px;
    r: 6px;
    cursor: move;
    transition: all 0.2s ease;
}

.control-point:hover, .control-point.active {
    fill: var(--primary-color);
    r: 8px;
}

.drag-instruction {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 8px 16px;
    font-size: 14px;
    color: #4a5568;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.drag-instruction.show {
    opacity: 1;
}

.drag-instruction i {
    color: var(--primary-color);
}

/* 操作日志区域样式 */
.logs-container {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 350px;
    max-height: 300px;
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 1000;
    overflow: hidden;
    transition: all 0.3s ease;
}

.logs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
}

.logs-header h3 {
    margin: 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-logs-btn {
    background: transparent;
    color: #6c757d;
    padding: 4px 8px;
    box-shadow: none;
}

.toggle-logs-btn:hover {
    background-color: rgba(67, 97, 238, 0.1);
    box-shadow: none;
    transform: none;
}

.logs-content {
    max-height: 250px;
    overflow-y: auto;
    padding: 8px 0;
}

#logs-list {
    list-style: none;
    margin: 0;
    padding: 0 16px;
}

#logs-list li {
    margin-bottom: 6px;
    font-size: 13px;
    color: #4a5568;
    line-height: 1.4;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 6px;
}

#logs-list li:last-child {
    border-bottom: none;
}

.timestamp {
    color: var(--primary-color);
    font-weight: 500;
    margin-right: 6px;
}

/* 图片上传区域优化 */
.image-upload-area {
    margin-top: 10px;
    margin-bottom: 0;
}

.image-upload-box {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: rgba(67, 97, 238, 0.02);
}

.image-upload-box:hover {
    border-color: var(--primary-color);
    background-color: rgba(67, 97, 238, 0.05);
}

.image-upload-box.dragover {
    border-color: var(--primary-color);
    background-color: rgba(67, 97, 238, 0.1);
    transform: scale(1.02);
}

.image-upload-box i {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.image-upload-box p {
    color: #4a5568;
    font-size: 13px;
    margin: 2px 0;
}

.image-upload-box p.small {
    font-size: 11px;
    color: #a0aec0;
}

.uploaded-image {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background-color: #f8f9fa;
    padding: 6px;
}

.uploaded-image img {
    width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: contain;
    border-radius: 8px;
}

.remove-image {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    padding: 0;
    background-color: rgba(239, 68, 68, 0.9);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-image:hover {
    background-color: #dc2626;
    transform: scale(1.1);
}

.remove-image i {
    font-size: 14px;
}

.powered-by {
    margin-top: 20px;
    font-size: 11px;
    color: #6c757d;
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.powered-by .model-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    background-color: rgba(16, 185, 129, 0.1);
    border-radius: 12px;
    font-size: 11px;
    color: #10b981;
    margin-bottom: 6px;
}

.powered-by .model-status i {
    font-size: 11px;
}

/* 历史记录页面样式 */
#history-pane {
    padding: 20px;
}

.history-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.history-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.history-header h3 {
    font-size: 18px;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.history-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 14px;
}

.history-info i {
    color: var(--secondary-color);
}

.history-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    gap: 12px;
}

.history-placeholder i {
    color: #ced4da;
}

.history-placeholder p {
    text-align: center;
    margin: 4px 0;
}

.history-placeholder p.small {
    font-size: 14px;
    opacity: 0.8;
}

.history-item {
    padding: 16px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.history-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.1);
    transform: translateY(-1px);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.history-item-title {
    font-weight: 600;
    font-size: 15px;
    color: #1a1a1a;
    line-height: 1.4;
    flex: 1;
    margin-right: 12px;
}

.history-item-time {
    font-size: 12px;
    color: #6c757d;
    white-space: nowrap;
}

.history-item-model {
    display: inline-block;
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    margin-top: 4px;
}

/* 过期提示样式 */
.expiry-notice {
    margin-bottom: 0;
    margin-left: auto;
    padding: 6px 12px;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: var(--radius);
    color: #856404;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.expiry-notice i {
    color: #ff6b35;
}

/* 分享链接模态框样式 */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.share-modal.show {
    opacity: 1;
    visibility: visible;
}

.share-modal-content {
    background-color: var(--card-bg);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.share-modal h3 {
    margin-bottom: 16px;
    color: #1a1a1a;
}

.share-url-container {
    margin: 16px 0;
    padding: 12px;
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-url {
    flex: 1;
    font-family: monospace;
    font-size: 14px;
    color: var(--primary-color);
    word-break: break-all;
}

.copy-url-btn {
    padding: 8px 12px;
    font-size: 12px;
    background-color: var(--primary-color);
    min-width: auto;
}

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

.share-modal-actions button {
    min-width: 100px;
}

.close-modal-btn {
    background-color: #6c757d;
}

.close-modal-btn:hover {
    background-color: #5a6268;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .history-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .history-item-time {
        font-size: 11px;
    }
    
    .share-modal-content {
        padding: 20px 16px;
    }
    
    .share-modal-actions {
        flex-direction: column;
    }
    
    .expiry-notice {
        font-size: 11px;
        padding: 4px 8px;
        margin-left: 12px;
    }
    
    .header-actions {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .tab-buttons {
        flex: 1;
        min-width: 0;
    }
}

/* 批量生成开关样式优化 */
.batch-generation {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.batch-generation h3 {
    margin-bottom: 0;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 6px;
}

.batch-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    height: 40px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    margin: 0;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4CAF50;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.batch-mode-label {
    font-size: 13px;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
    min-width: 20px;
}

/* 批量结果网格布局 */
.batch-results-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 15px;
    padding: 15px;
    height: calc(100% - 30px);
    overflow: hidden;
}

.batch-result-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.batch-result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.batch-result-header {
    padding: 8px 12px;
    background: #f5f5f5;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.batch-result-number {
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

.batch-result-status {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    background: #e0e0e0;
    color: #666;
}

.batch-result-status.loading {
    background: #fff3cd;
    color: #856404;
}

.batch-result-status.success {
    background: #d4edda;
    color: #155724;
}

.batch-result-status.error {
    background: #f8d7da;
    color: #721c24;
}

.batch-result-content {
    flex: 1;
    position: relative;
    background: #fafafa;
    min-height: 0;
}

.batch-result-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.batch-result-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
}

.batch-result-loading i {
    font-size: 1.5em;
    margin-bottom: 8px;
    animation: spin 1s linear infinite;
}

.batch-result-loading span {
    font-size: 12px;
}

.batch-result-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #dc3545;
    padding: 15px;
    text-align: center;
    font-size: 12px;
}

.batch-result-actions {
    padding: 8px;
    background: #f5f5f5;
    border-top: 1px solid #eee;
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.batch-result-actions button {
    flex: 1;
    padding: 5px 8px;
    border: none;
    border-radius: 4px;
    background: #007bff;
    color: white;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.batch-result-actions button.secondary {
    background: #6c757d;
}

.batch-result-actions button.secondary:hover {
    background: #545b62;
}

.batch-result-actions button.tertiary {
    background: #28a745;
}

.batch-result-actions button.tertiary:hover {
    background: #218838;
}

/* 批量生成进度条 */
.batch-progress {
    margin: 15px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    min-width: 300px;
    z-index: 10;
}

.batch-progress-bar {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin: 8px 0;
}

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

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

/* 响应式调整 */
@media (max-width: 1200px) {
    .batch-results-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .batch-results-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(4, 1fr);
    }
}

@media (max-width: 600px) {
    .batch-results-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(5, 1fr);
    }
}

/* 模型和批量生成并排布局 */
.model-batch-row {
    display: flex;
    gap: 12px;
    margin-bottom: 0;
}

.model-batch-row .model-selection {
    flex: 1.5;
    min-width: 0;
}

.model-batch-row .batch-generation {
    flex: 1;
    min-width: 0;
}

.model-selection h3,
.batch-generation h3,
.input-area h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 6px;
}

.model-selection select {
    width: 100%;
    padding: 10px 12px;
    font-size: 13px;
}

/* 输入区域优化 */
.input-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 0;
}

.input-area textarea {
    height: 180px;
    min-height: 120px;
    max-height: 300px;
    resize: vertical;
    padding: 14px;
    font-size: 14px;
}

.input-area button {
    height: 44px;
    font-size: 15px;
    margin-top: 4px;
}

/* 信息提示区域 */
.info-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    margin-bottom: 0;
}

.tooltip {
    padding: 10px 14px;
    font-size: 12px;
}

.tooltip i {
    font-size: 14px;
}

.tooltip span {
    font-size: 12px;
    line-height: 1.4;
}

/* 页脚优化 */
.powered-by {
    margin-top: 20px;
    font-size: 11px;
    color: #6c757d;
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.powered-by .model-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    background-color: rgba(16, 185, 129, 0.1);
    border-radius: 12px;
    font-size: 11px;
    color: #10b981;
    margin-bottom: 6px;
}

.powered-by .model-status i {
    font-size: 11px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 60vh;
        padding: 16px;
        gap: 16px;
    }
    
    .model-batch-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .model-batch-row .model-selection,
    .model-batch-row .batch-generation {
        flex: 1;
    }
    
    .input-area textarea {
        height: 120px;
        min-height: 100px;
    }
    
    .logo {
        padding-bottom: 16px;
    }
    
    .info-area {
        margin-top: 16px;
    }
}

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

/* AI分析按钮样式 */
.ai-analyze-btn {
    background-color: var(--secondary-color);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 500;
    margin: 20px auto;
    display: none;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 8px rgba(72, 202, 228, 0.2);
}

.ai-analyze-btn:hover {
    background-color: #3eb8d2;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(72, 202, 228, 0.3);
}

.ai-analyze-btn.show {
    display: flex;
}

/* AI分析弹窗样式 */
.ai-analysis-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.ai-analysis-modal.show {
    display: flex;
}

.ai-analysis-content {
    background-color: white;
    border-radius: var(--radius);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ai-analysis-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-analysis-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-analysis-header h3 i {
    color: var(--secondary-color);
}

.ai-analysis-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.ai-analysis-close:hover {
    background-color: #f8f9fa;
    color: #333;
}

.ai-analysis-body {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    font-size: 15px;
    line-height: 1.8;
}

.ai-analysis-body::-webkit-scrollbar {
    width: 8px;
}

.ai-analysis-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.ai-analysis-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.ai-analysis-body::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.ai-analysis-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 60px;
    color: #6c757d;
}

.ai-analysis-loading i {
    font-size: 48px;
    color: var(--secondary-color);
    animation: spin 1s linear infinite;
}

.ai-analysis-loading p {
    font-size: 16px;
}

.ai-analysis-result {
    white-space: pre-wrap;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ai-analysis-result h3 {
    color: var(--primary-color);
    margin: 24px 0 12px 0;
    font-size: 18px;
}

.ai-analysis-result h3:first-child {
    margin-top: 0;
}

.ai-analysis-result p {
    margin-bottom: 12px;
}

.ai-analysis-result ul {
    margin-left: 24px;
    margin-bottom: 12px;
}

.ai-analysis-result li {
    margin-bottom: 6px;
}

.ai-analysis-result strong {
    color: #1a1a1a;
    font-weight: 600;
}

.ai-analysis-error {
    background-color: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    padding: 16px;
    color: #c00;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-analysis-error i {
    font-size: 24px;
}

@media (max-width: 768px) {
    .ai-analysis-content {
        width: 95%;
        max-height: 90vh;
        margin: 20px;
    }
    
    .ai-analysis-header {
        padding: 16px;
    }
    
    .ai-analysis-body {
        padding: 16px;
    }
} 