/* 创建页面 */
.create-page .content {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden; /* 防止水平滚动 */
    overflow-y: auto; /* 内容过多时允许垂直滚动 */
}

.create-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    /* 移除绝对定位，允许内容自然流动 */
    box-sizing: border-box; /* 确保padding不会导致宽度溢出 */
    /* 确保在小屏幕上有足够的上下边距 */
    padding-top: 40px; 
    padding-bottom: 40px;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip:text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 50px;
    text-align: center;
    max-width: 600px;
}

/* 双输入布局容器 */
.dual-input-container {
    display: flex;
    width: 100%;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

/* 输入区域包装器 */
.input-wrapper {
    flex: 1;
    min-width: 300px;
}

/* 输入标题样式 */
.input-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 15px;
    color: var(--text);
}

/* 可选标签样式 */
.optional-tag {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: normal;
    padding: 2px 8px;
    background-color: var(--light-gray);
    border-radius: 20px;
    margin-left: 8px;
}

.input-container {
    width: 100%;
    position: relative;
    margin-bottom: 20px;
    background: var(--gray);
    border-radius: 15px;
    padding: 15px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    border: 1px solid transparent;
}

.input-container:focus-within {
    box-shadow: 0 0 0 2px var(--primary-light);
    transform: translateY(-2px);
    border-color: var(--primary);
}

/* 输入区域聚焦效果 */
.input-field {
    width: 100%;
    background: transparent;
    border: none;
    padding: 10px;
    color: var(--text);
    font-size: 1rem;
    min-height: 150px;
    resize: none;
    transition: all 0.3s ease;
}

.input-field:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.05);
}

/* 图片上传区域 */
.image-upload-area {
    display: flex;
    align-items: center;
    padding: 10px;
    border-top: 1px solid var(--border-color);
}

.upload-label {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background-color: var(--light-gray);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.upload-label:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(45, 70, 185, 0.2);
}

.upload-label svg {
    width: 18px;
    height: 18px;
}

.image-input {
    display: none;
}

/* 图片预览区域 */
.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
    min-height: 40px;
}

.preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
    animation: fadeIn 0.3s ease-out;
}

.preview-item:hover {
    transform: scale(1.05);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

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

.create-btn {
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 20px rgba(45, 70, 185, 0.3);
}

.create-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(45, 70, 185, 0.4);
}

/* 添加拖放区域样式 */
.input-container.drag-over {
    background-color: rgba(var(--primary-rgb), 0.1);
    border: 2px dashed var(--primary);
}

/* 添加图片上传提示文字 */
.image-upload-tip {
    display: none;
    text-align: center;
    padding: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.input-container.drag-over .image-upload-tip {
    display: block;
}

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

/* 粘贴成功的视觉反馈 */
.paste-success {
    animation: pasteFlash 0.5s ease-out;
}

@keyframes pasteFlash {
    0% { background-color: rgba(var(--primary-rgb), 0.1); }
    50% { background-color: rgba(var(--primary-rgb), 0.3); }
    100% { background-color: transparent; }
}

/* 粘贴提示文字样式 */
.paste-tip {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.7;
    margin-top: 5px;
    text-align: center;
    animation: fadeInTip 0.3s ease-out;
}

@keyframes fadeInTip {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 0.7; transform: translateY(0); }
}

/* 空白预览区提示 */
.image-preview:empty::after {
    content: '暂无图片';
    display: block;
    color: var(--text-secondary);
    opacity: 0.6;
    font-size: 0.9rem;
    font-style: italic;
    padding: 10px 0;
}

