body {
    font-family: Arial, sans-serif;
    background: #000;
    color: #fff;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.container {
    height: 100vh;
    padding: 24px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: visible;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.main-content {
    display: flex;
    gap: 24px;
    flex: 1;
    min-height: calc(100vh - 108px);
    overflow: visible;
    margin-top: 24px;
    width: 100%;
    height: auto;
}

/* 添加网格背景 - 第一层 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.3) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 0;
    opacity: 0.3;
}

/* 添加网格背景 - 第二层 */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.1) 2px, transparent 2px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.1) 2px, transparent 2px);
    background-size: 100px 100px;
    z-index: 0;
    opacity: 0.3;
}

.avatar-div {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #2f3236;
    padding: 16px;
}

img.avatar {
    width: 40px;
    height: 40px;
}

.sidebar {
    max-width: 230px;
    background-color: rgba(25, 25, 29, 0.7);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-right: 1px solid #2f3236;
    padding-left: 12px;
    padding-right: 12px;
    max-height: 100vh;
    overflow: hidden;
}

.sidebar h2 {
    color: #888;
    display: flex;
    align-items: center;
    font-size: 16px;
}

.sidebar h2 img {
    border-radius: 50%;
    margin-right: 10px;
}

.sidebar ul {
    list-style: none;
    width: 200px;
    padding-inline-start: 0px;
    align-items: center;
    margin: 0;
    padding: 10px 0;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(37, 40, 55, 0.8) rgba(32, 33, 35, 0.3);
}

.sidebar ul::-webkit-scrollbar {
    width: 6px;
}

.sidebar ul::-webkit-scrollbar-track {
    background: linear-gradient(180deg, 
        rgba(32, 33, 35, 0.3) 0%, 
        rgba(25, 25, 27, 0.3) 100%
    );
    border-radius: 3px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.sidebar ul::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, 
        rgba(37, 40, 55, 0.8) 0%, 
        rgba(79, 83, 102, 0.8) 100%
    );
    border-radius: 3px;
    border: 1px solid rgba(52, 54, 64, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.sidebar ul::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, 
        rgba(47, 50, 65, 0.9) 0%, 
        rgba(89, 93, 112, 0.9) 100%
    );
}

.sidebar ul li {
    margin: 8px 0;
}

.sidebar ul li a {
    color: #aaa;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border-radius: 5px;
    transition: background 0.3s;
}

.sidebar ul li a:hover {
    background: linear-gradient(226deg, #252837 0%, rgba(79, 83, 102, 0) 100%);
    border: 1px solid #2f3236;
}

.sidebar ul li a img {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

.sidebar ul li a.active {
    background: linear-gradient(226deg, #252837 0%, rgba(79, 83, 102, 0) 100%);
    border: 1px solid #2f3236;
}

.card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05) 40%, rgba(0, 0, 0, 0.1));
    backdrop-filter: blur(10px); 
    border-radius: 12px;
    padding: 8px 24px 24px 24px;
    width: 320px;
    box-sizing: border-box;
    position: relative;
    overflow: auto;
    box-shadow: 
        inset 0 20px 20px -20px rgba(255, 255, 255, 0.1), /* 顶部白色内阴影 */
        0 0.25rem 24rem 0 rgba(255, 255, 255, 0.04); /* 保持原有的外阴影 */  
}

.card-content {
    max-height: 300px;
    padding: 20px;
    overflow-y: auto;
}


.loading-spinner {
    border: 5px solid #f3f3f3;
    border-radius: 50%;
    border-top: 5px solid #3498db;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite;
}

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

.card-view {
    flex: 1;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.05) 40%, rgba(0, 0, 0, 0.1));
    backdrop-filter: blur(10px); 
    border: 1px solid #141414;
    border-radius: 12px;
    padding: 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 .25rem 24rem 0 rgba(var(--white), .04) inset;
    box-shadow: 
        inset 0 20px 20px -20px rgba(255, 255, 255, 0.1), /* 顶部白色内阴影 */
        0 0.25rem 24rem 0 rgba(255, 255, 255, 0.04); /* 保持原有的外阴影 */
        
}

.card-view .main-image {
    max-width: 30%;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
    display: none;
}

