.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 250px;
    padding: 15px;
    border-radius: 4px;
    color: white;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.toast.show {
    opacity: 1;
}

.toast-success {
    background-color: #4caf50;
}

.toast-error {
    background-color: #f44336;
}

.toast-warning {
    background-color: #ff9800;
}

.toast-info {
    background-color: #2196f3;
}

#pagination button.active {
    background: #6366f1;
    color: white;
}

/* 自定义大纲开关样式简洁美化 */
.toggle-switch {
    display: flex;
    align-items: initial; /* 确保子元素垂直居中对齐 */
    margin-bottom: 15px;
    padding: 8px 0;
}

.toggle-text {
    margin-right: 6px; /* 减少文本和开关之间的间距 */
    font-weight: 500;
    color: #4f46e5;
    display: inline-block;
    vertical-align: middle;
    position: relative;
    top: 1px; /* 微调文本位置，确保与开关完全对齐 */
}

.toggle-switch label {
    position: relative;
    display: inline-flex; /* 改为inline-flex提高对齐准确性 */
    align-items: center;
    width: 48px;
    height: 24px;
    vertical-align: middle;
}

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

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

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

input:checked + .toggle-slider {
    background-color: #6366f1;
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* 优化自定义大纲内容区样式 */
#outlineContent {
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease-in-out;
}

#outlineContent:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

#outlineContent label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #4b5563;
}

#outlineContent .outline-tip {
    background-color: #edf2ff;
    border-left: 3px solid #6366f1;
    padding: 8px 12px;
    margin-bottom: 12px;
    border-radius: 4px;
    font-size: 13px;
    color: #4f46e5;
    line-height: 1.5;
}

#outlineContent textarea {
    width: 100%;
    min-height: 180px;
    padding: 12px 15px;
    background-color: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: #374151;
    font-size: 14px;
    resize: vertical;
    transition: all 0.2s ease;
}

/* 改进焦点效果 - 移除颜色变化 */
#outlineContent textarea:focus {
    outline: none;
    border-color: #d1d5db; /* 保持与非焦点状态相同的边框颜色 */
    box-shadow: none; /* 移除阴影效果 */
}

#outlineContent textarea::placeholder {
    color: #9ca3af;
    opacity: 0.8;
}

#outlineContent .textarea-counter {
    display: block;
    text-align: right;
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
    padding-right: 2px;
}

.template-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    color: white;
    z-index: 1;
}

.new-badge {
    background-color: #10b981;
}

.hot-badge {
    background-color: #ef4444;
}

/* 模板加载动画样式 */
.template-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    grid-column: 1 / -1;
}

.template-loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(99, 102, 241, 0.2);
    border-radius: 50%;
    border-top-color: #6366f1;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 20px;
}

.template-loading-text {
    color: #666;
    font-size: 16px;
}

/* 模板加载更多提示样式 */
.template-loading-more {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    grid-column: 1 / -1;
}

.template-count {
    padding: 10px;
    color: #666;
    font-size: 14px;
    text-align: center;
}

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

/* 服务页面样式优化 - 使元素更小 */
#service-container h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

#order-info {
    font-size: 14px;
    margin-bottom: 15px;
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    /* max-width: 600px; */
}

#order-info p {
    margin: 5px 0;
    display: flex;
    justify-content: space-between;
}

#order-info p span:first-child {
    color: #666;
    margin-right: 10px;
}

#services {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
    max-width: 100%;
}

#service-container .service {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 15px;
    position: relative;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.15s ease;
    cursor: pointer; /* 明确指示整个区域可点击 */
    user-select: none; /* 防止文本被选中，增强点击体验 */
}

#service-container .service:hover {
    border-color: #6366f1;
    background-color: #f9f9ff;
    box-shadow: 0 2px 5px rgba(99, 102, 241, 0.15);
    transform: translateY(-1px);
}

#service-container .service:active,
#service-container .service.clicking {
    transform: translateY(0);
    background-color: #f5f5ff;
    box-shadow: 0 1px 2px rgba(99, 102, 241, 0.1);
}

#service-container .service img {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 10px;
    flex-shrink: 0;
}

#service-container .service-info {
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 60px);
}

