/* 前端优化样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 全屏内容区域样式（用于登录等无侧边栏页面） */
.full-content {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f5f7fa;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
        "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #1890ff;
    font-size: 2.5rem;
    font-weight: 600;
}

.description {
    text-align: center;
    margin-bottom: 40px;
    color: #666;
    font-size: 1.1rem;
}

/* 上传区域样式 */
.upload-area {
    border: 2px dashed #d9d9d9;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fff;
    margin-bottom: 30px;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #1890ff;
    background-color: #e6f7ff;
}

.upload-text {
    font-size: 16px;
    margin-bottom: 10px;
    color: #666;
}

.upload-hint {
    font-size: 14px;
    color: #999;
}

#fileInput {
    display: none;
}

/* 图片计数样式 */
.image-count {
    /* text-align: center; */
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

/* 图片预览样式 */
.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
}

.preview-item {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #d9d9d9;
    background-color: #fff;
}

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

.image-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgba(255, 69, 69, 0.9);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

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

/* 提示词输入样式 */
.prompt-section {
    margin-bottom: 30px;
}

.prompt-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #333;
}

.prompt-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 16px;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.3s ease;
}

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

.prompt-length {
    text-align: right;
    margin-top: 5px;
    font-size: 14px;
    color: #999;
}

/* 生成按钮样式 */
.generate-button {
    background-color: #1890ff;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
}

.generate-button:hover {
    background-color: #40a9ff;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.4);
}

.generate-button:active {
    transform: translateY(1px);
}

.generate-button:disabled {
    background-color: #d9d9d9;
    color: #999;
    cursor: not-allowed;
    box-shadow: none;
}

/* 按钮容器样式 */
.button-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

/* 加载动画样式 */
.loading-container {
    display: none;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
}

.loading-spinner {
    border: 4px solid rgba(24, 144, 255, 0.2);
    border-radius: 50%;
    border-top: 4px solid #1890ff;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-right: 15px;
}

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

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

/* 结果展示区域样式 */
.results-section {
    display: none;
    margin-top: 40px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.result-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.result-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.download-btn {
    display: block;
    text-align: center;
    padding: 10px;
    background-color: #1890ff;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.download-btn:hover {
    background-color: #40a9ff;
}

/* 消息样式 */
.error-message,
.success-message {
    display: none;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.error-message {
    background-color: #fff2f0;
    border: 1px solid #ffccc7;
    color: #f5222d;
}

.success-message {
    background-color: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #52c41a;
}

/* 登录页面样式 */
.login-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

.login-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f5f7fa;
    position: relative;
    overflow: hidden;
}

.login-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
}

.placeholder-image {
    width: 80%;
    height: 80%;
    background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(24, 144, 255, 0.3);
}

.login-title {
    font-size: 3rem;
    color: #1890ff;
    position: relative;
    z-index: 1;
    margin-top: 20px;
    text-shadow: 0 2px 10px rgba(24, 144, 255, 0.3);
}

.login-right {
    width: 550px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background-color: #fff;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.08);
}

.login-form-container {
    width: 100%;
    max-width: 450px;
}