.card-view .images {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
    border-radius: 12px;
   
}

.card-view .images img {
    max-height: 260px;
    border-radius: 4px;
    object-fit: cover;
    margin: 0 5px;
    border: #282828 1px solid;
    border-radius: 16px;
}

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

.card label {
    display: block;
    margin-bottom: 10px;
    color: #aaa;
}

.card textarea {
    width: 100%;
    padding: 16px;
    box-sizing: border-box;
    border: 1px solid #343640;
    border-radius: 5px;
    color: #fff;
}



.card .generate-button {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 20px auto 0;
    width: 100%;
    height: 48px;
    text-align: center;
    font-weight: 400;
    font-size: 16px;
    color: #fff;
    border-radius: 8px;
    background: radial-gradient(188% 207% at 0% 0%,#292929 0%,rgb(0,0,0) 77.61472409909909%);
    border: 1px solid rgba(255, 255, 255, 0.26);
    cursor: pointer;
    backdrop-filter: blur(10px); 
    background: radial-gradient(50% 50% at 50% 0%, #4a4a4a 0%, rgba(255, 255, 255, 0) 100%);
}


.card .images {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.card .images img {
    border-radius: 5px;
    object-fit: cover;
}


.card .main-image {
    height: 100px;
    height: auto;
    border-radius: 10px;
    margin-top: 20px;
}

#history-container {
    margin-top: auto;
    width: 100%;
    text-align: left;
}

#history-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: left;
}

#history-thumbnails img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}






.upload-area {
    position: relative;
    width: 100%;
    min-height: 200px;
    border: 2px dashed #343640;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}



.upload-area:hover {
    border-color: #555;
    color: #fff;
}

.upload-area.dragover {
    border-color: #4CAF50;
    color: #4CAF50;
}

.uploaded-image {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

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

.toast {
    position: fixed;
    top: 30%;
    left: 50%;
    padding: 10px 20px;
    border-radius: 4px;
    color: white;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 2000;
}

.toast.show {
    opacity: 1;
}

.toast.info {
    background: linear-gradient(226deg, #252837 5%, rgba(79, 83, 102, 0) 100%);
    backdrop-filter: blur(16px);
    border: 1px solid #343640;
}

.toast.success {
    background: linear-gradient(226deg, #252837 5%, rgba(79, 83, 102, 0) 100%);
    backdrop-filter: blur(16px);
    border: 1px solid #343640;
}

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

.slider-container {
    display: flex;
    flex-direction: column;
    margin: 10px 0;
}

.slider-container label {
    margin-bottom: 5px;
}

.slider-wrapper {
    display: flex;
    align-items: center;
}

#base-multiplier-slider {
    flex-grow: 1;
    margin-right: 10px;
}

#base-multiplier-value {
    min-width: 40px;
    text-align: right;
}



/* 添加以下移动适配样式 */
.menu-toggle {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1003; /* 增加z-index值，确保在sidebar之上 */
    background: none;
    border: none;
    font-size: 24px;
    color: #FFFFFF;
    cursor: pointer;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999; /* 降低z-index值 */
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .sidebar {
        position: fixed;
        left: -250px;
        top: 0;
        height: 100%;
        width: 250px;
        transition: left 0.3s ease;
        z-index: 2002; /* 确保上面z-index值一致 */
        background-color: rgba(27, 27, 41, 0.95);
    }
    .card {
        width: 100%;
    }

    .sidebar.active {
        left: 0;
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    }

    .container {
        flex-direction: column;
    }

    .main-content {
        width: 100%;
        flex-direction: column; /* 改变主容区的布局方向 */
        padding: 0px;
    }

}

/* 确保背景图片不会遮挡其他元素 */
body {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
}

.container {
    z-index: 1;
    position: relative;
}




/* 修改主背景色 */
body {
    font-family: Arial, sans-serif;
    background: #000;
    color: #fff;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* 修改卡片和侧边栏背景 */
.card, .card-view {
    border: 1px solid #1c1c1c;
    backdrop-filter: blur(8px);
    box-shadow: 0 .25rem 24rem 0 rgba(var(--white), .04) inset;
}

/* 修改上传区域背景 */
.upload-area {
    border: 1px solid #343640;
}


/* 修改控制按钮背景 */
.tool-button, .edit-button {
    border-radius: 8px;
    background:linear-gradient(226deg, #252837 0%, rgba(79, 83, 102, 0) 100%);
    border: 1px solid #343640;
    color: #fff;
}

/* 修改输入框和选择框背景 */
select, textarea {
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.15), transparent 70%);
    border: 1px solid #343640;
    color: #fff;
}

/* 删除原有的菜单相关样式 */
.menu-toggle,
.overlay,
.sidebar {
    display: none;
}

/* 添加部导航栏样式 */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    margin-bottom: 24px;
    background: none; /* 移除背景色 */
}

.top-nav .left {
    display: flex;
    align-items: center;
}

.top-nav .right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 6px;
    background: linear-gradient(226deg, #252837 0%, rgba(79, 83, 102, 0) 100%);
    border: 1px solid #343640;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: linear-gradient(226deg, #2a2d3d 0%, rgba(89, 93, 112, 0) 100%);
}

.credits {
    color: #fff;
    background: linear-gradient(to right, #4F83FF, #3CCBF4);
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 14px;
    margin-right: 12px;
}

.user-avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* 调整主容器布局 */
.container {
    padding: 24px 24px 24px 24px; /* 顶部84px(60+24), 其他边24px */
    width: 100%;
    box-sizing: border-box;
}

.main-content {
    display: flex;
    gap: 24px;
    width: 100%;
    height: calc(100vh - 108px); /* 减去顶部导航(60px)和上下边(24px*2) */
    max-width: 100%;
    margin: 0 auto;
}

/* 右侧卡片内容布局 */
.card-view {
    flex: 1;
    height: 100%;
    border: 1px solid #1c1c1c;
    box-shadow: 0 .25rem 24rem 0 rgba(var(--white), .04) inset;
    border-radius: 12px;
    padding: 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 
        inset 0 20px 20px -20px rgba(255, 255, 255, 0.1), /* 顶部白色内阴影 */
        0 0.25rem 24rem 0 rgba(255, 255, 255, 0.04); /* 保持原有的外阴影 */
}

/* 空白页提示样式 */
#prompt-message {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin: 20px 0;
}

#prompt-message img {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
}

/* 历史记录容器样式 */
#history-container {
    width: 100%;
    margin-top: 20px;
    text-align: left;
}