#service-container .service-title {
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 14px;
}

#service-container .service-price {
    color: #f56c6c;
    font-weight: 600;
    margin-left: 8px;
    white-space: nowrap;
}

#service-container .service-info p {
    margin: 0;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}

#service-container .service input[type="checkbox"] {
    position: absolute;
    top: 12px;
    right: 12px;
    margin: 0;
    width: 20px;
    height: 20px;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

#service-container .service.selected {
    border-color: #6366f1;
    background-color: #f5f5ff;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

#service-container .service::after {
    content: '';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 16px;
    height: 16px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background-color: #fff;
    transition: all 0.2s ease;
}

#service-container .service.selected::after {
    background-color: #6366f1;
    border-color: #6366f1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: 12px;
    background-position: center;
    background-repeat: no-repeat;
}

#service-container .submit-button-container {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 15px;
    display: flex;
    justify-content: center;
    width: 100%;
}

#service-container .submit-button {
    background-color: #6366f1;
    color: white;
    font-weight: 500;
    font-size: 15px;
    padding: 10px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin: 0 auto;
}

#service-container .submit-button:hover {
    background-color: #4f46e5;
}

#service-container .no-services {
    text-align: center;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 8px;
    grid-column: 1 / -1;
}

/* 添加美观的全屏loading效果 */
.fullscreen-loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    backdrop-filter: blur(2px);
}

.fullscreen-loading.show {
    display: flex;
}

.loading-spinner {
    width: 40px; /* 减小尺寸从60px到40px */
    height: 40px; /* 减小尺寸从60px到40px */
    border: 4px solid rgba(99, 102, 241, 0.2); /* 减小边框从6px到4px */
    border-radius: 50%;
    border-top-color: #6366f1;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 8px; /* 减小间距从10px到8px */
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2); /* 减小阴影 */
}

.loading-text {
    color: #6366f1;
    font-size: 14px; /* 减小字体从16px到14px */
    font-weight: 500;
    text-align: center;
    margin-top: 8px; /* 减小间距从10px到8px */
    background-color: rgba(255, 255, 255, 0.8);
    padding: 8px 15px; /* 减小内边距从10px 20px到8px 15px */
    border-radius: 16px; /* 减小圆角从20px到16px */
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.2); /* 减小阴影 */
}

#pagination {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    margin-bottom: 15px;
}

#pagination button {
    margin: 0 5px;
    width: 40px;
    height: 40px;
    background: #f5f5f5;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

#pagination button:hover {
    background: #e0e0e0;
}

#pagination button.active {
    background: #6366f1;
    color: white;
}

.template-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    color: white;
    z-index: 1;
}

.new-badge {
    background-color: #10b981;
}

.hot-badge {
    background-color: #ef4444;
}

/* 模板加载动画样式 */
.template-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    grid-column: 1 / -1;
}

.template-loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(99, 102, 241, 0.2);
    border-radius: 50%;
    border-top-color: #6366f1;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 20px;
}

.template-loading-text {
    color: #666;
    font-size: 16px;
}

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

/* 模板为空状态样式 */
.empty-templates {
    text-align: center;
    padding: 60px 20px;
    background-color: #f9f9f9;
    border-radius: 12px;
    margin: 40px 0;
    grid-column: 1 / -1;
}

.empty-templates-icon {
    font-size: 60px;
    color: #d1d5db;
    margin-bottom: 20px;
}

.empty-templates-text {
    font-size: 20px;
    color: #4b5563;
    margin-bottom: 15px;
    font-weight: 500;
}

.empty-templates-subtext {
    font-size: 16px;
    color: #6b7280;
    max-width: 450px;
    margin: 0 auto;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .template-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 15px;
    }
    
    .template-type-btn {
        padding: 10px;
        font-size: 14px;
    }
    
    .template-search input,
    .template-search button {
        padding: 12px;
    }
    
    .template-title {
        font-size: 24px;
    }
    
    .template-nav-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* 仅针对模板展示步骤的页面级优化 */
#template-container {
    overflow: hidden;
    max-height: calc(100vh - 100px); /* 限制最大高度 */
}

/* 优化模板页面媒体查询 */
@media (max-width: 768px) {
    .template-grid {
        height: 360px;
        max-height: 360px;
    }
}

