/* 表单元素 */
.input-group { margin-bottom: 22px; }
.input-group:last-child { margin-bottom: 0; }

.input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
}

.input-group input,
.input-group textarea,
.input-group select,
#customImageModelInput,
#customVideoModelInput,
#imageUrls,
#customOptimizerModelInput,
#customNInput {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-size: 13px; /* 统一小字体 */
    color: #2d3748;
    transition: all 0.2s;
    background: #f7fafc;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus,
#customImageModelInput:focus,
#customVideoModelInput:focus,
#imageUrls:focus,
#customOptimizerModelInput:focus,
#customNInput:focus {
    background: #fff;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    outline: none;
}

/* 单独针对创意描述文本域优化 */
#prompt {
    font-size: 13.5px !important;
    line-height: 1.7;
    padding: 12px 14px !important;
    min-height: 160px;
    max-height: 450px;
    transition: height 0.2s ease;
}

.input-group textarea { resize: vertical; min-height: 100px; font-family: inherit; }

/* ========== API配置输入容器样式 ========== */
.api-input-container {
    position: relative;
    transition: all 0.3s ease;
    padding: 12px;
    background: #ffffff;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
}

.api-input-container.empty {
    border: 2px solid #fc8181 !important;
    background: linear-gradient(135deg, rgba(252, 129, 129, 0.05), rgba(245, 101, 101, 0.08)) !important;
    animation: apiPulse 2s ease-in-out infinite;
}

@keyframes apiPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(252, 129, 129, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(252, 129, 129, 0);
    }
}

.api-input-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.api-input-header label {
    margin: 0;
    font-weight: 600;
    color: #4a5568;
}

.api-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.api-status-badge::before {
    content: '✅ 已配置';
    color: #48bb78;
    background: rgba(72, 187, 120, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid rgba(72, 187, 120, 0.3);
}

.api-input-container.empty .api-status-badge::before {
    content: '⚠️ 必填';
    color: #f56565;
    background: rgba(245, 101, 101, 0.1);
    border: 1px solid rgba(245, 101, 101, 0.3);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ========== 提示词输入区域样式 ========== */
.prompt-input-container {
    padding: 15px;
    background: #ffffff;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

/* 空提示词时的红色警告效果 */
.prompt-input-container.empty {
    border-color: #f56565;
    box-shadow: 0 0 0 3px rgba(245, 101, 101, 0.1);
}

.prompt-header {
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

/* 已填写状态 - 绿色 */
.prompt-input-container:not(.empty) .prompt-header {
    background: linear-gradient(135deg, #e6fffa 0%, #b2f5ea 100%);
    border-left: 3px solid #38b2ac;
}

/* 空状态 - 红色脉冲 */
.prompt-input-container.empty .prompt-header {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
    border-left: 3px solid #f56565;
    animation: promptPulse 2s ease-in-out infinite;
}

@keyframes promptPulse {
    0%, 100% {
        background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
        box-shadow: 0 0 0 0 rgba(245, 101, 101, 0.4);
    }
    50% {
        background: linear-gradient(135deg, #ffe5e5 0%, #ffd5d5 100%);
        box-shadow: 0 0 0 8px rgba(245, 101, 101, 0);
    }
}

.prompt-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 8px;
    transition: all 0.3s ease;
}

/* 已填写徽章 - 绿色 */
.prompt-input-container:not(.empty) .prompt-status-badge {
    background: #38b2ac;
    color: white;
}

/* 空徽章 - 红色跳动 */
.prompt-input-container.empty .prompt-status-badge {
    background: #f56565;
    color: white;
    animation: badgePulse 1.5s ease-in-out infinite;
}

/* 更新徽章文字 */
.prompt-input-container:not(.empty) .prompt-status-badge::before {
    content: '✅ 已填写';
}

.prompt-input-container.empty .prompt-status-badge::before {
    content: '⚠️ 必填';
}

.prompt-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #2d3748;
    margin: 6px 0 3px 0;
    display: inline-block;
}

.prompt-hint {
    font-size: 0.8rem;
    color: #718096;
    margin: 4px 0 0 0;
    line-height: 1.3;
}

.highlight-group textarea {
    border-color: #e2e8f0;
    background: #fff;
    font-size: 1rem;
    border: 2px solid #cbd5e0;
    transition: all 0.2s;
}

.highlight-group textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

/* 空状态时的textarea边框 */
.prompt-input-container.empty textarea {
    border-color: #fc8181;
}

.prompt-input-container.empty textarea:focus {
    border-color: #f56565;
    box-shadow: 0 0 0 3px rgba(245, 101, 101, 0.15);
}
