:root {
    --primary-color: #8A2BE2;
    --primary-light: #A45EE5;
    --primary-dark: #6A1CB9;
    --secondary-color: #FF6B6B;
    --accent-color: #4ECDC4;
    --bg-color: #FFFFFF;
    --bg-secondary: #F8F9FE;
    --text-color: #333333;
    --text-light: #777777;
    --border-color: #E5E5E5;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --success-color: #2ECC71;
    --warning-color: #F39C12;
    --error-color: #E74C3C;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --transition: 0.3s ease;
    --font-main: 'Noto Sans SC', sans-serif;
}

[data-theme="dark"] {
    --primary-color: #9D4EDD;
    --primary-light: #B14DF8;
    --primary-dark: #7B2CBF;
    --secondary-color: #FF5E78;
    --accent-color: #2ECDA8;
    --bg-color: #121212;
    --bg-secondary: #1E1E1E;
    --text-color: #F0F0F0;
    --text-light: #AAAAAA;
    --border-color: #333333;
    --shadow-color: rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color var(--transition), color var(--transition);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部导航栏 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav {
    display: flex;
    gap: 10px;
}

.nav-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 16px;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.nav-btn:hover {
    background-color: var(--bg-secondary);
}

.nav-btn.active {
    background-color: var(--primary-color);
    color: white;
}

/* 主要区域 */
main {
    position: relative;
    margin-bottom: 40px;
}

.panel {
    display: none;
    animation: fadeIn 0.5s ease;
}

.panel.active {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 创作区域 */
.prompt-container, .result-container {
    flex: 1;
    min-width: 300px;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: transform var(--transition), box-shadow var(--transition);
}

.prompt-container:hover, .result-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-color);
}

.prompt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.prompt-actions {
    display: flex;
    gap: 10px;
}

.prompt-actions .btn-icon {
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.prompt-actions .btn-icon:hover {
    background-color: var(--secondary-color-light);
    color: var(--primary-color);
}

/* 为清除按钮添加特殊样式 */
#clear-btn {
    color: var(--error-color);
}

#clear-btn:hover {
    background-color: rgba(var(--error-color-rgb), 0.1);
    color: var(--error-color);
}

/* 为随机按钮添加特殊样式 */
#random-prompt {
    color: var(--primary-color);
}

#random-prompt:hover {
    background-color: var(--primary-color-light);
}

/* 添加按钮点击效果 */
.btn-icon:active {
    transform: scale(0.95);
}

h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
}

textarea {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    font-size: 16px;
    resize: vertical;
    transition: border-color var(--transition);
    margin-bottom: 20px;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(138, 43, 226, 0.2);
}

.parameter-controls {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.parameter-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
}

select, input[type="number"], input[type="text"] {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    font-size: 15px;
    transition: border-color var(--transition);
}

select:focus, input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider {
    flex: 1;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-light), var(--primary-color));
    border-radius: 5px;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 0 5px var(--shadow-color);
    transition: transform 0.2s;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.slider-value {
    min-width: 30px;
    text-align: center;
    font-weight: 500;
}

.number-input {
    display: flex;
    align-items: center;
}

.number-input input {
    width: 60px;
    text-align: center;
    -moz-appearance: textfield;
    border-radius: 0;
    border-left: none;
    border-right: none;
}

.number-input input::-webkit-outer-spin-button,
.number-input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.number-input button {
    width: 35px;
    height: 38px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition);
}