/* 美化大纲生成loading效果 */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.6); /* 进一步降低背景不透明度 */
    z-index: 9998;
    backdrop-filter: blur(2px); /* 减轻模糊效果 */
    align-items: center;
    justify-content: center;
}

.loading-content {
    background: rgba(255, 255, 255, 0.75); /* 进一步增加内容区域透明度 */
    border-radius: 20px;
    padding: 35px 40px;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.08); /* 减轻阴影 */
    text-align: center;
    max-width: 480px;
    width: 90%;
    margin: 0 auto;
    border: 1px solid rgba(99, 102, 241, 0.05); /* 更透明的边框 */
    position: relative;
    overflow: hidden;
}

.loading-content::before,
.loading-content::after {
    opacity: 0.7; /* 降低装饰元素的不透明度 */
}

.loading-content::before {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
    top: -150px;
    left: -150px;
    border-radius: 50%;
}

.loading-content::after {
    content: "";
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
    bottom: -100px;
    right: -100px;
    border-radius: 50%;
}

.outline-loading-animation {
    position: relative;
    height: 120px;
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 文档图标动画 */
.document-icon {
    position: relative;
    width: 60px;
    height: 75px;
    z-index: 2;
}

.paper {
    position: absolute;
    width: 60px;
    height: 75px;
    background: #f8f9fa;
    border: 2px solid #6366f1;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.lines {
    position: absolute;
    top: 12px;
    left: 10px;
    right: 10px;
}

.line {
    height: 3px;
    background: rgba(99, 102, 241, 0.2);
    margin-bottom: 8px;
    width: 0;
    border-radius: 2px;
    animation: line-grow 3s ease-in-out infinite;
}

.line:nth-child(2) {
    animation-delay: 0.2s;
    width: 60%;
}

.line:nth-child(3) {
    animation-delay: 0.4s;
    width: 40%;
}

.line:nth-child(4) {
    animation-delay: 0.6s;
    width: 70%;
}

@keyframes line-grow {
    0% { width: 0; }
    50% { width: 100%; }
    100% { width: 0; }
}

/* 圆形加载动画 */
.circle-loader {
    position: absolute;
    width: 120px;
    height: 120px;
    animation: circle-rotate 12s linear infinite;
    z-index: 1;
}

.circle-line {
    position: absolute;
    width: 2px;
    height: 20px;
    background: #6366f1;
    left: 50%;
    transform-origin: bottom;
    border-radius: 50px;
    opacity: 0.2;
}

.circle-line:nth-child(1) {
    transform: translate(-50%, -50%) rotate(0deg) translateY(-40px);
    animation: circle-pulse 2s ease-in-out infinite;
}

.circle-line:nth-child(2) {
    transform: translate(-50%, -50%) rotate(60deg) translateY(-40px);
    animation: circle-pulse 2s ease-in-out infinite;
    animation-delay: 0.3s;
}

.circle-line:nth-child(3) {
    transform: translate(-50%, -50%) rotate(120deg) translateY(-40px);
    animation: circle-pulse 2s ease-in-out infinite;
    animation-delay: 0.6s;
}

.circle-line:nth-child(4) {
    transform: translate(-50%, -50%) rotate(180deg) translateY(-40px);
    animation: circle-pulse 2s ease-in-out infinite;
    animation-delay: 0.9s;
}

.circle-line:nth-child(5) {
    transform: translate(-50%, -50%) rotate(240deg) translateY(-40px);
    animation: circle-pulse 2s ease-in-out infinite;
    animation-delay: 1.2s;
}

.circle-line:nth-child(6) {
    transform: translate(-50%, -50%) rotate(300deg) translateY(-40px);
    animation: circle-pulse 2s ease-in-out infinite;
    animation-delay: 1.5s;
}

@keyframes circle-rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes circle-pulse {
    0% { opacity: 0.2; height: 15px; }
    50% { opacity: 1; height: 25px; }
    100% { opacity: 0.2; height: 15px; }
}

.loading-text {
    display: block;
    font-size: 24px;
    font-weight: 600;
    color: #4f46e5;
    margin-bottom: 12px;
    background: linear-gradient(45deg, #4f46e5, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.loading-description {
    color: #6b7280;
    font-size: 16px;
    margin-bottom: 22px;
    line-height: 1.5;
}

.loading-progress {
    margin: 15px 0;
}

.progress-bar {
    background-color: #e5e7eb;
    height: 6px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #6366f1, #818cf8);
    border-radius: 10px;
    animation: progress-animation 2.5s ease-in-out infinite;
}

@keyframes progress-animation {
    0% { width: 10%; }
    50% { width: 90%; }
    100% { width: 10%; }
}

/* 步骤指示器 */
.loading-steps {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    text-align: center;
    position: relative;
}

.loading-steps::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #e5e7eb;
    z-index: 0;
}

.loading-steps .step {
    position: relative;
    background: white;
    padding: 0 8px;
    font-size: 13px;
    color: #9ca3af;
    width: 25%;
    z-index: 1;
}

.loading-steps .step::before {
    content: "";
    display: block;
    width: 8px;
    height: 8px;
    background: #d1d5db;
    border-radius: 50%;
    margin: 0 auto 6px;
}

.loading-steps .step.active {
    color: #6366f1;
}

.loading-steps .step.active::before {
    background: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.loading-steps .step:first-child.active ~ .step:nth-child(1)::before {
    background: #6366f1;
}

/* 步骤自动切换动画 */
@keyframes step-progress {
    0%, 20% { color: #6366f1; }
    25%, 100% { color: #9ca3af; }
}

.loading-steps .step:nth-child(1) {
    animation: step-progress 10s infinite;
}

.loading-steps .step:nth-child(2) {
    animation: step-progress 10s infinite 2.5s;
}

.loading-steps .step:nth-child(3) {
    animation: step-progress 10s infinite 5s;
}

.loading-steps .step:nth-child(4) {
    animation: step-progress 10s infinite 7.5s;
}

/* 步骤指示点动画 */
@keyframes step-dot-progress {
    0%, 20% { 
        background: #6366f1; 
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    }
    25%, 100% { 
        background: #d1d5db; 
        box-shadow: none;
    }
}

.loading-steps .step:nth-child(1)::before {
    animation: step-dot-progress 10s infinite;
}

.loading-steps .step:nth-child(2)::before {
    animation: step-dot-progress 10s infinite 2.5s;
}

.loading-steps .step:nth-child(3)::before {
    animation: step-dot-progress 10s infinite 5s;
}

.loading-steps .step:nth-child(4)::before {
    animation: step-dot-progress 10s infinite 7.5s;
}

/* 响应式调整 */
@media (max-width: 500px) {
    .loading-content {
        padding: 25px 20px;
    }
    
    .outline-loading-animation {
        height: 100px;
        margin-bottom: 15px;
    }
    
    .loading-text {
        font-size: 20px;
    }
    
    .loading-description {
        font-size: 14px;
    }
    
    .loading-steps .step {
        font-size: 10px;
        padding: 0 4px;
    }
}

/* 美化多行输入框样式 */
#step2-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f9fafb;
    color: #374151;
    font-size: 15px;
    line-height: 1.5;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) inset;
    resize: vertical;
}

#step2-form textarea:focus {
    outline: none;
    border-color: #6366f1;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

#step2-form textarea::placeholder {
    color: #9ca3af;
    font-style: italic;
}

/* 特别是自定义大纲的文本框样式 */
#outlineContent textarea {
    margin-top: 8px;
    min-height: 150px;
    background-color: #fff;
    border: 1px solid #e2e4f3;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* 移除特殊焦点效果 */
#outlineContent textarea:focus {
    background-color: #fff;
    box-shadow: none;
    border-color: #e2e4f3;
}

