* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #2e3351 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

header {
    text-align: center;
    margin-bottom: 0px;
    padding-bottom: 0px;
    border-bottom: 2px solid #f0f0f0;
}

header h1 {
    color: #ffffff;
    margin-bottom: 10px;
}

header p {
    color: #ffffff;
    font-size: 1.1em;
}

/* 主标题样式 */
.main-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.main-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    transform: rotate(30deg);
}

.header-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    /*border: 2px solid rgba(255, 255, 255, 0.3);*/
}

.logo-text h1 {
    font-size: 1.5em;
    margin: 0 0 5px 0;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.logo-text p {
    font-size: 0.9em;
    margin: 0;
    opacity: 0.9;
    font-weight: 500;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-badges {
    display: flex;
    gap: 8px;
}

.badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hamburger-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
}

.hamburger-menu:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mobile-menu {
    display: none;
    padding-top: 15px;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 桌面版导航 */
.desktop-nav {
    display: flex;
}

.desktop-nav.nav-collapsed {
    display: none !important;
}

/* 功能导航栏样式 */
.feature-nav {
    display: flex;
    gap: 5px;
    margin: 10px 0;
    padding: 10px 5px;
    background: #f7fafc;
    border-radius: 16px;
    overflow-x: auto;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 20px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 90px;
    /*background: white;
    border: 2px solid #e2e8f0;*/
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0; /* 允许flex项目缩小到内容大小以下 */
}

.nav-item:hover {
    background: #f0f7ff;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.15);
}

.nav-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.25);
}

.nav-item i {
    font-size: 24px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.nav-item.active i {
    color: white;
}

.nav-item span {
    font-size: 0.65rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-item.active span {
    color: white;
}

/* 通用区域标题样式 */
.section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
    
    padding-top: 8px;
}

.section-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-icon i {
    font-size: 24px;
    color: white;
}

.section-title h2 {
    margin: 0 0 5px 0;
    color: #2d3748;
    font-size: 1.5em;
    font-weight: 600;
}

.section-title p {
    margin: 0;
    color: #718096;
    font-size: 0.95em;
}

/* 功能区域样式 */
.feature-section {
    display: none;
}

.feature-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}


@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 上传区域样式 */
.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 3px dashed #cbd5e0;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f0f7ff;
}

.upload-action-row {
    margin-top: 12px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.upload-action-btn {
    border: 1px solid #667eea;
    background: #667eea;
    color: #fff;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.9rem;
    cursor: pointer;
}

.upload-action-btn.secondary {
    background: #fff;
    color: #334155;
    border-color: #cbd5e1;
}

.upload-action-btn:hover {
    filter: brightness(0.95);
}

.corner-tools {
    margin-top: 10px;
}

.corner-tools-label {
    display: block;
    margin-bottom: 8px;
    color: #475569;
    font-size: 0.9rem;
}

.corner-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.corner-btn {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 0.9rem;
}

.corner-btn.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* Step 卡片化（相框合成 / 文字相框合成） */
#frameMergeSection .step-card,
#textFrameSection .step-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid #dbe5f2;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14), 0 4px 10px rgba(37, 99, 235, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#frameMergeSection .step-card:hover,
#textFrameSection .step-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.2), 0 8px 18px rgba(37, 99, 235, 0.14);
}

#frameMergeSection .step-subcard,
#textFrameSection .step-subcard {
    border: 1px solid #e5edf8;
    background: #f8fbff;
    border-radius: 12px;
    padding: 12px;
}

.step-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.step-card-header.compact {
    margin-bottom: 8px;
}

.step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.step-card-header h3 {
    margin: 0;
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 700;
}

#frameMergeSection .preset-option,
#textFrameSection .preset-option {
    border: 1px solid #d5e3f5;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.08);
}

#frameMergeSection .preset-option:hover,
#textFrameSection .preset-option:hover {
    transform: translateY(-3px);
    border-color: #93c5fd;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.16);
}

#frameMergeSection .preset-option.active,
#textFrameSection .preset-option.active {
    border: 3px solid #2563eb;
    background: linear-gradient(180deg, #eff6ff 0%, #f8fbff 100%);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16), 0 14px 32px rgba(37, 99, 235, 0.24);
    transform: translateY(-2px);
}