#history-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: left;
}



/* 移动端适配 */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 999;
        transition: 0.3s;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .overlay.active {
        display: block;
    }
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 900px;
    margin: auto;
    background: rgba(20, 20, 20, 0.6);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 
        0 0 40px rgba(0, 0, 0, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: scale(0.8);
    transition: all 0.3s ease;
    overflow: hidden;
}

/* 添加内部光效 */
.modal-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at 50% 0%, 
        rgba(255, 255, 255, 0.1),
        transparent 70%
    );
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

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

.modal-header {
    position: relative;
    padding: 20px 20px 0 20px;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.02);
}

.modal-header h3 {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
}

.close-button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    transition: color 0.3s ease;
}

.close-button:hover {
    color: rgba(255, 255, 255, 0.8);
}

.modal-body {
    padding: 30px;
}

/* Tab 样式 */
.tabs {
    display: flex;
    gap: 16px;
}

.tab-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
    font-weight: 500;
    padding: 0 0 8px 0;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.8),
        rgba(255, 255, 255, 0.2)
    );
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.tab-btn.active {
    color: rgba(255, 255, 255, 1);
}

.tab-btn.active::after {
    transform: scaleX(1);
}

.tab-btn:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Tab 内式 */
.tab-content {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 30px;
    text-align: center;  /* 保文字居中 */
    width: 100%;  /* 确保内容占宽度 */
    box-sizing: border-box;  /* 确保padding计入总宽度 */
}

.tab-content.active {
    display: flex;
}

/* 适配移动端 */
@media (max-width: 480px) {
    .modal-content {
        width: 95%;
        margin: 20px auto;
        padding: 15px;  /* 减小内边距 */
    }
    
    .tab-content {
        padding: 15px;  /* 减小内边距 */
    }
    
    .qr-code {
        max-width: 180px;  /* 移动端稍微缩图片 */
    }
}