/* 为文本区域添加聚焦时的光晕效果 */
#step2-form .form-group:focus-within {
    transform: translateY(-1px);
}

/* Textarea获得焦点时的表单组样式 */
#step2-form .form-group.focused {
    transform: translateY(-2px);
    transition: transform 0.3s ease;
}

#step2-form .form-group.focused label {
    color: #4f46e5;
    font-weight: 500;
    transition: color 0.3s ease;
}

/* 文本区域的动画效果 - 移除对自定义大纲的应用 */
@keyframes textarea-focus-in {
    0% { transform: scale(0.98); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* 确保自定义大纲文本区域不应用动画效果 */
#step2-form textarea:focus:not(#outlineContent textarea) {
    animation: textarea-focus-in 0.2s ease-out forwards;
}

/* 移除对自定义大纲焦点的动画效果 */
#outlineContent .form-group:focus-within,
#outlineContent .form-group.focused {
    transform: none;
}

#outlineContent textarea:focus {
    animation: none;
}

/* 文本区域的字数计数器样式 */
#step2-form .textarea-counter {
    display: block;
    text-align: right;
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
    transition: color 0.3s ease, font-weight 0.3s ease;
}

/* 自定义大纲提示样式 */
.outline-tip {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
    padding: 8px 12px;
    background-color: #f3f4f6;
    border-left: 3px solid #6366f1;
    border-radius: 0 4px 4px 0;
}