.form-title {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

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

.captcha-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.captcha-input {
    flex: 1;
}

.captcha-image {
    width: 100px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    border-radius: 6px;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    letter-spacing: 2px;
    user-select: none;
    border: 1px solid #d9d9d9;
}

.captcha-refresh {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.captcha-refresh:hover {
    background-color: #e6f7ff;
    border-color: #1890ff;
    color: #1890ff;
}

.login-button {
    width: 100%;
    padding: 12px;
    background-color: #1890ff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.login-button:hover {
    background-color: #40a9ff;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}

.login-button:active {
    transform: translateY(1px);
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #999;
}

.register-link {
    color: #1890ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.register-link:hover {
    color: #40a9ff;
    text-decoration: underline;
}

/* 主界面样式 */
.dashboard-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* 侧边栏样式 */
.sidebar {
    width: 250px;
    background-color: #fff;
    border-right: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.06);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #e8e8e8;
}

.logo {
    font-size: 1.5rem;
    color: #1890ff;
    margin: 0;
    font-weight: 600;
    text-align: center;
}

/* 树形菜单样式 */
.tree-menu {
    flex: 1;
    padding: 10px 0;
    overflow-y: auto;
}

.menu-group {
    margin-bottom: 15px;
}

.menu-group-title {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    background-color: #f5f5f5;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-group-title:hover {
    background-color: #e6f7ff;
    color: #1890ff;
}

.menu-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-item {
    padding: 0;
}

.menu-icon {
    margin-right: 8px;
}

.menu-item a {
    display: block;
    padding: 10px 20px 10px 40px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.menu-item a:hover {
    background-color: #e6f7ff;
    color: #1890ff;
    border-left-color: #1890ff;
}

.menu-item.active a {
    background-color: #e6f7ff;
    color: #1890ff;
    border-left-color: #1890ff;
    font-weight: 500;
    box-shadow: inset 2px 0 0 #1890ff;
}

/* 主内容区域样式 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #f5f7fa;
    overflow-y: auto;
}

.content-header {
    padding: 20px;
    background-color: #fff;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.page-title {
    font-size: 1.8rem;
    color: #333;
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.username {
    font-size: 14px;
    color: #666;
}

.logout-btn {
    font-size: 14px;
    color: #1890ff;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background-color: #e6f7ff;
}

.content-body {
    padding: 20px;
    flex: 1;
}

/* 功能区域样式 */
.feature-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #1890ff;
    display: inline-block;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.feature-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-align: center;
    border: 1px solid #e8e8e8;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #1890ff;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.feature-name {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.feature-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.feature-btn {
    display: inline-block;
    padding: 8px 20px;
    background-color: #1890ff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.feature-btn:hover {
    background-color: #40a9ff;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}

/* 功能页面容器样式 */
.function-container {
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.function-description {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e8e8e8;
}

.function-description h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 10px;
}

.function-description p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.function-operation {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.function-operation h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 15px;
}

.function-operation h4 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 15px;
}

.settings-section {
    background-color: #fafafa;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #e8e8e8;
}

/* 通知提示样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    animation: slideIn 0.3s ease-out;
}

.notification.success {
    background-color: #52c41a;
}

.notification.error {
    background-color: #ff4d4f;
}

.notification.info {
    background-color: #1890ff;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 图片预览样式 */
.image-preview {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f0f0f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.preview-file-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 12px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.remove-preview-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgba(255, 77, 79, 0.9);
    color: white;
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.remove-preview-btn:hover {
    background-color: #ff4d4f;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .feature-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 992px) {
    .login-right {
        width: 400px;
    }
    
    .sidebar {
        width: 220px;
    }
    
    .feature-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (max-width: 768px) {
    /* 登录页面 */
    .login-container {
        flex-direction: column;
    }
    
    .login-left {
        width: 100%;
        padding: 2rem;
    }
    
    .login-right {
        width: 100%;
        padding: 2rem;
    }
    
    /* 主界面 */
    .sidebar {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .user-info {
        margin-top: 1rem;
        align-self: flex-end;
    }
    
    /* 功能卡片 */
    .feature-cards {
        grid-template-columns: 1fr;
    }
    
    .card {
        margin-bottom: 1.5rem;
    }
    
    /* 功能页面 */
    .function-container {
        flex-direction: column;
    }
    
    .function-description,
    .function-operation {
        width: 100%;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    /* 通知提示 */
    .notification {
        left: 20px;
        right: 20px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .feature-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .settings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .login-right {
        padding: 20px;
    }
    
    .form-title {
        font-size: 1.5rem;
    }
    
    .login-title {
        font-size: 2rem;
    }
    
    .content-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .feature-grid {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    }
    
    .function-container {
        padding: 15px;
    }
}

/* 创意想象页面样式 */
.design-area {
    display: flex;
    gap: 20px;
    height: calc(100vh - 200px);
}

/* 设计需求区域 */
.design-requirements {
    width: 300px;
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.design-requirements h3 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 10px;
}

.design-requirements h4 {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

/* 设计描述文本框 */
.design-description textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.3s ease;
}

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

/* 结构参考图 */
.structure-reference {
    margin-top: 10px;
}

.reference-box {
    width: 100%;
    height: 200px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.reference-box.dragover {
    border-color: #1890ff;
    background-color: rgba(24, 144, 255, 0.05);
    transform: scale(1.02);
}

.reference-box:hover {
    border-color: #1890ff;
    background-color: #e6f7ff;
}
    /* 线稿生图页面样式 */
    .line-art-upload {
        margin-bottom: 20px;
    }
    
    .line-art-upload .reference-box {
        width: 100%;
        height: 200px;
        border: 2px dashed #ccc;
        border-radius: 8px;
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        margin-bottom: 10px;
        transition: all 0.3s ease;
        position: relative;
    }
    
    .line-art-upload .reference-box.dragover {
        border-color: #1890ff;
        background-color: rgba(24, 144, 255, 0.05);
        transform: scale(1.02);
    }
    
    .line-art-upload .reference-box:hover {
        border-color: #1890ff;
        background-color: #e6f7ff;
    }
    
    .line-art-upload .preview-container {
        width: 100%;
        height: 200px;
        border-radius: 8px;
        overflow: hidden;
        position: relative;
        margin-bottom: 10px;
    }
    
    .line-art-upload .preview-image {
        width: 100%;
        height: 100%;
        object-fit: contain;
        border: 1px solid #e8e8e8;
        border-radius: 8px;
    }
    
    .line-art-upload .remove-image {
        position: absolute;
        top: 5px;
        right: 5px;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background-color: rgba(255, 69, 69, 0.9);
        color: white;
        border: none;
        cursor: pointer;
        font-size: 18px;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
    }
    
    .line-art-upload .remove-image:hover {
        background-color: #ff4545;
        transform: scale(1.1);
    }
    
    /* 生成图片容器样式 */
    .generated-images-container {
        width: 100%;
        height: 100%;
        display: grid;
        gap: 20px;
        padding: 20px;
    }
    
    .generated-image-wrapper {
        position: relative;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        background-color: #fff;
    }
    
    .generated-image-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        cursor: pointer;
        transition: transform 0.2s ease;
    }
    
    .generated-image-wrapper img:hover {
        transform: scale(1.02);
    }
    
    /* 图片预览模态框样式 */
    #imagePreviewModal {
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    #imagePreviewModal.show {
        opacity: 1;
    }
    
    /* 响应式设计 - 线稿生图页面 */
    @media (max-width: 768px) {
        .design-area {
            flex-direction: column;
            height: auto;
        }
        
        .design-requirements {
            width: 100%;
        }
        
        .preview-area {
            min-height: 300px;
        }
        
        .generated-images-container {
            grid-template-columns: 1fr !important;
        }
    }
}

.reference-content {
    text-align: center;
    color: #999;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
}

.reference-icon {
    font-size: 2rem;
    margin-bottom: 5px;
}

.reference-content p {
    font-size: 12px;
    margin: 0;
}

/* 图片比例选择 */
.ratio-options {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.ratio-btn {
    padding: 6px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background-color: #fff;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ratio-btn:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.ratio-btn.active {
    background-color: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

/* 出图数量选择 */
.count-options {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    justify-content: flex-start;
}

.count-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background-color: #fff;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.count-btn:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.count-btn.active {
    background-color: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

/* 生成按钮 */
.generate-section {
    margin-top: 20px;
}

.generate-button {
    width: 100%;
    padding: 12px;
    background-color: #1890ff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
}

.generate-button:hover {
    background-color: #40a9ff;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.4);
}

.generate-cost {
    color: #ffec3d;
    font-weight: 600;
}

/* 预览区域 */
.preview-area {
    flex: 1;
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.preview-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 预览图片样式 */
.preview-content .result-item {
    width: 60%;
    height: 60%;
    margin: 10%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.preview-content .result-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 确保占位符也遵循相同的比例 */
.preview-placeholder {
    width: 60%;
    height: 60%;
    margin: 10%;
    text-align: center;
    color: #999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.preview-icon {
    font-size: 4rem;
    margin-bottom: 10px;
}

.preview-placeholder p {
    font-size: 14px;
    margin: 0;
}

/* 轮询动画样式 */
.polling-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    width: 100%;
    height: 100%;
    max-width: 500px;
    max-height: 500px;
}

/* 加载动画增强 */
.loading-spinner {
    border: 4px solid rgba(24, 144, 255, 0.2);
    border-radius: 50%;
    border-top: 4px solid #1890ff;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

/* 添加脉冲动画效果 */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.polling-animation .loading-spinner {
    animation: spin 1s linear infinite, pulse 2s ease-in-out infinite;
}

/* 加载文本样式 */
.loading-text {
    color: #666;
    font-size: 16px;
    margin: 0;
    animation: fadeInOut 3s ease-in-out infinite;
}

/* 淡入淡出动画 */
@keyframes fadeInOut {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* 响应式设计 - 创意想象页面 */
@media (max-width: 768px) {
    .design-area {
        flex-direction: column;
        height: auto;
    }
    
    .design-requirements {
        width: 100%;
    }
    
    .preview-area {
        min-height: 300px;
    }
}

/* 图片容器样式 */
.image-container {
    position: relative;
    display: inline-block;
    margin: 10px;
}

.result-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.result-image:hover {
    transform: scale(1.02);
}

/* 图片菜单容器 */
.image-menu-container {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

/* 菜单按钮样式 */
.menu-toggle-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.8);
    color: #333;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.menu-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

/* 下拉菜单样式 */
.image-menu-dropdown {
    position: absolute;
    top: 40px;
    right: 0;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 4px;
    min-width: 40px;
    z-index: 20;
}

/* 图片菜单项样式 */
.image-menu-item {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 4px;
    background-color: transparent;
    cursor: pointer;
    display: block;
    margin: 4px 0;
    text-align: center;
    line-height: 36px;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.image-menu-item:hover {
    background-color: #f0f0f0;
}

/* 图片模态框样式 */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    margin: 0 auto;
}

.modal-image {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.image-modal-close:hover {
    opacity: 0.7;
}