/* 修改二维码图片样式 */
.qr-code {
    width: 100%;  /* 设置度100% */
    max-width: 200px;  /* 限制最大宽度 */
    height: auto;  /* 高度自适应 */
    object-fit: contain;  /* 保持图片比例 */
    margin: 10px auto;  /* 上下间距，水平居中 */
}

/* 修改弹窗文字样式 */
.tab-content p {
    margin: 0;  /* 移除默认外边 */
    padding: 0;  /* 移除默认内距 */
    width: 100%;  /* 确保文字占满宽度 */
    text-align: center;  /* 文字居中 */
}

/* 悬球样式 */
.floating-button {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    backdrop-filter: blur(10px);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

/* 发光边框效果 */
.floating-button::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0.3),
        rgba(255, 255, 255, 0.1)
    );
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: rotate 4s linear infinite;
}

/* 内部光效 */
.floating-button::after {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    background: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 70%
    );
    animation: pulse 2s ease-out infinite;
}

/* 钮内容容器 */
.button-content {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
}

/* 动定义 */
@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.3; }
    100% { transform: scale(1); opacity: 0.5; }
}

/* 悬停效果 */
.floating-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 10px 20px rgba(0, 0, 0, 0.2),
        0 0 20px rgba(255, 255, 255, 0.1),
        0 0 40px rgba(255, 255, 255, 0.05);
}

.floating-button:hover .button-content {
    color: rgba(255, 255, 255, 1);
    background: rgba(0, 0, 0, 0.3);
}

/* 点击效果 */
.floating-button:active {
    transform: translateY(0) scale(0.95);
}

/* 波纹效果 */
.floating-button .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}





/* 添加渐变描边效果 */
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 12px; /* 与卡片相同的圆角 */
    padding: 1.5px; /* 描边宽度 */
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.3) 0%,
        rgba(0, 0, 0, 0.3) 100%
    );
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none; /* 确保不影响卡片内容的交互 */
}

/* 修改右侧卡片样式 */
.card-view {
    border-radius: 12px;
    padding: 24px;
    flex: 1;
    min-width: 0;
    position: relative; /* 添加相对定位 */
    box-shadow: 
        inset 0 20px 20px -20px rgba(255, 255, 255, 0.1), /* 顶部白色内阴影 */
        0 0.25rem 24rem 0 rgba(255, 255, 255, 0.04); /* 保持原有的外阴影 */
}

/* 添加渐变描边效果 */
.card-view::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 1.5px;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.3) 0%,
        rgba(0, 0, 0, 0.3) 100%
    );
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 1; /* 确描边在内容之上 */
}

/* 确保内容在描边之上 */
.card-view > * {
    position: relative;
    z-index: 2;
}


.card::after,
.card-view::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
}

/* 进度条容器样式 */
#progress-container {
    width: 261px;
    height: 26px;
    background-color: #181818;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 20px;
    display: flex;
    align-items: center;
    position: relative;
    padding: 10px 6px;
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(133, 133, 133, 0.7);
    margin-bottom: 16px;
}

/* 度条样式 */
#progress-bar {
    height: 30px;
    border-radius: 6px;
    background: rgba(166, 166, 166, 0.2);
    backdrop-filter: blur(5px);
    transition: width 0.3s ease;
    position: relative;
    width: 0%;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