/* 删除服务页面导航按钮样式，因为现在统一使用nav-buttons */

/* 第二步表单样式调整 */
#step2-form .form-group label {
    display: block;
    font-size: 14px; /* 减小标签字体大小 */
    font-weight: 600;
    margin-bottom: 8px; /* 减小底部间距 */
    color: #374151;
}

#step2-form textarea {
    width: 100%;
    min-height: 100px; /* 减小最小高度 */
    padding: 10px 12px; /* 减小内边距 */
    border: 1px solid #e0e0e0;
    border-radius: 6px; /* 减小圆角 */
    background-color: #f9fafb;
    color: #374151;
    font-size: 14px; /* 减小字体 */
    line-height: 1.5;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) inset; /* 减轻阴影 */
    resize: vertical;
}

/* 对第二步的输入框进行调整 */
#step2-form input[type="text"],
#step2-form input[type="number"],
#step2-form select {
    height: 40px; /* 减小高度 */
    padding: 0 12px; /* 减小内边距 */
    font-size: 14px; /* 减小字体 */
    border-radius: 6px; /* 减小圆角 */
    border: 1px solid #e2e8f0;
    background-color: #fff; /* 确保背景色为白色 */
    -webkit-appearance: none; /* 移除iOS默认样式 */
    -moz-appearance: none;
    appearance: none;
}

/* 特别处理总字数输入框 */
#step2-form input#lengthnum {
    -webkit-appearance: none; /* 确保移除iOS默认样式 */
    -webkit-tap-highlight-color: transparent; /* 移除点击高亮 */
    -webkit-user-select: text; /* 允许文本选择 */
    user-select: text;
    font-size: 14px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    /* 指定输入类型为数字，但允许显示数字键盘 */
    input-mode: numeric;
    background-color: #fff;
    /* 添加更明显的输入状态 */
    transition: all 0.2s ease;
}

#step2-form input#lengthnum:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
    outline: none;
}

/* 表单组样式优化 */
#step2-form .form-group {
    margin-bottom: 18px; /* 减小表单组之间的间距 */
}

/* 针对第二步移动端的调整 */
@media (max-width: 768px) {
    #step2-form input[type="text"],
    #step2-form input[type="number"],
    #step2-form select {
        height: 38px; /* 进一步减小高度 */
        font-size: 13px; /* 进一步减小字体 */
    }
    
    #step2-form textarea {
        min-height: 80px; /* 进一步减小最小高度 */
        font-size: 13px; /* 进一步减小字体 */
    }
    
    #step2-form .form-group label {
        font-size: 13px; /* 进一步减小标签字体 */
        margin-bottom: 6px; /* 进一步减小底部间距 */
    }
}

/* 添加标题计数样式 */
.suggested-titles-count {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 12px;
    padding: 6px 10px;
    background-color: rgba(99, 102, 241, 0.08);
    border-radius: 8px;
    display: inline-block;
}

.suggested-titles-count span {
    font-weight: 500;
}

/* 调整题目项内容布局 */
.suggested-title-content {
    flex: 1;
}

.suggested-title-action {
    margin-top: 10px;
    text-align: right;
}