.number-input .decrease {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.number-input .increase {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.number-input button:hover {
    background-color: var(--bg-secondary);
}

/* 高级选项样式 */
.advanced-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    margin-top: 1rem;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.advanced-toggle:hover {
    color: #333;
}

.advanced-toggle i {
    transition: transform 0.3s ease;
}

.advanced-options {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    opacity: 0;
}

.advanced-options.hidden {
    max-height: 0;
    opacity: 0;
}

.advanced-options:not(.hidden) {
    max-height: 500px;
    opacity: 1;
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.advanced-options .parameter-row {
    margin-bottom: 1rem;
}

.advanced-options .parameter-row:last-child {
    margin-bottom: 0;
}

.advanced-options textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    resize: vertical;
    font-family: inherit;
}

.advanced-options input[type="number"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-family: inherit;
}

.advanced-options .help-text {
    font-size: 12px;
    color: var(--text-light);
    font-weight: normal;
    margin-left: 5px;
}

.advanced-help {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border-color);
}

.advanced-help p {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
}

.generate-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.primary-btn {
    flex: 1;
    padding: 12px 20px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform var(--transition), box-shadow var(--transition);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(138, 43, 226, 0.3);
}

.secondary-btn {
    padding: 12px;
    background-color: var(--bg-color);
    color: var(--text-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.secondary-btn:hover {
    color: var(--error-color);
    border-color: var(--error-color);
}

.btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-color);
    cursor: pointer;
    transition: all var(--transition);
}

.btn-icon:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 结果区域 */
.image-display {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    background-color: var(--bg-color);
    border: 1px dashed var(--border-color);
    margin-bottom: 15px;
}

.image-display img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.image-display:hover img {
    transform: scale(1.03);
}

.placeholder-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.placeholder-content i {
    font-size: 50px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.placeholder-content p {
    font-size: 16px;
}

.result-actions {
    display: flex;
    gap: 10px;
}

.status-container {
    padding: 15px;
    border-radius: var(--radius-md);
    background-color: var(--bg-color);
    text-align: center;
    margin-top: 20px;
}

.loading-animation {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
}

.loading-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--primary-color);
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

.progress-bar {
    height: 6px;
    background-color: var(--border-color);
    border-radius: 3px;
    margin-top: 15px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    width: 0%;
    border-radius: 3px;
    transition: width 0.3s linear;
}

/* 画廊区域 */
#gallery {
    flex-direction: column;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.gallery-actions {
    display: flex;
    gap: 10px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    width: 100%;
}

.gallery-item {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.gallery-image {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* 1:1 比例 */
}

.gallery-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.05);
}

.image-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
}

.gallery-item:hover .image-actions {
    opacity: 1;
}