/* 星动效 */
#progress-bar::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    right: -100%;
    bottom: -100%;
    background: 
        radial-gradient(2px 2px at 40px 60px, #fff 100%, transparent),
        radial-gradient(2px 2px at 20px 50px, #fff 100%, transparent),
        radial-gradient(2px 2px at 30px 100px, #fff 100%, transparent),
        radial-gradient(2px 2px at 40px 60px, #fff 100%, transparent),
        radial-gradient(2px 2px at 110px 90px, #fff 100%, transparent),
        radial-gradient(2px 2px at 190px 150px, #fff 100%, transparent);
    animation: starMove 3s linear infinite;
}

/* 向前冲的动效 */
#progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    animation: moveForward 1.5s linear infinite;
}

/* 星星移动动画 */
@keyframes starMove {
    from {
        transform: translateX(0%);
    }
    to {
        transform: translateX(100%);
    }
}

/* 向前冲动画 */
@keyframes moveForward {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(100%);
    }
}

/* 进度文字样式 */
#progress-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 1;
    white-space: nowrap;
}

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

#image-modal.show {
    display: flex;
}

.image-modal-content {
    background: rgba(27, 27, 41, 0.95);
    padding: 20px;
    border-radius: 12px;
    max-width: 90%;
    max-height: 90vh;
    overflow: auto;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-image-container {
    text-align: center;
}

#modal-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 1001;
}

.image-modal-header {
    padding-bottom: 16px;
    padding-top: 0px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.image-modal-header h3 {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
}

.image-modal-body {
    margin-top: 20px;
    display: flex;
    gap: 24px;
    width: 100%;
}

.modal-image-container {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-image {
    max-height: 500px;
    max-width: 500px;
    object-fit: contain;  /* 保持图片比例 */
    width: auto;
    height: auto;
}

.modal-info {
    width: 260px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.prompt-info {
    margin-bottom: 60px;
}

.prompt-info h4 {
    margin: 0 0 12px 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.prompt-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

.copy-button {
    position: absolute;
    bottom: 20px;
    right: 20px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 信息区域样式 */
.info-section {
    margin-bottom: 24px;
}

.info-section h4 {
    margin: 0 0 12px 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.image-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

.detail-value {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
}



/* 移动端适配 */
@media screen and (max-width: 768px) {
    .brush-size-slider {
        display: flex;
        position: fixed;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        height: 180px;
        z-index: 9999;
    }

    .brush-size-slider input[type="range"] {
        height: 120px;
    }

    .canvas-container {
        padding-right: 50px;
    }

    /* 移动端滑块按钮尺寸 */
    .brush-size-slider input[type="range"]::-webkit-slider-thumb {
        width: 20px;
        height: 20px;
    }
}

/* 移动端适配图片查看弹窗 */
@media screen and (max-width: 768px) {
    .image-modal-content {
        width: 70%;  /* 调整为屏幕的70% */
        height: auto;
        max-height: 80vh;
        margin: auto;
        padding: 15px;  /* 增加整体内边距 */
        background: rgba(0, 0, 0, 0.9);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        overflow: hidden;
    }

    /* 标题样式 */
    .image-modal-header {
        padding: 10px 15px;  /* 标题区域的内边距 */
        margin: -15px -15px 10px -15px;  /* 抵消父元素的padding */
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .image-modal-header h3 {
        margin: 0;
        font-size: 16px;
        color: #fff;
    }

    .modal-image-container {
        width: 100%;
        height: auto;
        padding: 0;
    }

    /* 隐藏右侧信息和复制按钮 */
    .modal-info, 
    .copy-button,
    #copy-result {
        display: none;
    }

    /* 调整图片样式 */
    #modal-image {
        width: 100%;
        height: auto;
        object-fit: contain;
        margin: 0;
        display: block;
        border-radius: 8px;  /* 给图片添加圆角 */
    }

    /* 调整关闭按钮位置，考虑新的padding */
    .image-modal-content .close {
        position: absolute;
        top: 12px;
        right: 12px;
        z-index: 1000;
        color: white;
        font-size: 24px;
        background: rgba(0, 0, 0, 0.5);
        width: 30px;
        height: 30px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }
}

.placeholder-animation {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 20px auto;
}

.circle {
    position: absolute;
    width: 60px;
    height: 60px;
    background: #6c63ff;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: bounce 2s infinite;
}

.pulse {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 3px solid #6c63ff;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

.creative-icon {
    width: 120px;
    height: 120px;
    margin: 20px auto;
    opacity: 0.9;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.1));
}

.creative-icon svg {
    width: 100%;
    height: 100%;
}

#prompt-message {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    line-height: 1.6;
}

#prompt-message div:not(.creative-icon) {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.dimensions-container {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap; /* 允许在小屏幕上换行 */
}

.dimension-input {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px; /* 设置最小宽度 */
}

.dimension-input input {
    width: 80px;
    padding: 8px;
    border: 1px solid #343640;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 14px;
}

.dimension-input input:focus {
    outline: none;
    border-color: #555;
}

.dimension-input span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

/* 移除输入框数字箭样式 */
.dimension-input input::-webkit-inner-spin-button,
.dimension-input input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.dimension-input input[type=number] {
    -moz-appearance: textfield; /* Firefox */
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .dimension-input {
        min-width: calc(50% - 8px); /* 在小屏幕上每行显示两个 */
    }
}

/* 添加步数输入框的特殊样式 */
.steps-input {
    width: 100%;
}

.steps-input input {
    width: 100%;
    padding: 8px;
    border: 1px solid #343640;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 14px;
}

/* 移除span标签的显示 */
.steps-input span {
    display: none;
}

/* 添加按钮组容器样式 */
.button-group {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    justify-content: flex-end;
}

/* 调整生成按钮样式 */
.generate-button {
    flex: 1;  /* 让按钮占满剩余空间 */
    padding: 12px 24px;
    border-radius: 8px;
    background: linear-gradient(226deg, #252837 0%, rgba(79, 83, 102, 0) 100%);
    border: 1px solid #343640;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.generate-button:hover {
    background: linear-gradient(226deg, #2f334a 0%, rgba(79, 83, 102, 0.2) 100%);
    border-color: #4a4f64;
}

/* 调整form-group间距 */
.form-group {
    margin-bottom: 20px;
}



.card-content::-webkit-scrollbar {
    width: 6px;
}

.card-content::-webkit-scrollbar-track {
    background: transparent;
}

.card-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;  /* 滚动条宽度 */
    height: 8px; /* 横向滚动条高度 */
}

/* 滚动条轨道 */
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);  /* 极淡的白色 */
    border-radius: 4px;
}

/* 滚动条滑块 */
::-webkit-scrollbar-thumb {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0.08) 100%
    );
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: content-box;
    transition: all 0.3s ease;
}

