body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a0a, #1a1a1a);
    color: #fff;
    font-family: 'Microsoft YaHei', sans-serif;
    display: flex;
    flex-direction: column;
}

.container {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}

h1 {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

.prompt-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 100px 2.5rem;
    margin-top: 0;
    margin-bottom: 0;
    align-items: stretch;
}

.prompt-card {
    background: linear-gradient(145deg, #1a1a1a, #222);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 400px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.prompt-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ffd700, #daa520);
    opacity: 0.7;
}

.prompt-card.card-show {
    opacity: 1;
    transform: translateY(0);
}

.prompt-card.card-show:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 215, 0, 0.3);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.15);
}

.card-icon {
    font-size: 2rem;
    color: #ffd700;
    margin-bottom: 1rem;
    opacity: 0.8;
    flex: 0 0 auto;
}

.prompt-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.prompt-text-zh {
    font-size: 1rem;
    color: #ffd700;
    line-height: 1.6;
    padding: 0.8rem;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prompt-text-en {
    font-size: 1rem;
    color: #daa520;
    line-height: 1.6;
    padding: 0.8rem;
    background: rgba(218, 165, 32, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(218, 165, 32, 0.2);
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prompt-description {
    color: #ccc;
    line-height: 1.6;
    font-size: 0.9rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: left;
}

.button-group {
    margin-top: auto;
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    padding-top: 1rem;
}

.copy-btn {
    flex: 1;
    max-width: 160px;
    height: 36px;
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.3);
    padding: 0 1rem;
    font-size: 0.85rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.copy-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.5);
    transform: translateY(-2px);
}

.generate-btn {
    background: linear-gradient(45deg, #ffd700, #daa520);
    color: #000;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 100px;
    margin-bottom: 50px;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3);
}

.copied {
    background: #ffd700 !important;
    color: #000 !important;
}

@media (max-width: 1200px) {
    .prompt-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .prompt-cards {
        grid-template-columns: 1fr;
    }
}

/* 添加分类按钮样式 */
.category-filter {
    margin: 2rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.category-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: translateY(-2px);
}

.category-btn.active {
    background: linear-gradient(45deg, #ffd700, #daa520);
    color: #000;
    border: none;
    font-weight: bold;
}

/* 添加分类标签样式 */
.category-label {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
}

/* 为每个分类标签添加特定颜色 */
.category-label[data-category="character"] {
    background: rgba(255, 126, 179, 0.2);
    color: var(--color-character);
}

.category-label[data-category="scene"] {
    background: rgba(126, 186, 255, 0.2);
    color: var(--color-scene);
}

.category-label[data-category="fantasy"] {
    background: rgba(173, 126, 255, 0.2);
    color: var(--color-fantasy);
}

.category-label[data-category="scifi"] {
    background: rgba(126, 255, 219, 0.2);
    color: var(--color-scifi);
}

.category-label[data-category="animal"] {
    background: rgba(255, 183, 126, 0.2);
    color: var(--color-animal);
}

.category-label[data-category="abstract"] {
    background: rgba(255, 126, 126, 0.2);
    color: var(--color-abstract);
}

/* 添加分类颜色变量 */
:root {
    --color-character: #ff7eb3;
    --color-scene: #7ebaff;
    --color-fantasy: #ad7eff;
    --color-scifi: #7effdb;
    --color-animal: #ffb77e;
    --color-abstract: #ff7e7e;
    --color-stilllife: #7eff9b;
    --color-face: #ff9ecd;
    --color-expression: #ff9e9e;
    --color-hair: #d49eff;
    --color-clothing: #9effb1;
    --color-accessories: #ffdc9e;
    --color-pose: #9ecfff;
}

/* 为每个分类按钮添加特定颜色 */
.category-btn[data-category="character"] {
    border-color: var(--color-character);
    color: var(--color-character);
}

.category-btn[data-category="scene"] {
    border-color: var(--color-scene);
    color: var(--color-scene);
}

.category-btn[data-category="fantasy"] {
    border-color: var(--color-fantasy);
    color: var(--color-fantasy);
}

.category-btn[data-category="scifi"] {
    border-color: var(--color-scifi);
    color: var(--color-scifi);
}

.category-btn[data-category="animal"] {
    border-color: var(--color-animal);
    color: var(--color-animal);
}

.category-btn[data-category="abstract"] {
    border-color: var(--color-abstract);
    color: var(--color-abstract);
}

/* 分类按钮激活状态 */
.category-btn.active[data-category="character"] {
    background: var(--color-character);
    color: #000;
}

.category-btn.active[data-category="scene"] {
    background: var(--color-scene);
    color: #000;
}

.category-btn.active[data-category="fantasy"] {
    background: var(--color-fantasy);
    color: #000;
}

.category-btn.active[data-category="scifi"] {
    background: var(--color-scifi);
    color: #000;
}

.category-btn.active[data-category="animal"] {
    background: var(--color-animal);
    color: #000;
}

.category-btn.active[data-category="abstract"] {
    background: var(--color-abstract);
    color: #000;
}

/* 标签页样式 */
.tab-buttons {
    margin-bottom: 2rem;
    margin-top: -1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.tab-btn.active {
    background: linear-gradient(45deg, #ffd700, #daa520);
    color: #000;
    border: none;
}

.tab-content {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    position: absolute;
    width: 100%;
    left: 0;
}

.tab-content.active {
    display: block;
    opacity: 1;
    position: relative;
}

/* 自定义提示词构建器样式 */
.custom-prompt-builder {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2rem;
    margin-top: 0;
}

.builder-section {
    margin-bottom: 1.5rem;
}

.builder-section h3 {
    color: #ffd700;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.option-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.option-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.option-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: translateY(-2px);
}

.option-btn.selected {
    background: linear-gradient(45deg, #ffd700, #daa520);
    color: #000;
    border: none;
}

/* 自义卡片特殊样式 */
.custom-card {
    /* 移除之前的 border-color: #ffd700; */
}

.delete-btn {
    background: rgba(255, 99, 71, 0.2);
    color: #ff6347;
    border: 1px solid rgba(255, 99, 71, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.delete-btn:hover {
    background: rgba(255, 99, 71, 0.3);
    transform: translateY(-2px);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .option-group {
        justify-content: center;
    }
    
    .builder-section h3 {
        text-align: center;
    }
}

/* 地域筛选按钮样式 */
.region-filter {
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
}

.region-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.region-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: translateY(-2px);
}

.region-btn.active {
    background: linear-gradient(45deg, #ffd700, #daa520);
    color: #000;
    border: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .region-filter {
        flex-direction: column;
        align-items: center;
    }
}

/* 添加最后一个builder-section的额外下边距 */
.builder-section:last-of-type {
    margin-bottom: 3rem; /* 增加最后一个section和创建按钮之间的距离 */
}

#createCustomPrompt {
    margin-top: 2rem; /* 给创建按钮添加上边距 */
}

/* 修改自定义输入框布局样式 */
.custom-input-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.custom-input-group {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 1rem;
    width: 100%;  /* 确保组件占满容器宽度 */
}

.input-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-wrapper label {
    color: #ffd700;
    font-size: 0.9rem;
    text-align: left;
}

.input-wrapper textarea {
    width: 100%;
    height: 60px;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    resize: vertical;
    font-family: inherit;
    line-height: 1.4;
    box-sizing: border-box;  /* 关键修复：确保padding包含在宽度内 */
}

.input-wrapper textarea:focus {
    outline: none;
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.2);
}

@media (max-width: 768px) {
    .custom-input-section {
        padding: 1rem;
    }
}

/* 在文件末尾添加页脚样式 */
.footer {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem 0;
    text-align: center;
    margin-top: auto;
    width: 100%;
    border-top: 1px solid rgba(255, 215, 0, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer p {
    color: #888;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

/* 添加输入框和按钮的容器样式 */
.input-with-button {
    position: relative;
    display: flex;
    gap: 0.5rem;
}

.input-with-button textarea {
    flex: 1;
}

/* 翻译按钮样式 */
.translate-btn {
    height: 36px;
    padding: 0 1rem;
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    align-self: flex-start;
}

.translate-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: translateY(-2px);
}

.translate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* AI支持说明样式 */
.ai-support {
    text-align: center;
    margin: -1.5rem 0 2rem;
}

.ai-support p {
    color: #ffd700;
    font-size: 0.9rem;
    opacity: 0.8;
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 20px;
}

/* 添加标签页容器样式 */
main.container {
    position: relative;
}

/* 添加自定义提示词卡片区域的样式 */
#customPromptCards {
    margin-bottom: 4rem;
}

/* 确保第一次加载时没有卡片时不会有多余空间 */
#customPromptCards:empty {
    margin-bottom: 0;
}

/* 修改卡片区块样式 */
.card-section {
    margin-bottom: 200px;
    display: none; /* 默认隐藏 */
}

.card-section.has-cards {
    display: block; /* 当有卡片时显示 */
}

.create-section {
    margin-top: 100px; /* 保持区域的上边距 */
}

.create-section .section-title {
    margin-top: 100px; /* 标题下移100px */
    margin-bottom: 3rem; /* 保持与内容的间距 */
}

.section-title {
    color: #ffd700;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    margin-top: 100px; /* 添加上边距 */
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

/* 第一个标题不需要上边距 */
.card-section .section-title {
    margin-top: 0;
}

/* 基础标题样式 */
.section-title {
    color: #ffd700;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

/* 卡片区块标题样式 */
.card-section .section-title {
    margin-top: 0;
}

/* 创建区块标题样式 - 使用更具体的选择器提高优先级 */
.create-section > .section-title {
    margin-top: 100px !important; /* 确保这个样式会被应用 */
    margin-bottom: 3rem;
}

/* 创建区块整体样式 */
.create-section {
    margin-top: 100px;
}

/* 为新类别添加标签样式 */
.category-label[data-category="stilllife"] {
    background: rgba(126, 255, 155, 0.2);
    color: var(--color-stilllife);
}

/* 为新类别按钮添加样式 */
.category-btn[data-category="stilllife"] {
    border-color: var(--color-stilllife);
    color: var(--color-stilllife);
}

/* 新类别按钮的激活状态 */
.category-btn.active[data-category="stilllife"] {
    background: var(--color-stilllife);
    color: #000;
}

.loading-indicator {
    display: none;
    color: #ffd700;
    font-size: 1.2rem;
    margin: 2rem 0;
    text-align: center;
}

.loading-indicator.show {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.loading-indicator i {
    font-size: 1.5rem;
}

/* 为新的选项按钮添加样式 */
.option-btn[data-group="face"] {
    border-color: var(--color-face);
    color: var(--color-face);
}

.option-btn[data-group="expression"] {
    border-color: var(--color-expression);
    color: var(--color-expression);
}

.option-btn[data-group="hair"] {
    border-color: var(--color-hair);
    color: var(--color-hair);
}

.option-btn[data-group="clothing"] {
    border-color: var(--color-clothing);
    color: var(--color-clothing);
}

.option-btn[data-group="accessories"] {
    border-color: var(--color-accessories);
    color: var(--color-accessories);
}

.option-btn[data-group="pose"] {
    border-color: var(--color-pose);
    color: var(--color-pose);
}

/* 选中状态样式 */
.option-btn.selected[data-group="face"] {
    background: var(--color-face);
    color: #000;
}

.option-btn.selected[data-group="expression"] {
    background: var(--color-expression);
    color: #000;
}

.option-btn.selected[data-group="hair"] {
    background: var(--color-hair);
    color: #000;
}

.option-btn.selected[data-group="clothing"] {
    background: var(--color-clothing);
    color: #000;
}

.option-btn.selected[data-group="accessories"] {
    background: var(--color-accessories);
    color: #000;
}

.option-btn.selected[data-group="pose"] {
    background: var(--color-pose);
    color: #000;
}

/* 添加多选提示样式 */
.multi-select-hint {
    font-size: 0.8rem;
    color: #ffd700;
    opacity: 0.8;
    font-weight: normal;
    margin-left: 0.5rem;
}

/* 修改多选按钮的选中状态样式 */
.option-btn.multi-select {
    position: relative;
    padding-right: 2rem;
}

.option-btn.multi-select.selected::after {
    content: '✓';
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
}
 