#startFrameMergeBtn,
#startTextFrameBtn {
    background: linear-gradient(135deg, #ff7a18 0%, #ff3d81 100%);
    color: #fff;
    border: none;
    padding: 14px 34px;
    font-size: 16px;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.2px;
    box-shadow: 0 10px 22px rgba(255, 61, 129, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

#startFrameMergeBtn:hover:not(:disabled),
#startTextFrameBtn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(255, 61, 129, 0.34);
    filter: saturate(1.05);
}

#startFrameMergeBtn:disabled,
#startTextFrameBtn:disabled {
    background: #cbd5e1;
    box-shadow: none;
}

.upload-placeholder .upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.upload-placeholder p {
    font-size: 1.2em;
    margin-bottom: 10px;
    color: #4a5568;
}

.upload-placeholder small {
    color: #718096;
}

.preview-area {
    position: relative;
    margin-top: 20px;
    text-align: center;
}

#imagePreview {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 18px;
}

.question-section {
    margin-bottom: 30px;
}

.question-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
}

.question-textarea {
    width: 100%;
    padding: 14px;
    border: 1.5px solid #d8e0ec;
    border-radius: 12px;
    font-size: 16px;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    font-family: inherit;
    min-height: 110px;
    line-height: 1.6;
    background: #f7f9fc;
    color: #0f172a;
}

.question-textarea:hover {
    border-color: #c6d0e0;
    background: #f9fbff;
}

.question-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15), 0 0 0 3px rgba(102, 126, 234, 0.18);
    background: #ffffff;
}

.question-textarea::placeholder {
    color: #94a3b8;
}

/* WAN 控制卡片樣式（線稿 / 多圖 / 擴圖共用） */
.wan-sketch-options,
.wan-multi-options,
.wan-expand-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.wan-sketch-card,
.wan-multi-card,
.wan-expand-card {
    background: linear-gradient(180deg, #f9fbff 0%, #f5f7fb 100%);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    transition: transform 0.1s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.wan-sketch-card:hover,
.wan-multi-card:hover,
.wan-expand-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(102, 126, 234, 0.16);
    border-color: #cbd5e0;
}

.wan-sketch-card label,
.wan-multi-card label,
.wan-expand-card label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 700;
    color: #1e293b;
}

.wan-sketch-card label i,
.wan-multi-card label i,
.wan-expand-card label i {
    color: #667eea;
}

.wan-sketch-card input,
.wan-sketch-card select,
.wan-multi-card input,
.wan-multi-card select,
.wan-expand-card input,
.wan-expand-card select {
    width: 100%;
    margin-top: 2px;
}

.wan-sketch-card .checkbox-grid,
.wan-multi-card .checkbox-grid,
.wan-expand-card .checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
    margin: 4px 0 10px;
}

.wan-sketch-hint,
.wan-multi-hint,
.wan-expand-hint {
    margin-top: 8px;
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}

/* 統一下拉選單樣式 */
select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #d8e0ec;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    background: linear-gradient(180deg, #ffffff 0%, #f6f8fc 100%);
    color: #0f172a;
    appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
    background-image:
        linear-gradient(180deg, #ffffff 0%, #f6f8fc 100%),
        linear-gradient(45deg, transparent 50%, #94a3b8 50%),
        linear-gradient(135deg, #94a3b8 50%, transparent 50%);
    background-position:
        center,
        calc(100% - 22px) 50%,
        calc(100% - 16px) 50%;
    background-size:
        100% 100%,
        6px 6px,
        6px 6px;
    background-repeat: no-repeat;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

select:hover {
    border-color: #c6d0e0;
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.12);
}

select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.18), 0 0 0 3px rgba(102, 126, 234, 0.16);
    transform: translateY(-1px);
}

#questionInput {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    resize: vertical;
    transition: border-color 0.3s ease;
}

#questionInput:focus {
    outline: none;
    border-color: #667eea;
}

.prompt-guide {
    margin-top: 10px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.prompt-guide-title {
    font-weight: 700;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.prompt-guide-title i {
    color: #667eea;
}

.prompt-guide-list {
    margin: 6px 0 10px;
    padding-left: 18px;
    color: #4a5568;
    font-size: 14px;
    line-height: 1.5;
}

.prompt-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.prompt-pill {
    border: 1px solid #cbd5e0;
    background: #ffffff;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 13px;
    color: #2d3748;
    cursor: pointer;
    transition: all 0.2s ease;
}

.prompt-pill:hover {
    border-color: #667eea;
    color: #4c51bf;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.18);
}

.colorization-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.colorization-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
}

#colorizationMode {
    width: 100%;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    background: white;
}