/* 滚动条滑块悬停效果 */
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.25) 0%,
        rgba(255, 255, 255, 0.15) 100%
    );
    background-clip: content-box;
}

/* 滚动条角落 */
::-webkit-scrollbar-corner {
    background: transparent;
}

/* 添加开关样式 */
.switch-container {
    display: flex;
    align-items: center;
    margin-top: 16px;
}

.switch-label {
    margin-right: 12px;
    color: rgba(255, 255, 255, 0.9);
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border: 1px solid #343640;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #313131;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* 添加文本框容器样式 */
.textarea-container {
    position: relative;
    width: 100%;
}

/* 扩写按钮样式 */
.expand-button {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 4px 12px;
    border-radius: 4px;
    background: linear-gradient(226deg, #252837 0%, rgba(79, 83, 102, 0) 100%);
    border: 1px solid #343640;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
}

.expand-button:hover {
    background: linear-gradient(226deg, #2f334a 0%, rgba(79, 83, 102, 0.2) 100%);
    border-color: #4a4f64;
}

/* 扩写态框样式 */
.prompt-section {
    margin-bottom: 20px;
}

.prompt-section h4 {
    margin-bottom: 8px;
    color: #fff;
}

.prompt-text {
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    line-height: 1.5;
}

.button-group {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

.confirm-button, .cancel-button {
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.confirm-button {
    background: linear-gradient(226deg, #252837 0%, rgba(79, 83, 102, 0) 100%);
    border: 1px solid #343640;
    color: #fff;
}

.cancel-button {
    background: transparent;
    border: 1px solid #343640;
    color: #fff;
}

/* 确保按钮在最上层 */
.button-group {
    position: relative;
    z-index: 2;
}

.confirm-button, 
.cancel-button {
    position: relative;
    z-index: 2;
}

/* 扩写模态框移动端适配 */
@media screen and (max-width: 768px) {
    /* 调整模态框内容容器 */
    #expandModal .modal-content {
        width: 90%;
        height: 80vh;  /* 固定高度 */
        margin: 10vh auto;
        padding: 16px;
        display: flex;
        flex-direction: column;  /* 垂直布局 */
    }

    /* 调整标题样式 */
    #expandModal .modal-header {
        padding: 12px 0;
        flex-shrink: 0;  /* 防止标题压缩 */
    }

    #expandModal .modal-header h3 {
        font-size: 16px;
    }

    /* 调整内容区域 */
    #expandModal .modal-body {
        flex: 1;  /* 占据剩余空间 */
        overflow-y: auto;  /* 允许内容滚动 */
        padding-bottom: 80px;  /* 为底部按钮留出空间 */
    }

    /* 提示词部分样式 */
    #expandModal .prompt-section {
        margin-bottom: 16px;
    }

    #expandModal .prompt-section h4 {
        font-size: 14px;
        margin-bottom: 6px;
    }

    #expandModal .prompt-text {
        padding: 10px;
        font-size: 13px;
        line-height: 1.4;
    }

    /* 固定按钮组在底部 */
    #expandModal .button-group {
        position: absolute;
        bottom: 16px;
        left: 16px;
        right: 16px;
        display: flex;
        gap: 8px;
        margin-top: 0;
        background: rgba(20, 20, 20, 0.9);  /* 半透明背景 */
        padding: 12px;
        border-radius: 8px;
    }

    #expandModal .confirm-button,
    #expandModal .cancel-button {
        padding: 8px 16px;
        font-size: 14px;
        flex: 1;  /* 按钮等宽 */
    }

    /* 调整关闭按钮 */
    #expandModal .close {
        font-size: 20px;
        padding: 4px 8px;
    }
}