.image-actions .btn-icon {
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.image-actions .btn-icon:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* 画廊提示词样式 */
.gallery-prompt {
    padding: 10px 12px;
    font-size: 0.85rem;
    color: var(--text-color);
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    position: relative;
    min-height: 40px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.gallery-prompt p {
    margin: 0;
    line-height: 1.4;
    word-break: break-word;
    display: inline;
}

.prompt-expand-btn {
    position: absolute;
    right: 5px;
    bottom: 5px;
    width: 24px;
    height: 24px;
    background-color: transparent;
    color: var(--primary-color);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    z-index: 10;
    opacity: 0.8;
    transition: opacity 0.2s, transform 0.2s;
}

.prompt-expand-btn:hover {
    opacity: 1;
    transform: scale(1.1);
    background-color: var(--bg-secondary);
}

/* 全屏查看提示词对话框 */
.prompt-fullview {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}

.prompt-fullview.show {
    opacity: 1;
    visibility: visible;
}

.prompt-fullview-content {
    background-color: var(--bg-color);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    padding: 20px;
    position: relative;
    overflow-y: auto;
}

.prompt-fullview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.prompt-fullview-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.prompt-fullview-close {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 20px;
    cursor: pointer;
}

.prompt-fullview-body {
    font-size: 16px;
    line-height: 1.6;
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 50%);
    opacity: 0;
    transition: opacity var(--transition);
    display: flex;
    align-items: flex-end;
    padding: 15px;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-actions {
    display: flex;
    gap: 10px;
}

.gallery-item-actions button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.gallery-item-actions button:hover {
    background-color: var(--primary-color);
    color: white;
}

.empty-gallery {
    grid-column: 1 / -1;
    height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    background-color: var(--bg-secondary);
}

.empty-gallery i {
    font-size: 50px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* 设置区域 */
#settings {
    flex-direction: column;
    max-width: 600px;
    margin: 0 auto;
}

.settings-group {
    margin-bottom: 30px;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.settings-group h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-item label {
    font-size: 16px;
    color: var(--text-color);
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: .4s;
    border-radius: 34px;
}

.switch .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.switch input:checked + .slider {
    background-color: var(--primary-color);
}

.switch input:checked + .slider:before {
    transform: translateX(24px);
}

.about-info {
    padding: 10px 0;
    line-height: 1.8;
}

/* 通知组件 */
.notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--bg-color);
    box-shadow: 0 5px 15px var(--shadow-color);
    border-left: 4px solid var(--primary-color);
    padding: 15px 20px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateX(100%);
    opacity: 0;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification i {
    font-size: 18px;
    color: var(--primary-color);
}

.notification.success {
    border-left-color: var(--success-color);
}

.notification.success i {
    color: var(--success-color);
}

.notification.error {
    border-left-color: var(--error-color);
}

.notification.error i {
    color: var(--error-color);
}

/* 模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--bg-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    margin: 0;
}

.modal-body {
    padding: 20px;
}

.share-preview {
    margin-bottom: 20px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.share-preview img {
    width: 100%;
    display: block;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.share-btn {
    padding: 12px;
    border: none;
    border-radius: var(--radius-md);
    background-color: var(--bg-secondary);
    color: var(--text-color);
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition);
}

.share-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .app-container {
        padding: 0 15px;
    }
    
    header {
        flex-direction: column;
        gap: 15px;
    }
    
    .panel.active {
        flex-direction: column;
    }
    
    .parameter-controls {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* 通用工具类 */
.hidden {
    display: none !important;
}

/* 动画 */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(138, 43, 226, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(138, 43, 226, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(138, 43, 226, 0);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* 添加启动遮罩样式 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-logo {
    font-size: 60px;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.loading-text {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    letter-spacing: 1px;
}

.loading-spinner {
    display: inline-block;
}

.spinner-circle {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 图像导航样式 */
.image-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    gap: 15px;
}

.nav-arrow-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background-color: var(--bg-secondary);
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    box-shadow: 0 2px 5px var(--shadow-color);
}

.nav-arrow-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.image-counter {
    font-size: 14px;
    color: var(--text-light);
    min-width: 40px;
    text-align: center;
}

/* 调整创作结果标题和下载按钮 */
.result-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.result-header h2 button {
    margin-left: 8px;
    padding: 0;
    background-color: transparent;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: all 0.2s ease;
}

.result-header h2 button:hover {
    background-color: rgba(var(--primary-color-rgb), 0.1);
}

.result-header h2 button:active {
    transform: scale(0.95);
}

/* 下载提示样式 */
.download-tip {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    animation: slide-in 0.3s ease-out;
}

.download-tip-content {
    background-color: var(--primary-color);
    color: white;
    border-radius: 8px;
    padding: 15px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 300px;
}

/* 不同类型提示的样式 */
.download-tip-error {
    background-color: #e74c3c;
}

.download-tip-info {
    background-color: #3498db;
}

.download-tip-success {
    background-color: #2ecc71;
}

.download-tip-content p {
    margin: 5px 0;
    display: flex;
    align-items: center;
}

.download-tip-content p i {
    margin-right: 8px;
}

.tip-small {
    font-size: 0.85rem;
    opacity: 0.9;
}

.tip-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

.tip-remember {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
}

.tip-remember input {
    margin-right: 5px;
}

.tip-close {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.tip-close:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* 下载按钮组容器 */
.download-button-group {
    display: flex;
    margin-left: 10px;
}

/* 重新定义下载按钮样式 */
#download-btn {
    display: flex !important;
    flex-wrap: nowrap;
    margin-left: 10px;
}

#download-btn .btn {
    margin: 0;
    height: 36px;
}

.download-current {
    border-radius: 4px 0 0 4px !important;
    margin-right: 1px !important;
    flex: 1;
    white-space: nowrap;
    font-size: 0.9rem;
    padding: 0 10px !important;
}

.download-all {
    border-radius: 0 4px 4px 0 !important;
    width: 40px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.download-all i {
    font-size: 1.1rem;
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

@keyframes slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 预设提示词样式 */
.prompt-presets {
    margin: 15px 0 20px 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-color);
    padding: 15px;
    box-shadow: 0 2px 6px var(--shadow-color);
}

.presets-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.presets-title h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.category-tab {
    padding: 6px 12px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-color);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-tab:hover {
    background-color: var(--primary-light);
    color: white;
}

.category-tab.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.preset-button {
    padding: 8px 12px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-color);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preset-button:hover {
    background-color: var(--primary-light);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 3px 6px var(--shadow-color);
}

@media (max-width: 768px) {
    .category-tabs {
        overflow-x: auto;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }
    
    .preset-buttons {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px;
    }
}

/* 图片预览模态框样式 */
.image-preview-content {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-preview-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible; /* 允许图片显示超出容器 */
}

#preview-image {
    /* 重要：不设置max-width/max-height，让JS动态控制尺寸 */
    transform-origin: center center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 32px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.modal-close:hover {
    color: #ff6b6b;
}

/* 暗色主题适配 */
[data-theme="dark"] .modal-close {
    color: #ffffff;
}

[data-theme="dark"] .modal-close:hover {
    color: #ff6b6b;
}

/* 缩放指示器样式 */
.zoom-indicator {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.zoom-indicator.show {
    opacity: 1;
} 