.action-section {
    text-align: center;
    margin-bottom: 30px 0px;
    padding: 15px 0px;
}

#analyzeImageBtn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 36px;
    font-size: 16px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

#analyzeImageBtn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

#analyzeImageBtn:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#analyzeImageBtn:active:not(:disabled) {
    transform: translateY(0);
}

/* 为其他功能按钮添加类似样式 */
#generateImageBtn,
#generateImageV2Btn,
#startColorizeBtn,
#startColorizeMultipleBtn,
#startPaletteColorizeBtn,
#startPaletteColorizeMultipleBtn,
#startInpaintingBtn,
#startOutpaintingBtn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 36px;
    font-size: 16px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

#generateImageBtn:hover:not(:disabled),
#generateImageV2Btn:hover:not(:disabled),
#startColorizeBtn:hover:not(:disabled),
#startColorizeMultipleBtn:hover:not(:disabled),
#startPaletteColorizeBtn:hover:not(:disabled),
#startPaletteColorizeMultipleBtn:hover:not(:disabled),
#startInpaintingBtn:hover:not(:disabled),
#startOutpaintingBtn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

#generateImageBtn:disabled,
#generateImageV2Btn:disabled,
#startColorizeBtn:disabled,
#startColorizeMultipleBtn:disabled,
#startPaletteColorizeBtn:disabled,
#startPaletteColorizeMultipleBtn:disabled,
#startInpaintingBtn:disabled,
#startOutpaintingBtn:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    margin: 5px 0px;
}

#generateImageBtn:active:not(:disabled),
#generateImageV2Btn:active:not(:disabled),
#startColorizeBtn:active:not(:disabled),
#startColorizeMultipleBtn:active:not(:disabled),
#startPaletteColorizeBtn:active:not(:disabled),
#startPaletteColorizeMultipleBtn:active:not(:disabled),
#startInpaintingBtn:active:not(:disabled),
#startOutpaintingBtn:active:not(:disabled) {
    transform: translateY(0);
}

#analyzeBtn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 36px;
    font-size: 16px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#analyzeBtn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

#analyzeBtn:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
}

.result-section {
    background: #f7fafc;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    border-left: 4px solid #667eea;
}

.result-section h3 {
    color: #4a5568;
    margin-bottom: 16px;
}

.result-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 16px;
    line-height: 1.8;
    border: 1px solid #e2e8f0;
}

.result-meta {
    text-align: right;
    color: #718096;
    font-size: 0.9em;
}

.loading-section {
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    color: #718096;
}

footer a {
    color: #667eea;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* 页脚样式 */
.main-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    background: #f7fafc;
    border-radius: 12px;
    padding: 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-info p {
    margin: 0 0 5px 0;
    color: #718096;
    font-size: 0.95em;
}

.footer-info a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-info a:hover {
    color: #5a67d8;
    text-decoration: underline;
}

.footer-note {
    font-size: 0.85em;
    color: #a0aec0;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #718096;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #667eea;
}

/* 色板样式 */
.color-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    padding: 15px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.color-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}

.color-box {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    border: 2px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 5px;
}

.color-value {
    font-size: 0.8em;
    color: #4a5568;
    text-align: center;
    word-break: break-all;
    max-width: 60px;
}

/* 上色模式選擇器 */
.mode-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 12px;
}