/* 调整主内容区域布局 */
@media screen and (max-width: 768px) {
    .container {
        padding: 12px;  /* 减小内边距 */
        height: auto;  /* 高度自适应 */
        min-height: 100vh;
    }

    .main-content {
        flex-direction: column;  /* 改为垂直布局 */
        gap: 16px;
        margin-top: 16px;
        height: auto;  /* 高度自适应 */
        min-height: unset;  /* 移除最小高度限制 */
        overflow-y: visible;  /* 允许内容溢出 */
    }

    .card {
        width: 100%;  /* 卡片占满宽度 */
        min-height: unset;  /* 移除最小高度限制 */
        height: auto;  /* 高度自适应 */
        margin-bottom: 16px;  /* 添加底部间距 */
    }

    /* 调整表单组件间距 */
    .form-group {
        margin-bottom: 16px;
    }

    /* 调整历史记录区域 */
    #history-container {
        height: auto;
        max-height: none;
    }

    /* 调整生成按钮位置 */
    .generate-button {
        position: sticky;  /* 按钮固定在底部 */
        bottom: 16px;
        margin-top: 16px;
    }

    /* 调整进度条容器 */
    #progress-container {
        margin-top: 16px;
    }

    /* 调整队列信息显示 */
    #queue-container {
        margin-top: 16px;
    }

    /* 确保页面可以滚动 */
    body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;  /* 优化移动端滚动 */
    }
}

/* 特别针对小屏幕设备的优化 */
@media screen and (max-height: 700px) {
    .container {
        padding: 24px;  /* 修改为24px */
    }

    .main-content {
        gap: 12px;
        margin-top: 12px;
    }

    .card {
        padding: 16px;  /* 减小卡片内边距 */
    }

    .form-group {
        margin-bottom: 12px;  /* 减小表单组件间距 */
    }

    /* 调整输入框和按钮的大小 */
    input, select, button {
        padding: 8px 12px;  /* 减小输入框内边距 */
    }

    /* 确保内容可以滚动显示 */
    .main-content {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* 添加下拉框样式 */
.mode-select {
    width: 100%;
    padding: 12px 36px 12px 12px;
    box-sizing: border-box;
    border: 1px solid #343640;
    border-radius: 5px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' 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 24px center;
    background-size: 12px;
}

.mode-select:hover {
    border-color: #4a4f64;
}

.mode-select:focus {
    outline: none;
    border-color: #4a4f64;
}

/* 下拉框选项样式 */
.mode-select option {
    background: #1b1b29;
    color: #fff;
    padding: 12px;
}

/* 添加表单标签样式 */
.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    opacity: 0.9;
}

/* 调整表单组间距 */
.form-group {
    margin-bottom: 16px;
}