/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    overflow-x: hidden;
}

/* 顶部导航栏 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #fff;
    border-bottom: 1px solid #e8ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.logo-text {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-upgrade {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 8px 24px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-upgrade:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.user-menu {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f5f7fa;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.user-menu:hover {
    background: #e8ecef;
}

/* 容器 */
.container {
    display: flex;
    padding-top: 60px;
    min-height: 100vh;
}

/* 左侧导航栏 */
.sidebar {
    position: fixed;
    left: 0;
    top: 60px;
    bottom: 0;
    width: 240px;
    background: #fff;
    border-right: 1px solid #e8ecef;
    display: flex;
    flex-direction: column;
    padding: 16px 0;
    overflow-y: auto;
}

/* 侧边栏滚动条样式 */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f5f7fa;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #d0d7de;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #a8b3c1;
}

.nav {
    flex: 1;
}

/* 首页菜单项样式 */
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border-left: 3px solid transparent;
    margin-bottom: 8px;
}

.nav-item:hover {
    background: #f5f7fa;
    color: #333;
}

.nav-item.active {
    background: #f0f5ff;
    color: #4ecdc4;
    border-left-color: #4ecdc4;
    font-weight: 500;
}

.nav-icon {
    font-size: 18px;
}

.nav-text {
    font-size: 14px;
}

/* 菜单分组 */
.menu-section {
    margin-bottom: 8px;
}

.menu-title {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    user-select: none;
}

.menu-title:hover {
    background: #f5f7fa;
}

.menu-icon {
    font-size: 18px;
}

.menu-text {
    flex: 1;
    font-size: 15px;
}

.menu-arrow {
    font-size: 10px;
    color: #999;
    transition: transform 0.3s;
}

.menu-section.active .menu-arrow {
    transform: rotate(-180deg);
}

/* 二级菜单 */
.submenu {
    max-height: 0;
    overflow: hidden;
    background: #f8f9fa;
    transition: max-height 0.3s ease;
}

.submenu.active {
    max-height: 1000px;
}

.submenu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px 10px 50px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.submenu-item:hover {
    background: #e9ecef;
    color: #333;
}

.submenu-item.active {
    background: #f0f5ff;
    color: #4ecdc4;
    border-left-color: #4ecdc4;
    font-weight: 500;
}

.submenu-icon {
    font-size: 16px;
}

.submenu-text {
    font-size: 14px;
}

.sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid #e8ecef;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.sidebar-link:hover {
    background: #f5f7fa;
    color: #333;
}

/* 主内容区 */
.main-content {
    margin-left: 240px;
    flex: 1;
    padding: 32px;
}

/* 首页样式 */
.home-page {
    padding: 40px;
    animation: fadeIn 0.5s;
}

.home-header {
    text-align: center;
    margin-bottom: 40px;
}

