/**
 * 动态模型选择器样式
 * 支持文生视频和图生视频的统一模型选择界面
 */

.dynamic-model-selector {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

/* 通用标题样式 */
.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

.section-title i {
    margin-right: 8px;
    color: #1890ff;
}

/* 弹窗模式样式 */
.model-selector-popup .popup-content {
    padding: 0;
}

.model-selector-popup-content {
    height: 100%;
    overflow: auto;
    padding: 16px;
}

.model-selector-popup .dynamic-model-selector {
    background: transparent;
    padding: 0;
    margin: 0;
}

/* ==================== 模型选择区域 ==================== */
.model-selection-section {
    margin-bottom: 24px;
}

.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.model-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.model-card:hover {
    border-color: #1890ff;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.15);
    transform: translateY(-2px);
}

.model-card.selected {
    border-color: #1890ff;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f7ff 100%);
    box-shadow: 0 4px 16px rgba(24, 144, 255, 0.2);
}

.model-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.model-name {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.model-provider {
    background: #e9ecef;
    color: #6c757d;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.model-card.selected .model-provider {
    background: #1890ff;
    color: white;
}

.model-description {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 12px;
    min-height: 40px;
}

.model-capabilities {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.capability-tag {
    background: #f8f9fa;
    color: #495057;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 8px;
    font-weight: 500;
    border: 1px solid #dee2e6;
}

.model-card.selected .capability-tag {
    background: rgba(24, 144, 255, 0.1);
    color: #1890ff;
    border-color: rgba(24, 144, 255, 0.3);
}

.model-pricing {
    color: #28a745;
    font-size: 13px;
    font-weight: 600;
    margin-top: auto;
}

.selected-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    color: #1890ff;
    font-size: 20px;
    animation: checkmark-appear 0.3s ease;
}

@keyframes checkmark-appear {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==================== 参数配置区域 ==================== */
.parameter-section {
    margin-bottom: 20px;
}

.credit-estimate {
    font-size: 14px;
    padding: 4px 12px;
    border-radius: 16px;
    font-weight: 600;
}

.credit-estimate.low-cost {
    background: #d4edda;
    color: #155724;
}

.credit-estimate.medium-cost {
    background: #fff3cd;
    color: #856404;
}

.credit-estimate.high-cost {
    background: #f8d7da;
    color: #721c24;
}

.parameter-panel {
    background: white;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

.no-model-selected {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 40px 20px;
}

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

.param-label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 14px;
}

/* 参数选项按钮样式 */
.param-option {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    margin-right: 8px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.param-option:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.param-option.active {
    background: #1890ff;
    border-color: #1890ff;
    color: white;
    box-shadow: 0 2px 4px rgba(24, 144, 255, 0.3);
}

.resolution-options,
.duration-options,
.fps-options,
.quality-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* 输入框样式 */
.param-input,
.param-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.param-input:focus,
.param-textarea:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.param-hint {
    color: #6c757d;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

/* ==================== 高级参数区域 ==================== */
.advanced-params-section {
    margin-top: 24px;
    border-top: 1px solid #e9ecef;
    padding-top: 16px;
}

.advanced-toggle {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0;
    transition: color 0.2s ease;
}

.advanced-toggle:hover {
    color: #1890ff;
}

.advanced-toggle i {
    margin-right: 6px;
    transition: transform 0.2s ease;
}

.advanced-params-content {
    margin-top: 16px;
    padding-left: 20px;
    border-left: 2px solid #e9ecef;
}

.advanced-param {
    margin-bottom: 16px;
}

/* ==================== 预览区域 ==================== */
.preview-section {
    background: white;
    border-radius: 10px;
    padding: 16px;
    border: 1px solid #e9ecef;
    margin-top: 20px;
}

.preview-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.preview-item {
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 13px;
}

.preview-item strong {
    color: #495057;
}

/* ==================== 错误状态 ==================== */
.error-message {
    text-align: center;
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 20px;
    font-size: 14px;
}

.error-message i {
    margin-right: 8px;
    font-size: 16px;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .dynamic-model-selector {
        padding: 16px;
    }
    
    .model-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .model-card {
        padding: 12px;
    }
    
    .parameter-panel {
        padding: 16px;
    }
    
    .param-option {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    .preview-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .section-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .credit-estimate {
        align-self: flex-end;
    }
    
    .resolution-options,
    .duration-options,
    .fps-options,
    .quality-options {
        justify-content: center;
    }
    
    .param-option {
        flex: 1;
        text-align: center;
        min-width: 80px;
    }
}

/* ==================== 动画效果 ==================== */
.parameter-panel {
    animation: panel-fade-in 0.3s ease;
}

@keyframes panel-fade-in {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.model-card {
    animation: card-fade-in 0.3s ease;
}

@keyframes card-fade-in {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.model-selector-wrapper {
    position: relative;
    display: inline-block;
}

.model-selector-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    background: white !important;
    color: #6c757d;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.model-selector-btn:hover {
    border-color: #007bff;
    color: #007bff;
    background: white !important;
}

.model-selector-btn.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

.model-selector-btn .model-name {
    flex: 1;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

.model-selector-btn .model-cost {
    font-size: 12px;
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 4px;
}

.model-selector-btn.active .model-cost {
    background: rgba(255, 255, 255, 0.3);
}

/* 面板样式 */
.model-selector-panel {
    position: absolute;
    bottom: 100%;
    left: 0;
    z-index: 1000;
    width: 400px;
    max-width: 90vw;
    background: white !important;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 4px;
    max-height: 500px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa !important;
}

.panel-header h6 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.refresh-btn {
    background: none;
    border: none;
    padding: 4px;
    border-radius: 4px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
}

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

.refresh-btn:active {
    transform: scale(0.95);
}

.panel-content {
    flex: 1;
    overflow-y: auto;
    min-height: 200px;
    max-height: 400px;
    background: white !important;
}

/* 状态样式 */
.loading-state,
.error-state,
.no-models-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #666;
    text-align: center;
}

.loading-state i,
.error-state i,
.no-models-state i {
    font-size: 24px;
    margin-bottom: 12px;
    color: #999;
}

.error-state i {
    color: #dc3545;
}

.error-message {
    margin-bottom: 12px;
    color: #dc3545;
}

.retry-btn {
    padding: 6px 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease;
}

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

/* 模型列表样式 */
.models-list {
    padding: 8px;
    background: white !important;
}

.model-item {
    padding: 12px;
    margin-bottom: 8px;
    border: 1px solid #eee;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white !important;
}

.model-item:hover {
    border-color: #007bff;
    background: #f8f9fa !important;
}

.model-item.selected {
    border-color: #007bff;
    background: #e3f2fd !important;
}

.model-item.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f5f5f5 !important;
}

.model-item.disabled:hover {
    border-color: #eee;
    background: #f5f5f5 !important;
}

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

.model-name-section {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.model-name {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

/* 状态图标 */
.status-warning {
    color: #ffc107;
}

.status-locked {
    color: #6c757d;
}

.status-free {
    color: #28a745;
}

/* 价格信息 */
.pricing-free {
    background: #d4edda;
    color: #155724;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.pricing-freemium {
    background: #fff3cd;
    color: #856404;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.pricing-cost {
    background: #f8d7da;
    color: #721c24;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.model-details {
    margin-bottom: 8px;
}

.model-description {
    margin: 0 0 6px 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.model-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.provider {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #666;
}

.health-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.health-status.active {
    color: #28a745;
}

.health-status.inactive {
    color: #6c757d;
}

.health-status.error {
    color: #dc3545;
}

.health-status.unknown {
    color: #ffc107;
}

/* 能力标签 */
.capabilities {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.capability-tag {
    background: #e9ecef;
    color: #495057;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.capability-more {
    background: #6c757d;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

/* 模型特性标签 */
.model-features {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.feature-tag {
    background: #d1ecf1;
    color: #0c5460;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

/* 积分信息 */
.credits-info {
    padding: 12px 16px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

.credits-display {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #333;
}

.credits-amount {
    font-weight: 600;
    color: #007bff;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .model-selector-panel {
        width: 320px;
        left: -50px;
    }
    
    .model-selector-btn .model-name {
        max-width: 80px;
    }
    
    .model-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* 深色主题支持 */
@media (prefers-color-scheme: dark) {
    .model-selector-btn {
        background: #2d3748;
        color: #e2e8f0;
        border-color: #4a5568;
    }
    
    .model-selector-btn:hover {
        background: #374151;
        border-color: #60a5fa;
    }
    
    .model-selector-panel {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .panel-header {
        background: #374151;
        border-color: #4a5568;
    }
    
    .panel-header h6 {
        color: #e2e8f0;
    }
    
    .model-item {
        background: #374151;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .model-item:hover {
        background: #4a5568;
        border-color: #60a5fa;
    }
    
    .model-item.selected {
        background: #1e40af;
        border-color: #3b82f6;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.model-selector-panel {
    animation: fadeIn 0.2s ease-out;
}

.model-item {
    animation: fadeIn 0.3s ease-out;
}

/* 加载动画 */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.loading-state .fa-spinner {
    animation: spin 1s linear infinite;
}

.refresh-btn .fa-sync-alt {
    transition: transform 0.2s ease;
}

.refresh-btn:active .fa-sync-alt {
    transform: rotate(180deg);
}

/* =============================================================================
   多图上传支持样式
   ============================================================================= */

/* 多图预览容器 */
.multi-image-preview {
    padding: 16px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    background: #f8f9fa;
}

.multi-image-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 600;
    color: #333;
}

/* 多图网格 */
.multi-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.multi-image-item {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: white;
    transition: all 0.2s ease;
}

.multi-image-item:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.multi-image-thumb {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}

.multi-image-info {
    padding: 8px;
    font-size: 12px;
}

.image-name {
    display: block;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.image-size {
    display: block;
    color: #666;
}

/* 移除按钮 */
.remove-multi-image-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s ease;
}

.multi-image-item:hover .remove-multi-image-btn {
    opacity: 1;
}

.remove-multi-image-btn:hover {
    background: #dc3545;
    transform: scale(1.1);
}

/* 清空所有按钮 */
.remove-all-images-btn {
    width: 100%;
    padding: 8px 16px;
    border: 1px solid #dc3545;
    border-radius: 6px;
    background: white;
    color: #dc3545;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.remove-all-images-btn:hover {
    background: #dc3545;
    color: white;
}

/* 多图支持提示 */
.multi-image-info {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    text-align: center;
}

.param-btn.supports-multi {
    position: relative;
}

.param-btn.supports-multi::after {
    content: '多图';
    position: absolute;
    top: -6px;
    right: -6px;
    background: #28a745;
    color: white;
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 8px;
    font-weight: 500;
}

/* 拖拽上传样式 */
.drag-over {
    border: 2px dashed #007bff;
    background: rgba(0, 123, 255, 0.05);
}

.drag-over::before {
    content: '拖拽图片到此处';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 123, 255, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 500;
    z-index: 10;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .multi-image-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .multi-image-preview {
        padding: 12px;
    }
    
    .multi-image-thumb {
        height: 60px;
    }
}

/* =============================================================================
   多图用户消息样式
   ============================================================================= */

.user-multi-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    padding: 12px;
    background: rgba(0, 123, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(0, 123, 255, 0.1);
}

.user-multi-image-item {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid rgba(0, 123, 255, 0.2);
}

.user-multi-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    display: block;
}

.image-index {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 123, 255, 0.9);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

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

@media (max-width: 480px) {
    .user-multi-image {
        width: 60px;
        height: 60px;
    }
    
    .user-multi-images {
        padding: 8px;
    }
    
    .image-index {
        width: 16px;
        height: 16px;
        font-size: 10px;
    }
}

/* =============================================================================
   增强积分预估和余额检查样式
   ============================================================================= */

/* 积分预估内容 */
.credit-estimate-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.credit-estimate-content.low-cost .credit-main {
    border-left: 4px solid #52c41a;
    padding-left: 12px;
}

.credit-estimate-content.medium-cost .credit-main {
    border-left: 4px solid #faad14;
    padding-left: 12px;
}

.credit-estimate-content.high-cost .credit-main {
    border-left: 4px solid #ff4d4f;
    padding-left: 12px;
}

.credit-main {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

.credit-label {
    color: #666;
    font-weight: 500;
}

.credit-value {
    font-weight: 700;
    font-size: 20px;
    color: #1890FF;
}

.credit-unit {
    color: #999;
    font-size: 14px;
}

/* 余额信息 */
.credit-balance-info {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 12px;
}

.balance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    font-size: 14px;
}

.balance-row:last-child {
    margin-bottom: 0;
}

.balance-label {
    color: #666;
    font-weight: 500;
}

.balance-value {
    font-weight: 600;
    color: #1a1a1a;
}

.balance-unit {
    color: #999;
    font-size: 12px;
    margin-left: 4px;
}

/* 余额充足性状态 */
.affordability-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
}

.affordability-status.affordable {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.affordability-status.insufficient {
    background: #fff2f0;
    color: #ff4d4f;
    border: 1px solid #ffccc7;
}

/* 积分消耗详情 */
.pricing-breakdown {
    background: #f0f8ff;
    border-radius: 6px;
    padding: 12px;
    border: 1px solid #d4edda;
}

.pricing-breakdown h6 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 14px;
    font-weight: 600;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    font-size: 13px;
}

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

.breakdown-label {
    color: #666;
}

.breakdown-multiplier {
    color: #1890FF;
    font-weight: 500;
}

.breakdown-credits {
    color: #333;
    font-weight: 600;
}

/* 充值建议 */
.topup-suggestion {
    background: #fff7e6;
    border: 1px solid #ffd591;
    border-radius: 6px;
    padding: 12px;
}

.topup-message {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: #d4610f;
    font-size: 14px;
}

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

.topup-btn, .check-balance-btn {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    border: none;
}

.topup-btn {
    background: #1890FF;
    color: white;
}

.topup-btn:hover {
    background: #40a9ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(24, 144, 255, 0.3);
}

.check-balance-btn {
    background: #f0f0f0;
    color: #666;
    border: 1px solid #d9d9d9;
}

.check-balance-btn:hover {
    background: #e6e6e6;
    color: #333;
}

/* 加载状态 */
.credit-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
    justify-content: center;
    padding: 20px;
}

.credit-loading i {
    color: #1890FF;
}

/* 生成按钮状态 */
.generate-btn.insufficient-balance {
    background: #f5f5f5 !important;
    color: #bbb !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

/* 参数提示信息 */
.param-info, .param-warning {
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    animation: fadeInUp 0.3s ease;
}

.param-info.info {
    background: #e6f7ff;
    color: #1890FF;
    border: 1px solid #91d5ff;
}

.param-warning.warning {
    background: #fff7e6;
    color: #d4610f;
    border: 1px solid #ffd591;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 推荐标签 */
.recommended-tag {
    background: #52c41a;
    color: white;
    padding: 1px 4px;
    border-radius: 2px;
    font-size: 10px;
    font-weight: 500;
    margin-left: 4px;
}

.credit-info {
    color: #faad14;
    font-weight: 500;
    font-size: 11px;
    margin-left: 4px;
}

/* 参数描述 */
.param-description {
    color: #999;
    font-weight: normal;
    font-size: 12px;
    margin-left: 8px;
}

/* 分辨率预览增强 */
.resolution-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
    min-width: 100px;
}

.resolution-preview {
    background: linear-gradient(135deg, #1890FF, #40a9ff);
    border-radius: 3px;
    position: relative;
}

.resolution-preview.landscape {
    width: 40px;
    height: 24px;
}

.resolution-preview.portrait {
    width: 24px;
    height: 40px;
}

.resolution-preview.square {
    width: 32px;
    height: 32px;
}

.resolution-text {
    text-align: center;
    line-height: 1.2;
}

.resolution-text strong {
    display: block;
    font-size: 13px;
    color: #333;
}

.resolution-text small {
    display: block;
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

/* 时长选项增强 */
.duration-option {
    position: relative;
    min-width: 60px;
    text-align: center;
}

.duration-option.recommended {
    border-color: #52c41a;
}

.duration-value {
    display: block;
    font-weight: 600;
}

.duration-range-info {
    text-align: center;
    margin-top: 8px;
    color: #999;
    font-size: 12px;
}

/* 模型特定参数样式 */
.param-group.model-specific {
    border: 1px solid #e6f7ff;
    border-radius: 6px;
    padding: 16px;
    background: #f6fbff;
    margin-top: 16px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
}

.range-label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #333;
    font-size: 14px;
}

.range-label input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e6e6e6;
    outline: none;
    -webkit-appearance: none;
}

.range-label input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1890FF;
    cursor: pointer;
}

.range-value {
    color: #1890FF;
    font-weight: 600;
}

.select-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #333;
    font-size: 14px;
}

.select-label select {
    padding: 4px 8px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: white;
    color: #333;
    font-size: 14px;
}

/* 响应式增强积分预估 */
@media (max-width: 768px) {
    .credit-estimate-content {
        gap: 8px;
    }
    
    .credit-main {
        font-size: 14px;
    }
    
    .credit-value {
        font-size: 18px;
    }
    
    .topup-actions {
        flex-direction: column;
        gap: 6px;
    }
    
    .topup-btn, .check-balance-btn {
        justify-content: center;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .credit-balance-info {
        padding: 8px;
    }
    
    .balance-row {
        font-size: 13px;
    }
    
    .affordability-status {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .resolution-option {
        min-width: 80px;
        padding: 8px 6px;
    }
    
    .duration-option {
        min-width: 50px;
        padding: 6px 8px;
        font-size: 13px;
    }
}