.select-hint {
    font-size: 12px;
    color: #6366f1;
    background-color: rgba(99, 102, 241, 0.08);
    padding: 4px 10px;
    border-radius: 15px;
    opacity: 0;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.select-hint::before {
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 4px;
    font-size: 10px;
}

.suggested-title-item.selecting .select-hint {
    opacity: 1;
    content: "选择中...";
    color: #4f46e5;
    background-color: rgba(99, 102, 241, 0.15);
}

.suggested-title-item:hover .select-hint {
    opacity: 1;
    transform: translateX(-5px);
}

/* 修改"选择中"状态的提示文本 */
.suggested-title-item.selecting .select-hint::before {
    content: "\f110";
    animation: fa-spin 1s infinite linear;
}

.suggested-title-item.selecting .select-hint::after {
    content: "选择中...";
}

/* FontAwesome旋转动画 */
@keyframes fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 添加选中动画效果 */
@keyframes selecting {
    0% {
        background-color: #fafbff;
    }
    50% {
        background-color: #eff6ff;
        border-color: #6366f1;
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    }
    100% {
        background-color: #f0f9ff;
        transform: scale(0.98);
        opacity: 0.8;
    }
}

.suggested-title-item.selecting {
    animation: selecting 0.3s forwards;
}

/* 重置和重新实现标题推荐面板样式 */
.title-suggest-panel {
    margin-top: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    width: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.title-suggest-body {
    padding: 16px;
}

/* 新的表单容器布局 */
.suggest-form-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.suggest-form-row {
    display: flex;
    gap: 12px;
    width: 100%;
}

.suggest-actions-row {
    display: flex;
    align-items: flex-end;
}

.suggest-form-group {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.suggest-type-group {
    max-width: 150px;
}

.suggest-button-group {
    max-width: 150px;
}

/* 输入框和标签样式 */
.suggest-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4b5563;
    font-size: 14px;
    font-weight: 500;
}

.suggest-input-wrapper {
    position: relative;
}

.suggest-form-group input {
    width: 100%;
    height: 38px;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background-color: white;
    transition: border-color 0.2s;
}

.suggest-form-group input:focus {
    border-color: #6366f1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.suggest-input-counter {
    position: absolute;
    bottom: -18px;
    right: 2px;
    font-size: 12px;
    color: #6b7280;
}

/* 选择框样式 */
.suggest-form-group select {
    width: 100%;
    height: 38px;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background-color: white;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' 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: border-color 0.2s;
}

.suggest-form-group select:focus {
    border-color: #6366f1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

/* 生成按钮样式 */
.suggest-generate-btn {
    width: 100%;
    height: 38px;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
}

.suggest-generate-btn:hover {
    background: #4f46e5;
}

.btn-text, .btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

/* 响应式布局 */
@media (max-width: 640px) {
    .suggest-actions-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .suggest-type-group,
    .suggest-button-group {
        max-width: none;
        width: 100%;
    }
}

/* 标题列表样式 */
.suggested-titles-list {
    max-height: 280px;
    overflow-y: auto;
    border-radius: 6px;
    background-color: white;
    border: 1px solid #e5e7eb;
}

/* 空状态提示 */
.suggest-empty-prompt {
    padding: 30px;
    text-align: center;
    color: #6b7280;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.suggest-empty-prompt i {
    font-size: 36px;
    margin-bottom: 15px;
    color: #9ca3af;
}

.suggest-empty-prompt p {
    font-size: 14px;
    line-height: 1.5;
}

/* 标题加载动画 */
.suggest-title-loading {
    padding: 30px;
    text-align: center;
    color: #6b7280;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.suggest-title-loading .loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-radius: 50%;
    border-top-color: #6366f1;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.suggest-title-loading p {
    font-size: 14px;
}

/* 标题推荐结果样式 */
.suggested-title-item {
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: relative;
    background-color: #fff;
}

.suggested-title-item:last-child {
    border-bottom: none;
}

.suggested-title-item:hover {
    background-color: #f9fafb;
}

.suggested-title-text {
    font-weight: 500;
    color: #111827;
    margin-bottom: 8px;
    line-height: 1.4;
    font-size: 15px;
}

.suggested-title-desc {
    color: #6b7280;
    font-size: 13px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 选择提示 */
.suggested-title-action {
    margin-top: 10px;
    text-align: right;
}

.select-hint {
    display: inline-block;
    padding: 4px 12px;
    background-color: #f3f4f6;
    color: #6b7280;
    border-radius: 16px;
    font-size: 12px;
    transition: all 0.2s ease;
}

.suggested-title-item:hover .select-hint {
    background-color: #e5e7eb;
    color: #4b5563;
}

.suggested-title-item.selecting {
    background-color: #f0f9ff;
}

.suggested-title-item.selecting .select-hint {
    background-color: #6366f1;
    color: white;
}

/* 新增标题计数显示 */
.suggested-titles-count {
    padding: 10px 16px;
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-size: 13px;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 标题输入区域样式 */
.title-input-wrapper {
    display: flex;
    gap: 12px;
    width: 100%;
}

.title-input-wrapper input {
    flex: 1;
    height: 38px;
}

.title-suggest-btn {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0 16px;
    color: #4b5563;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    white-space: nowrap;
}

.title-suggest-btn:hover {
    background-color: #e5e7eb;
    border-color: #9ca3af;
    color: #111827;
}

.title-suggest-btn i {
    font-size: 14px;
    color: #6366f1;
}

/* 自定义下拉框包装器样式 */
.suggest-form-group.suggest-type-group {
    cursor: pointer;
    position: relative;
}

.suggest-form-group.suggest-type-group label {
    cursor: pointer;
}

.suggest-select-wrapper {
    position: relative;
    width: 100%;
    cursor: pointer;
}

.suggest-select-wrapper::after {
    content: '\f107'; /* FontAwesome下箭头图标 */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    pointer-events: none; /* 确保箭头不会干扰点击 */
}

.suggest-select-wrapper select {
    appearance: none; /* 移除浏览器默认样式 */
    width: 100%;
    padding: 10px 30px 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background-color: #f9fafb;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.suggest-select-wrapper select:hover {
    border-color: #9ca3af;
    background-color: #f3f4f6;
}

.suggest-select-wrapper select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    outline: none;
}

.suggest-select-wrapper:hover select {
    border-color: #9ca3af;
    background-color: #f3f4f6;
}

/* 防止影响其他表单控件的样式 */
#step2-form select, 
.outline-container select, 
.service-container select {
    appearance: auto; /* 恢复其他下拉菜单的默认外观 */
}

/* 添加点击波纹效果 */
@keyframes service-click-ripple {
    0% {
        transform: scale(0.5);
        opacity: 0.7;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

#service-container .service.clicking::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 20px;
    width: 20px;
    height: 20px;
    background-color: rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    transform: translate(50%, -50%);
    animation: service-click-ripple 0.4s ease-out;
    pointer-events: none;
}

/* 优化自定义大纲开关宽度问题 */
@media (max-width: 768px) {
    /* 确保开关在移动端有固定宽度 */
    .toggle-switch label {
        width: 48px; /* 保持与PC端一致的宽度 */
        min-width: 48px; /* 添加最小宽度确保不会被压缩 */
        flex-shrink: 0; /* 防止开关被压缩 */
    }
    
    /* 确保开关滑块正确显示 */
    .toggle-slider {
        width: 100%; /* 确保滑块占满整个标签宽度 */
    }
    
    /* 自定义大纲表单组样式优化 */
    #outlineContentWrapper .toggle-switch {
        width: auto; /* 避免100%宽度导致的布局问题 */
        display: flex;
        align-items: center;
    }
}

/* 移动端优化 */
@media (max-width: 768px) {
    #outlineContent {
        padding: 12px;
    }
    
    #outlineContent .outline-tip {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    #outlineContent textarea {
        min-height: 150px;
        padding: 10px 12px;
        font-size: 13px;
        resize: vertical; /* 确保在移动端也可以调整高度 */
        -webkit-appearance: none; /* 修复iOS设备上的样式问题 */
    }
    
    #outlineContent textarea:focus {
        border-color: #d1d5db; /* 保持与非焦点状态相同 */
    }
}

/* 总字数输入框有值时的样式 */
#step2-form input#lengthnum.has-value {
    background-color: #f9fafb;
    border-color: #6366f1;
    color: #4f46e5;
    font-weight: 500;
}