/* 生成按钮加载状态 */
.generating-animation {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.generating-animation div {
    width: 6px;
    height: 6px;
    margin: 0 2px;
    background-color: white;
    border-radius: 50%;
    animation: dot-animation 1.4s infinite ease-in-out both;
}

.generating-animation div:nth-child(1) {
    animation-delay: -0.32s;
}

.generating-animation div:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes dot-animation {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* 响应式样式 */
@media (max-width: 768px) {
    .dual-input-container {
        flex-direction: column;
    }
    
    .input-wrapper {
        min-width: 100%;
    }
    
    .create-section {
        padding: 15px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .create-btn {
        width: 100%;
        justify-content: center;
    }
}

/* 中等尺寸屏幕的优化 */
@media (min-width: 769px) and (max-width: 1200px) {
    .create-section {
        max-width: 90%;
    }
}

/* 文件上传状态提示 */
.upload-progress {
    height: 3px;
    background-color: var(--primary);
    width: 0;
    transition: width 0.3s ease;
    border-radius: 3px;
    margin-top: 5px;
}

/* 添加上传提示样式 */
.upload-tip {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.7;
    margin-left: 10px;
}

/* 图片预览模态框样式 */
.image-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.image-preview-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.image-preview-content {
    position: relative;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    z-index: 1;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.image-preview-modal.show .image-preview-content {
    transform: scale(1);
}

.image-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--gray);
}

.image-preview-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
}

.image-preview-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.image-preview-close:hover {
    background-color: var(--light-gray);
    color: var(--text);
}

.image-preview-body {
    padding: 20px;
    text-align: center;
    max-height: 70vh;
    overflow: auto;
}

.preview-image {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.image-preview-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: var(--gray);
}

.btn-secondary {
    padding: 8px 16px;
    background: var(--light-gray);
    color: var(--text-secondary);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.btn-secondary:hover {
    background: var(--border-color);
    color: var(--text);
}

.btn-primary {
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .image-preview-content {
        max-width: 95vw;
        max-height: 95vh;
        margin: 10px;
    }
    
    .image-preview-header,
    .image-preview-footer {
        padding: 15px;
    }
    
    .image-preview-body {
        padding: 15px;
        max-height: 60vh;
    }
    
    .image-preview-title {
        font-size: 1rem;
    }
    
    .image-preview-footer {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-secondary,
    .btn-primary {
        width: 100%;
        justify-content: center;
    }
}

/* 顶部公告横幅样式 */
.announcement-banner {
    display: flex;
    align-items: center;
    width: 100%;
    background: linear-gradient(135deg, rgba(45, 70, 185, 0.15), rgba(0, 245, 255, 0.15));
    border-bottom: 1px solid rgba(45, 70, 185, 0.2);
    padding: 12px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s ease;
}

.announcement-banner:hover {
    background: linear-gradient(135deg, rgba(45, 70, 185, 0.2), rgba(0, 245, 255, 0.2));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45, 70, 185, 0.15);
}

.announcement-banner .announcement-icon {
    font-size: 1.2rem;
    margin-right: 12px;
    animation: pulse 2s infinite;
}

.announcement-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.announcement-highlight {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95rem;
}

.announcement-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* 简洁客服悬浮按钮样式 */
.customer-service-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
}

.cs-float-btn {
    width: 48px;
    height: 48px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(45, 70, 185, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

.cs-float-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(45, 70, 185, 0.4);
    background: var(--primary-light);
}

.cs-float-btn:active {
    transform: translateY(0);
}

.cs-bubble {
    position: absolute;
    bottom: 60px;
    right: 0;
    width: 240px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.9);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.cs-bubble.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.cs-bubble-content {
    padding: 16px;
}

.cs-qr-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.cs-qr-mini {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.cs-qr-text {
    text-align: center;
}

.cs-qr-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 2px;
}

.cs-qr-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.cs-bubble-arrow {
    position: absolute;
    bottom: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

/* 响应式适配 */
@media (max-width: 768px) {
    .announcement-banner {
        padding: 10px 16px;
    }
    
    .announcement-text {
        gap: 1px;
    }
    
    .announcement-highlight {
        font-size: 0.9rem;
    }
    
    .announcement-desc {
        font-size: 0.8rem;
    }
    
    .customer-service-float {
        bottom: 20px;
        right: 20px;
    }
    
    .cs-float-btn {
        width: 44px;
        height: 44px;
    }
    
    .cs-bubble {
        width: 220px;
        bottom: 56px;
    }
    
    .cs-bubble-content {
        padding: 12px;
    }
    
    .cs-qr-mini {
        width: 70px;
        height: 70px;
    }
}