.mode-option {
    flex: 1;
    padding: 20px;
    text-align: center;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.mode-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.mode-option.active {
    border-color: #667eea;
    background: #f0f7ff;
}

.mode-option i {
    display: block;
    font-size: 32px;
    color: #667eea;
    margin-bottom: 10px;
}

.mode-option span {
    font-weight: 600;
    color: #4a5568;
}

/* 風格預設 */
.style-presets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.preset-option {
    background: white;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.preset-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.preset-option.active {
    border-color: #667eea;
    background: #f0f7ff;
}

.preset-icon {
    width: 50px;
    height: 50px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 20px;
}

.preset-option span {
    display: block;
    font-weight: 500;
    color: #4a5568;
}

/* 編輯模式選擇器 */
.edit-mode-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.edit-mode-option {
    flex: 1;
    padding: 20px;
    text-align: center;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #e2e8f0;
}

.edit-mode-option:hover {
    border-color: #667eea;
}

.edit-mode-option.active {
    border-color: #667eea;
    background: #f0f7ff;
}

.edit-mode-option i {
    display: block;
    font-size: 32px;
    color: #667eea;
    margin-bottom: 10px;
}

.edit-mode-option span {
    font-weight: 600;
    color: #4a5568;
}

/* 編輯界面 */
.edit-interface {
    background: #f7fafc;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.edit-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.edit-upload-area {
    background: white;
    border-radius: 8px;
    padding: 20px;
}

.edit-upload-area .upload-area {
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.edit-upload-area .upload-area:hover {
    border-color: #667eea;
    background: #f0f7ff;
}

.edit-upload-area .upload-area i {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 15px;
}

.edit-upload-area .upload-area p {
    margin: 0;
    font-weight: 500;
    color: #4a5568;
}

.edit-instructions, .outpainting-options {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.outpainting-container {
    margin-bottom: 30px;
}

.coming-soon {
    text-align: center;
    padding: 60px;
    color: #718096;
}

.coming-soon i {
    font-size: 64px;
    margin-bottom: 20px;
    color: #cbd5e0;
}

.coming-soon h3 {
    margin-bottom: 10px;
    color: #4a5568;
}

/* 圖片檢查結果 */
.suitability-check {
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.suitability-result {
    background: white;
    border-radius: 6px;
    padding: 15px;
}

.suitability-score {
    display: inline-block;
    padding: 8px 20px;
    background: #38a169;
    color: white;
    border-radius: 20px;
    font-weight: bold;
    margin-bottom: 15px;
}

.suitability-details {
    margin-top: 15px;
}

.suitability-details ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.suitability-details li {
    margin-bottom: 5px;
    color: #4a5568;
}

img {
    max-width: 100%;
    height: auto;
}

/* 复选框样式 */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 15px;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e0;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label:hover .checkbox-custom {
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
}

.checkbox-text {
    color: #4a5568;
    font-weight: 500;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px 12px;
    margin-top: 8px;
    margin-bottom: 6px;
}

/* 色板选择器样式 */
.palette-selector {
    background: #f7fafc;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    border-left: 4px solid #667eea;
}

.palette-selector h3 {
    color: #4a5568;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.palette-selector .palette-actions {
    text-align: center;
    margin-top: 20px;
}

.palette-selector .palette-actions button {
    padding: 10px 20px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.palette-selector .palette-actions button:hover {
    background: #667eea;
    color: white;
}

/* 色板项目样式 */
.palette-item {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.palette-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.palette-item.selected {
    border-color: #667eea;
    background: #f0f7ff;
}

.palette-preview {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
    display: block;
}

.palette-colors {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.palette-color {
    flex: 1;
    min-width: 30px;
    height: 30px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.palette-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85em;
    color: #718096;
}

.palette-date {
    font-weight: 500;
}

/* 已选色板预览 */
.palette-preview-container {
    background: white;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e2e8f0;
}

.palette-preview-container h4 {
    margin: 0 0 10px 0;
    color: #4a5568;
    font-size: 1em;
}

.selected-palette-colors {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.selected-palette-color {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

/* 格式化结果样式 */
.formatted-result {
    line-height: 1.8;
    font-size: 1em;
}

.formatted-result p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.formatted-result h1 {
    font-size: 1.5em;
    color: #4a5568;
    margin: 20px 0 10px 0;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 5px;
}

.formatted-result h2 {
    font-size: 1.3em;
    color: #4a5568;
    margin: 18px 0 8px 0;
}

.formatted-result h3 {
    font-size: 1.1em;
    color: #4a5568;
    margin: 16px 0 6px 0;
}

.formatted-result ul {
    margin: 10px 0 10px 20px;
    list-style-type: disc;
}

.formatted-result li {
    margin-bottom: 5px;
    line-height: 1.5;
}

/* 历史记录样式 */
.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.history-item {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.history-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.history-header h4 {
    margin: 0;
    color: #4a5568;
    font-size: 1em;
    flex: 1;
}

.history-date {
    font-size: 0.8em;
    color: #718096;
    white-space: nowrap;
    margin-left: 10px;
}

.history-content {
    margin-bottom: 15px;
}

.history-result p {
    margin: 0 0 10px 0;
    line-height: 1.5;
    color: #4a5568;
    font-size: 0.9em;
}

.history-palette {
    margin-top: 10px;
}

.history-palette p {
    margin: 0 0 8px 0;
    font-weight: 500;
    color: #4a5568;
    font-size: 0.9em;
}

.history-actions {
    text-align: right;
}

.history-actions .secondary-btn {
    padding: 6px 12px;
    font-size: 0.85em;
}

.no-history {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.no-history i {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
    color: #cbd5e0;
}

.no-history p {
    margin: 10px 0;
    font-size: 1.1em;
}

.no-history .subtext {
    font-size: 0.9em;
    color: #a0aec0;
}

.history-actions {
    text-align: right;
    margin-top: 15px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        margin: 0;
        padding: 15px;
        box-shadow: none;
    }
    
    /* 移动端标题样式优化 */
    .main-header {
        padding: 15px;
        border-radius: 12px;
    }
    
    .header-content {
        flex-wrap: wrap;
    }
    
    .logo-container {
        gap: 10px;
    }
    
    .logo {
        width: 50px;
        height: 50px;
    }
    
    .logo-text h1 {
        font-size: 1.2em;
    }
    
    .logo-text p {
        font-size: 0.8em;
    }
    
    .header-right {
        display: none;
    }
    
    .hamburger-menu {
        display: block;
    }
    
    .desktop-nav {
        display: none;
    }
    
    .mobile-menu {
        display: block;
        padding-top: 15px;
    }
    
    .mobile-nav {
        display: flex;
        flex-direction: column;
        gap: 8px;
        max-height: 300px;
        overflow-y: auto;
    }
    
    .mobile-nav .nav-item {
        width: 100%;
        min-width: auto;
        padding: 12px 15px;
    }
    
    .feature-nav {
        display: none; /* 在移动端隐藏桌面版导航 */
    }
    
    .nav-item {
        padding: 12px 15px;
        min-width: 80px;
    }
    
    .nav-item span {
        font-size: 1.2em;
    }
    
    .section-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .section-icon {
        width: 50px;
        height: 50px;
        margin: 0 auto 10px;
    }
    
    .section-title h2 {
        font-size: 1.3em;
    }
    
    .section-title p {
        font-size: 0.85em;
    }
    
    footer {
        padding: 15px 10px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .footer-links {
        width: 100%;
        justify-content: center;
    }
    
    .history-grid {
        grid-template-columns: 1fr;
    }
    
    .edit-container {
        grid-template-columns: 1fr;
    }
    
    .style-presets {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mode-selector, .edit-mode-selector {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .main-header {
        padding: 10px;
    }
    
    .logo-container {
        gap: 8px;
    }
    
    .logo {
        width: 45px;
        height: 45px;
    }
    
    .logo-text h1 {
        font-size: 1.1em;
    }
    
    .logo-text p {
        font-size: 0.75em;
        display: none;
    }
    
    .mobile-nav .nav-item {
        padding: 12px 10px;
    }
    
    .nav-item {
        padding: 10px 12px;
        min-width: 70px;
    }
    
    .nav-item i {
        font-size: 40px;
    }
    
    .nav-item span {
        font-size: 1.2em;
    }
    
    .section-header {
        margin-bottom: 20px;
    }
    
    .section-icon {
        width: 45px;
        height: 45px;
    }
    
    .section-title h2 {
        font-size: 1.2em;
    }
}



.multiple-results-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.single-result-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    background-color: #f8fafc;
}

.result-header {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.result-header h3 {
    margin: 0;
    color: #2d3748;
}

.result-body {
    margin-bottom: 10px;
}

.result-footer {
    border-top: 1px solid #e2e8f0;
    padding-top: 10px;
    text-align: right;
    font-size: 0.9em;
    color: #718096;
}

@media (max-width: 768px) {
    .multiple-results-container {
        grid-template-columns: 1fr;
    }
    
    .single-result-card {
        min-width: auto;
    }
}