.home-title {
    font-size: 36px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.home-subtitle {
    font-size: 16px;
    color: #666;
}

/* 筛选标签 */
.filter-tags {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-tag {
    padding: 8px 20px;
    border: 1px solid #d0d7de;
    border-radius: 20px;
    background: #fff;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-tag:hover {
    border-color: #4ecdc4;
    color: #4ecdc4;
}

.filter-tag.active {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    color: #fff;
    border-color: transparent;
}

/* 案例网格 */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.case-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid #e8ecef;
    cursor: pointer;
}

.case-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.case-image {
    position: relative;
    width: 100%;
    height: 320px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.case-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.case-card:hover .case-image img {
    transform: scale(1.05);
}

.case-overlay {
    position: absolute;
    top: 12px;
    left: 12px;
}

.case-tag {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.case-info {
    padding: 16px;
}

.case-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.case-desc {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.5;
}

.case-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.case-time {
    font-size: 12px;
    color: #999;
}

/* 欢迎页面 */
.welcome-page {
    text-align: center;
    padding: 120px 40px;
    animation: fadeIn 0.5s;
}

.welcome-icon {
    font-size: 100px;
    margin-bottom: 30px;
    animation: bounce 2s infinite;
}

.welcome-title {
    font-size: 32px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-text {
    font-size: 18px;
    color: #666;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}


/* 功能页面样式 */
.function-page {
    padding: 20px 40px 40px;
    max-width: 1400px;
    margin: 0 auto;
    animation: fadeIn 0.5s;
}

.function-header {
    text-align: center;
    margin-bottom: 30px;
}

.function-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.function-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.function-desc {
    font-size: 14px;
    color: #999;
}

/* 编辑器容器 */
.editor-container {
    display: flex;
    gap: 30px;
    min-height: 500px;
}

/* 左侧预览区 */
.editor-preview {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-box {
    width: 100%;
    min-height: 500px;
    background: #f8f9fa;
    border: 2px dashed #d0d7de;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-box:hover {
    border-color: #4ecdc4;
    background: #f0f9ff;
}

.upload-placeholder {
    text-align: center;
    padding: 40px;
}

.upload-icon-large {
    font-size: 64px;
    margin-bottom: 20px;
}

.upload-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.upload-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.upload-formats {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

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

.link-text {
    color: #4ecdc4;
    text-decoration: none;
}

.link-text:hover {
    text-decoration: underline;
}

.image-preview {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 16px;
    overflow: hidden;
}

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

/* 右侧工具栏 */
.editor-toolbar {
    width: 280px;
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.toolbar-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.toolbar-section:last-of-type {
    border-bottom: none;
}

/* 背景模式切换标签 */
.mode-tabs {
    display: flex;
    gap: 8px;
    background: #f5f7fa;
    padding: 4px;
    border-radius: 8px;
}

.mode-tab {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 13px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.mode-tab:hover {
    color: #333;
}

.mode-tab.active {
    background: #fff;
    color: #667eea;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* 精修参数部分 */
.section-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.param-item {
    margin-bottom: 20px;
}

.param-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.param-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
}

.param-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e8ecef;
    color: #999;
    font-size: 11px;
    cursor: help;
    font-style: normal;
}

.param-value {
    width: 50px;
    padding: 4px 8px;
    border: 1px solid #e8ecef;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
    background: #f8f9fa;
}

.param-slider {
    width: 100%;
    height: 6px;
    background: #e8ecef;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.param-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.param-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.param-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.param-icon {
    font-size: 18px;
    margin-right: 4px;
}

.expand-arrow {
    margin-left: auto;
    color: #999;
    font-size: 18px;
    transition: transform 0.3s;
}

.toolbar-item-btn.expanded .expand-arrow {
    transform: rotate(90deg);
}

.panel-hint {
    font-size: 12px;
    color: #999;
    margin-bottom: 12px;
    line-height: 1.5;
}

.btn-small {
    width: 100%;
    padding: 8px;
    border: 1px solid #e8ecef;
    background: #fff;
    color: #666;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-small:hover {
    border-color: #4ecdc4;
    color: #4ecdc4;
}

/* 颜色选择器 */
.color-palette {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.color-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #e8ecef;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.color-btn:hover {
    border-color: #4ecdc4;
    transform: scale(1.1);
}

.color-btn.active {
    border-color: #4ecdc4;
    border-width: 3px;
    box-shadow: 0 0 0 2px rgba(78, 205, 196, 0.2);
}

.color-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #e8ecef;
}

.color-circle.transparent {
    background: linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%),
                linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%);
    background-size: 8px 8px;
    background-position: 0 0, 4px 4px;
    border-radius: 4px; /* 透明色用方形 */
}

.color-circle.rainbow-gradient {
    background: linear-gradient(135deg, 
        #ff0000 0%, 
        #ff7f00 16.67%, 
        #ffff00 33.33%, 
        #00ff00 50%, 
        #0000ff 66.67%, 
        #4b0082 83.33%, 
        #9400d3 100%
    );
    border-radius: 8px; /* 彩虹渐变用圆角方形 */
}

.color-circle.multicolor {
    background: conic-gradient(from 0deg, red, yellow, lime, aqua, blue, magenta, red);
}

.color-btn-add {
    width: 40px;
    height: 40px;
    border: 2px dashed #d0d7de;
    border-radius: 50%;
    background: #fff;
    color: #999;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
}

.color-btn-add:hover {
    border-color: #4ecdc4;
    color: #4ecdc4;
}

/* 工具栏项 */
.toolbar-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toolbar-icon {
    font-size: 20px;
}

.toolbar-label {
    flex: 1;
    font-size: 14px;
    color: #333;
}

/* 开关按钮 */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    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: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
}

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

/* 工具栏按钮项 */
.toolbar-item-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.toolbar-item-btn:hover {
    background: #e8ecef;
}

/* 调整面板 */
.adjust-panel {
    margin-top: 12px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.adjust-slider {
    margin-bottom: 16px;
}

.adjust-slider:last-child {
    margin-bottom: 0;
}

.adjust-slider label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.adjust-slider input[type="range"] {
    width: 100%;
    height: 4px;
    background: #d0d7de;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.adjust-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #4ecdc4;
    border-radius: 50%;
    cursor: pointer;
}

.size-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.size-input-group input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

.size-input-group span {
    color: #999;
}

/* 处理按钮 */
.btn-process {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.btn-process:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-process:disabled {
    background: #e8e8e8;
    color: #999;
    cursor: not-allowed;
}

.btn-advanced {
    width: 100%;
    padding: 12px;
    background: #fff;
    color: #666;
    border: 2px solid #e8ecef;
    border-radius: 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.btn-advanced:hover {
    border-color: #4ecdc4;
    color: #4ecdc4;
}

.btn-icon {
    font-size: 16px;
}

.btn-text {
    font-size: 14px;
}

.toolbar-tips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tip-item {
    padding: 4px 12px;
    background: #f0f5ff;
    color: #667eea;
    font-size: 12px;
    border-radius: 12px;
}

.upload-area {
    border: 2px dashed #d0d7de;
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    background: #f5f7fa;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 24px;
}

.upload-area:hover {
    border-color: #4ecdc4;
    background: #f0f9ff;
}

.upload-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

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

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

.btn-upload {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 16px;
}

.btn-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.4);
}

.btn-upload:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.result-area {
    display: none;
    margin-top: 32px;
}

.result-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
}

.result-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.result-item {
    background: #f5f7fa;
    border-radius: 12px;
    padding: 16px;
}

.result-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.result-image {
    width: 100%;
    border-radius: 8px;
    background: #fff;
}

.loading {
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4ecdc4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

/* 加载层覆盖 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.loading-content {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    min-width: 300px;
}

.loading-progress {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e8ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ecdc4 0%, #44a08d 100%);
    transition: width 0.3s;
    width: 0%;
}

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

/* 结果展示区域 */
.result-section {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: slideUp 0.3s;
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8ecef;
}

.result-title {
    font-size: 24px;
    font-weight: 600;
    color: #27ae60;
    margin: 0;
}

.btn-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f5f7fa;
    border-radius: 50%;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    background: #e8ecef;
    color: #333;
}

.result-comparison {
    display: flex;
    gap: 24px;
    align-items: center;
    margin-bottom: 24px;
}

.result-image-box {
    flex: 1;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
}

.result-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    font-weight: 500;
}

.result-img {
    width: 100%;
    border-radius: 8px;
    display: block;
}

.result-arrow {
    font-size: 32px;
    color: #4ecdc4;
    flex-shrink: 0;
}

.result-actions {
    display: flex;
    gap: 16px;
}

.btn-download,
.btn-reset {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-download {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    color: #fff;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(78, 205, 196, 0.4);
}

.btn-reset {
    background: #f5f7fa;
    color: #666;
}

.btn-reset:hover {
    background: #e8ecef;
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* 响应式 */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    
    .main-content {
        margin-left: 60px;
    }
    
    .nav-text,
    .sidebar-link span:last-child {
        display: none;
    }
    
    
    .result-images {
        grid-template-columns: 1fr;
    }
}

/* 参数设置区域增强样式 */
#parameterSection {
    background: #f8f9fb;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

#parameterSection .section-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

#parameterContainer {
    display: block;
}

.param-control {
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.param-control:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

select.param-control {
    cursor: pointer;
    background-color: #fff;
}

input[type="number"].param-control {
    background-color: #fff;
}

input[type="range"].param-control {
    cursor: pointer;
}

input[type="checkbox"].param-control {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* 参数提示动画 */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== 用户认证相关样式 ==================== */

/* 用户认证区域 */
.user-auth-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e8ecef;
}

/* 认证按钮组 */
.auth-btns {
    display: flex;
    gap: 8px;
}

.auth-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.login-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.register-btn {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #e8ecef;
}

.register-btn:hover {
    background: #e8ecef;
}

/* 已登录用户信息 */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-radius: 8px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-status {
    font-size: 12px;
    color: #48bb78;
    margin-top: 2px;
}

.logout-btn {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #e8ecef;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
}

.logout-btn:hover {
    background: #f56565;
    border-color: #f56565;
    transform: scale(1.1);
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid #e8ecef;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #f56565;
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group:last-of-type {
    margin-bottom: 0;
}

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

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e8ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    outline: none;
}

.form-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input::placeholder {
    color: #999;
}

.form-tips {
    margin: 16px 0;
    text-align: center;
}

.tip-link {
    font-size: 13px;
    color: #667eea;
    text-decoration: none;
}

.tip-link:hover {
    text-decoration: underline;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

/* 消息提示动画 */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-width: none;
    }
    
    .modal-header,
    .modal-body {
        padding: 20px;
    }
    
    .auth-btn {
        font-size: 12px;
        padding: 8px 6px;
    }
    
    .user-info {
        padding: 10px;
    }
    
    .user-avatar {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .user-name {
        font-size: 13px;
    }
    
    .user-status {
        font-size: 11px;
    }
}

/* 历史记录按钮样式 */
.btn-history {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.btn-history:hover {
    background: #f5f5f5;
    border-color: #667eea;
    color: #667eea;
}

.btn-history .btn-icon {
    font-size: 16px;
}

/* 历史记录侧边面板 */
.history-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: #fff;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    z-index: 10001;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.history-panel.active {
    right: 0;
}

.history-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.history-panel-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.btn-close-panel {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s;
}

.btn-close-panel:hover {
    background: #f5f5f5;
    color: #333;
}

.history-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.history-panel-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-panel-footer {
    padding: 16px 20px;
    border-top: 1px solid #e0e0e0;
}

.btn-clear-history {
    width: 100%;
    padding: 10px;
    background: #fff;
    border: 1px solid #ff4d4f;
    color: #ff4d4f;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-clear-history:hover {
    background: #ff4d4f;
    color: #fff;
}

/* 历史记录面板遮罩 */
.history-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.history-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 历史记录样式 */
.history-list {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 12px;
}

.history-empty {
    text-align: center;
    color: #999;
    padding: 20px;
    font-size: 14px;
}

.history-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.history-item:hover {
    background: #f0f0f0;
    transform: translateX(-2px);
}

.history-item-thumb {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.history-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.history-item-name {
    font-size: 13px;
    color: #333;
    font-weight: 500;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-item-time {
    font-size: 11px;
    color: #999;
}

.history-item-function {
    font-size: 11px;
    color: #667eea;
    background: #f0f0ff;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 4px;
}
