/* ============================================
   PicPrompt 主界面样式 - 完整版本
   ============================================ */

/* 全局重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(180deg, #f5f7ff 0%, #e8ecf8 100%);
    color: #1a1a2e;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   推广按钮（页面主按钮）
   ============================================ */
.promo-btn {
    border: none;
    color: #4a5568;
    text-decoration: none;
    font-size: clamp(5px, 0.9vw, 15px);
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 0;
    border-radius: 8px;
    background: #f5f7fff2;
}
.promo-btn:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}


/* 遮罩层 */
.modal-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.2s, opacity 0.2s ease;

}

.modal-mask.active {
    visibility: visible;
    opacity: 1;

}
/* 弹窗容器 */
.invite-modal {
    background-color: #ffffff;
    width: 90%;
    max-width: 520px;
    max-height: 85vh;
    border-radius: 32px;
    box-shadow: 0 30px 45px -20px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    animation: modalAppear 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);

}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
/* 弹窗主体滚动区域 */
.modal-body-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 24px 22px 28px;
    scrollbar-width: thin;
}
.modal-body-scroll::-webkit-scrollbar {
    width: 5px;
}
.modal-body-scroll::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}
.modal-body-scroll::-webkit-scrollbar-thumb {
    background: #c0c6d0;
    border-radius: 10px;
}
/* 头部区域 */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}
.modal-header h2 {
    font-size: 1.7rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1f6e43, #339966);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -0.3px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.close-btn {
    background: #f1f4f9;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    color: #5c6f87;
    transition: all 0.2s;
}
.close-btn:hover {
    background: #e4e9f0;
    color: #2c3e4e;
    transform: rotate(90deg);
}
/* 积分卡片双栏布局 */
.reward-cards {
    display: flex;
    gap: 14px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.card-item {
    flex: 1;
    background: #f8fafd;
    border-radius: 24px;
    padding: 14px 12px;
    text-align: center;
    border: 1px solid #eef2f8;
    transition: transform 0.1s;
}
.points-badge1 {
    font-size: 2rem;
    font-weight: 800;
    color: #1f6e43;
    line-height: 1;
}
.points-label {
    font-size: 0.85rem;
    color: #3a546d;
    margin-top: 8px;
    font-weight: 500;
}
/* 分享链接区域 */
.share-section {
    margin-bottom: 28px;
}
.section-title {
    font-weight: 600;
    font-size: 1rem;
    color: #1f2f40;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.link-box {
    display: flex;
    align-items: center;
    background: #f2f5fa;
    border-radius: 18px;
    padding: 6px 6px 6px 18px;
    gap: 8px;
    flex-wrap: wrap;
}
.link-input {
    flex: 1;
    background: transparent;
    border: none;
    font-size: 0.8rem;
    color: #2c3e50;
    font-family: monospace;
    padding: 10px 0;
    outline: none;
    word-break: break-all;
    width: 100%;
}
.copy-link-btn {
    background: #1f6e43;
    border: none;
    padding: 8px 18px;
    border-radius: 40px;
    color: white;
    font-weight: 500;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.copy-link-btn:hover {
    background: #0e572f;
}
/* 奖励规则 */
.rule-section {
    background: #fefaf5;
    border-radius: 24px;
    padding: 16px 18px;
    border: 1px solid #faefe3;
}
.rule-title {
    font-weight: 700;
    color: #bd7d3a;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
}
.rule-desc {
    font-size: 0.8rem;
    line-height: 1.45;
    color: #3f4d5e;
}
.rule-highlight {
    background: #f1e5d3;
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 600;
    color: #bd7d3a;
    margin-right: 6px;
}
.separator {
    height: 1px;
    background: #eef2f6;
    margin: 20px 0 10px;
}
/* toast 提示 */
.toast-message {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 2000;
    transition: all 0.2s;
    opacity: 0;
    visibility: hidden;
    white-space: nowrap;
    pointer-events: none;
}
.toast-message.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   充值/客服按钮
   ============================================ */
/* 模态遮罩层 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.2s, opacity 0.25s ease;

}
.modal-overlay.active {
    visibility: visible;
    opacity: 1;
}
.modal-overlay.active {
    visibility: visible;
    opacity: 1;
}
/* 弹窗卡片 */
.modal-container {
    background: #ffffff;
    width: 90%;
    max-width: 560px;
    border-radius: 48px;
    box-shadow: 0 40px 70px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.2);
    transform: scale(0.96);
    transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    position: relative;
    overflow: hidden;

}
.modal-overlay.active .modal-container {
    transform: scale(1);
}
/* 关闭按钮 (X) */
.close-modal {
    position: absolute;
    top: 22px;
    right: 24px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    font-size: 26px;
    line-height: 1;
    width: 36px;
    height: 36px;
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #5b5e71;
    transition: all 0.2s;
    z-index: 10;
    backdrop-filter: blur(2px);
}
.close-modal:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1f1f2f;
    transform: rotate(90deg);
}
/* 弹窗主体内容 (左右布局) */
.modal-content {
    padding: 32px 28px 36px 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}
/* 左侧信息区 */
.info-area {
    flex: 2;
    min-width: 180px;
}
.vip-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.vip-title .crown-icon {
    font-size: 28px;
}
.vip-title h2 {
    font-size: 1.7rem;
    font-weight: 700;
    background: linear-gradient(135deg, #c084fc, #3b82f6);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -0.3px;
}
.staff-name {
    background: #f0eefb;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #5b21b6;
    margin-bottom: 18px;
}
.desc-text {
    color: #2d3a4b;
    font-size: 0.9rem;
    line-height: 1.45;
    margin: 12px 0 18px 0;
    padding-right: 8px;
}
.online-time {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    background: #f8fafc;
    padding: 8px 14px;
    border-radius: 60px;
    color: #3b4e62;
    width: fit-content;
    margin-top: 8px;
}
.online-time span:first-child {
    font-weight: 500;
}
/* 右侧二维码区域 */
.qr-area {
    flex: 1.2;
    min-width: 140px;
    border-radius: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: #fefefe;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.02), 0 0 0 1px #f0f0f0;
}
.qr-wrapper {
    background: white;
    padding: 10px;
    border-radius: 24px;
    box-shadow: 0 12px 22px -8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}
.qr-code-img {
    width: 140px;
    height: 140px;
    display: block;
    margin: 0 auto;
    border-radius: 16px;
    background: #fff;
}
.qr-tip {
    margin-top: 14px;
    font-size: 0.75rem;
    color: #f97316;
    background: #fff4e6;
    padding: 6px 12px;
    border-radius: 40px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* 禁止滚动 */
body.modal-open {
    overflow: hidden;
}
/* ============================================
   顶部导航栏
   ============================================ */
.top-navbar {
    background: rgba(245, 247, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(200, 210, 230, 0.6);
    padding: 0 32px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #1a1a2e;
    transition: all 0.2s ease;
}

.logo:hover {
    opacity: 0.8;
}

.logo img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
}

.logo span {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-center {
    display: flex;
    align-items: center;
    gap: 32px;
    flex: 1;
    justify-content: center;
}

.nav-link {
    color: #4a5568;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 8px 16px;
    border-radius: 8px;
}

.nav-link:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 200px;
    justify-content: flex-end;
}

.icon-btn {
    background: transparent;
    border: none;
    color: #4a5568;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.points-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    padding: 6px 14px;
    border-radius: 20px;
    color: #2d3436;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(253, 203, 110, 0.3);
}

.points-badge svg {
    fill: #fdcb6e;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* 用户下拉菜单 */
.user-dropdown {
    position: relative;
}
.user-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition-delay: 0.1s;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}
.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 6px;
    background: white;
    border: 1px solid rgba(200, 210, 230, 0.8);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.user-profile:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}
.user-profile.active {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}
.user-profile.active .dropdown-arrow {
    transform: rotate(180deg);
}
.dropdown-arrow {
    transition: transform 0.2s ease;
}

.user-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.user-dropdown:hover .user-profile {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
    font-weight: 600;
}

.user-name {
    font-size: 14px;
    color: #4a5568;
    font-weight: 500;
}

/* 下拉菜单 */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 180px;
    background: white;
    border: 1px solid rgba(200, 210, 230, 0.8);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
    pointer-events: none;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #4a5568;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.dropdown-item:hover {
    background: rgba(102, 126, 234, 0.08);
    color: #667eea;
}

.dropdown-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.dropdown-item:hover svg {
    opacity: 1;
}

.logout-item {
    width: 100%;
    background: transparent;
    border: none;
    text-align: left;
    font-family: inherit;
}

.logout-item:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
}

.dropdown-divider {
    height: 1px;
    background: rgba(200, 210, 230, 0.6);
    margin: 4px 0;
}

/* ============================================
   主工作区布局
   ============================================ */
.workspace-layout {
    display: grid;
    grid-template-columns: 360px 1fr 640px;
    gap: 16px;
    padding: 16px;
    height: calc(100vh - 64px);
}

/* 左侧面板 - 限制最大高度并添加滚动 */
.left-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    max-height: calc(100vh - 96px);
    padding-right: 8px;
    min-height: 0;
}

/* 上传区域面板 - 固定高度，防止挤压下方内容 */
.upload-panel {
    flex-shrink: 0;
    max-height: 420px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.upload-panel .panel-content {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding-top: 6px;
}

.upload-panel .panel-header {
    margin-bottom: 0;
    padding-bottom: 8px;
}



/* 已上传图片预览区 - 使用flex布局，允许不同高度 */
.uploaded-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    padding: 12px;
    background: rgba(245, 247, 255, 0.3);
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    align-items: flex-start;
}

/* 当图片数量超过2张时，固定高度并显示滚动条 */
.uploaded-preview.has-scroll {
    max-height: 200px;
    overflow-y: auto;
}

/* 自定义滚动条样式（针对上传预览区） */
.uploaded-preview::-webkit-scrollbar {
    width: 6px;
}

.uploaded-preview::-webkit-scrollbar-track {
    background: rgba(200, 210, 230, 0.2);
    border-radius: 3px;
}

.uploaded-preview::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.4);
    border-radius: 3px;
}

.uploaded-preview::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.6);
}
/* 中间面板 */
.center-panel {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    min-width: 0;
    min-height: 0;
}

/* 右侧面板 */
.right-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    min-width: 0;
    min-height: 0;
}

/* ============================================
   面板通用样式
   ============================================ */
.panel-section {
    background: white;
    border: 1px solid rgba(200, 210, 230, 0.8);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.panel-section:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}


.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.star-icon {
    color: #fdcb6e;
    font-size: 16px;
}

.panel-header h3 {
    font-size: 14px;
    font-weight: 600;
    flex: 1;
    color: #1a1a2e;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.toggle-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: .3s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

input:checked + .slider:before {
    transform: translateX(16px);
}

.toggle-label {
    font-size: 12px;
    color: #4a5568;
}
.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}
.panel-footer {
    display: flex;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.panel-footer button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}
.btn-primary {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}


.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}
/* 控制面板项 */
.control-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.control-item:last-child {
    margin-bottom: 0;
}

.control-item label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.control-item input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
}


.control-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: 2px solid white;
}

.control-value {
    color: white;
    font-size: 12px;
    text-align: right;
}
/* 画笔工具 */
.brush-tools {
    margin-bottom: 20px;
}

.brush-tools label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin-bottom: 10px;
}

.tool-buttons {
    display: flex;
    gap: 8px;
}

.text-input-control {
    margin-bottom: 20px;
}

.text-input-control label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin-bottom: 8px;
}

.text-input-control input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.text-input-control input[type="text"]:focus {
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.15);
}

.text-input-control input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* 更新工具按钮样式以支持文字显示 */
.tool-btn {
    flex: 1;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
    font-weight: 500;
    gap: 6px;
}

.tool-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.tool-btn.active {
    background: rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}
.brush-size-control {
    margin-bottom: 20px;
}

.brush-size-control label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin-bottom: 8px;
}

.brush-color-control {
    margin-bottom: 20px;
}

.brush-color-control label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin-bottom: 10px;
}
.color-picker {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.color-btn {
    width: 100%;
    aspect-ratio: 1;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.color-btn:hover {
    transform: scale(1.1);
}

.color-btn.active {
    border-color: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.brush-color-control input[type="color"] {
    width: 100%;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}
/* 上传区域样式 */
.upload-zone {
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(245, 247, 255, 0.5);
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-zone:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.upload-zone.drag-over {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
}

.upload-placeholder svg {
    color: #667eea;
    margin-bottom: 12px;
    opacity: 0.8;
    width: 36px;
    height: 36px;
}
.upload-placeholder p {
    color: #4a5568;
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 6px 0;
}

.upload-placeholder .hint {
    color: #718096;
    font-size: 12px;
    font-weight: 400;
    margin: 0;
}


.uploaded-image-item {
    position: relative;
    flex: 0 0 calc(50% - 6px);
    min-width: 100px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.uploaded-image-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.uploaded-image-item img {
    width: 100%;
    height: auto;
    display: block;
}


.uploaded-image-item .image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    padding: 8px;
    color: white;
    font-size: 11px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.uploaded-image-item:hover .image-overlay {
    opacity: 1;
}

.uploaded-image-item .image-name {
    display: block;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.uploaded-image-item .image-size {
    display: block;
    font-size: 10px;
    opacity: 0.8;
}

.uploaded-image-item .remove-image {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #ff6b6b;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
}

.uploaded-image-item:hover .remove-image {
    opacity: 1;
}

.uploaded-image-item .remove-image:hover {
    background: #ff6b6b;
    color: white;
    transform: scale(1.1);
}

/* 通知消息样式 */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 12px 24px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    max-width: 300px;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.notification-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.notification-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
/* ============================================
   提示词输入
   ============================================ */
.prompt-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.prompt-panel .panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.prompt-input-wrapper {
    /* 移除 position: relative，因为不再需要内部绝对定位 */
    flex: 1;
    margin-bottom: 12px;
    display: flex;
}
.prompt-preset-dropdown {
    /* 移除绝对定位，变为内联块级元素 */
    user-select: none;
    position: relative;
}

.preset-trigger {
    padding: 5px 12px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.08);
    color: rgba(0, 0, 0, 0.7);
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.2s;
}

.preset-trigger:hover,
.preset-trigger.open {
    border-color: rgba(0, 0, 0, 0.5);
    color: #fff;
}

.preset-options {
    display: none;
    position: absolute;
    left: 0;
    bottom: 100%;
    margin-bottom: 4px;
    min-width: 150px;
    background: #1e1e3a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 6px 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.preset-options.show {
    display: block;
}

.preset-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

.preset-option:hover {
    background: rgba(255, 255, 255, 0.08);
}

.preset-option input[type="checkbox"] {
    accent-color: #6c5ce7;
    cursor: pointer;
}
.modern-prompt-input {
    width: 100%;
    height: 100%;
    min-height: 150px;
    background: rgba(245, 247, 255, 0.5);
    border: 1px solid rgba(200, 210, 230, 0.8);
    border-radius: 8px;
    padding: 12px;
    color: #1a1a2e;
    font-size: 14px;
    resize: none;
    transition: all 0.2s;
    overflow-y: auto;
}

.modern-prompt-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
/* 外层下拉容器完全不透明 */
/*#promptPresetDropdown {*/
/*  opacity: 1 !important;*/
/*  background: #ffffff !important;*/
/*}*/
/* 触发按钮 */
#presetTrigger {
  /*opacity: 1 !important;*/
    color: #000;
}
/*!* 下拉选项面板（重点，很多下拉默认半透明） *!*/
/*#presetOptions {*/
/*  opacity: 1 !important;*/
/*  background: #ffffff !important;*/
/*  !* 防止背景透明透出下层内容 *!*/
/*  backdrop-filter: none !important;*/
/*}*/
/*!* 每个选项行 *!*/
/*.preset-option {*/
/*  opacity: 1 !important;*/
/*  background: #fff;*/
/*}*/

.magic-btn {
    /* 移除绝对定位，但保持所有视觉样式不变 */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}
.magic-btn:hover {
    transform: scale(1.1);
}

.params-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.prompt-tools-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.model-selector, .param-selector {
    background: rgba(245, 247, 255, 0.5);
    border: 1px solid rgba(200, 210, 230, 0.8);
    color: #1a1a2e;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.model-selector:hover, .param-selector:hover {
    border-color: #667eea;
}

.generate-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.cost-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #4a5568;
    font-size: 13px;
}

.voice-btn {
    background: rgba(245, 247, 255, 0.5);
    border: 1px solid rgba(200, 210, 230, 0.8);
    color: #4a5568;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.voice-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.generate-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

/* ============================================
   我的作品
   ============================================ */
.my-works {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: visible;
}

.edit-btn, .switch-btn {
    background: transparent;
    border: 1px solid rgba(200, 210, 230, 0.8);
    color: #4a5568;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.edit-btn:hover, .switch-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

/* 我的作品 - 作品项样式 */
.works-gallery {
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 12px;
    align-content: start;
}

.work-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    min-height: 130px;
    aspect-ratio: 1;
}

.work-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.work-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.work-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 12px 8px 8px;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.work-item:hover .work-overlay {
    opacity: 1;
}

.work-time {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
}

.work-model {
    display: block;
    font-size: 11px;
    opacity: 0.9;
}
/* 作品管理模式样式 */
.works-manage-btn {
    background: transparent;
    border: 1px solid rgba(200, 210, 230, 0.8);
    color: #4a5568;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 12px;
    margin-left: auto;
}

.works-manage-btn:hover {
    border-color: #667eea;
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.works-manage-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
}

.works-manage-bar {
    display: flex;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(245, 247, 255, 0.8);
    border-bottom: 1px solid rgba(200, 210, 230, 0.6);
    align-items: center;
}

.works-delete-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.2);
}

.works-delete-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.works-delete-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.works-cancel-btn {
    padding: 6px 14px;
    border: 1px solid rgba(200, 210, 230, 0.8);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    background: white;
    color: #4a5568;
    transition: all 0.2s ease;
}

.works-cancel-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

/* 作品复选框 */
.work-checkbox {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 10;
    width: 20px;
    height: 20px;
    accent-color: #667eea;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.manage-mode .work-checkbox {
    opacity: 1;
}

.work-item:hover .work-checkbox {
    opacity: 1;
}

/* 单张删除按钮 */
.work-single-delete-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 10;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.9);
    border: none;
    color: white;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s ease;
}

.manage-mode .work-single-delete-btn {
    opacity: 1;
    display: flex;
}

.work-item:hover .work-single-delete-btn {
    opacity: 1;
    display: flex;
}

.work-single-delete-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* 管理模式下的 work-item 样式调整 */
.manage-mode .work-item {
    cursor: default;
}

.manage-mode .work-item:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
/* 空作品状态 */
.empty-works {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #999;
    padding: 40px 20px;
    grid-column: 1 / -1;
}

.empty-works svg {
    margin-bottom: 16px;
}

.empty-works p {
    font-size: 14px;
    margin: 0;
}

/* ============================================
   结果展示区
   ============================================ */
.result-showcase {
    background: white;
    border: 1px solid rgba(200, 210, 230, 0.8);
    border-radius: 12px;
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.result-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
}

.result-count {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

/* 图片展示区 - 占3/5高度 */
.result-grid-wrapper {
    flex: 3;
    overflow-y: auto;
    margin-bottom: 16px;
    min-height: 0;
}
/* 图片信息面板 - 占2/5高度 */
.image-info-panel {
    flex: 2;
    background: rgba(245, 247, 255, 0.5);
    border: 1px solid rgba(200, 210, 230, 0.6);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}




.info-panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(200, 210, 230, 0.6);
    flex-shrink: 0;
}

.info-panel-header svg {
    color: #667eea;
}

.info-panel-header h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    flex: 1;
}

.info-hint {
    font-size: 12px;
    color: #999;
}


.info-content {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* 空状态 */
.info-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: #999;
}

.info-empty-state p {
    font-size: 13px;
    margin-top: 12px;
}

/* 详细信息 */
.info-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 信息行 - 两列布局 */
.info-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* 半宽信息项 */
.info-item-half {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid rgba(200, 210, 230, 0.6);
}

/* 全宽信息项 */
.info-item-full {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid rgba(200, 210, 230, 0.6);
}

.info-label {
    font-size: 12px;
    color: #718096;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 14px;
    color: #1a1a2e;
    font-weight: 600;
    word-break: break-all;
    padding-right: 8px;
}

.info-prompt {
    font-size: 13px;
    color: #1a1a2e;
    line-height: 1.6;
    max-height: 120px;
    overflow-y: auto;
    word-break: break-word;
    padding: 8px;
    background: rgba(245, 247, 255, 0.5);
    border-radius: 4px;
}



.result-image-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: #f5f7ff;
}

.result-image-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.result-image-card.selected {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.result-image-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

/* 加载占位符样式 */
.result-image-card.loading-placeholder {
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d4e 100%);
    border: 2px dashed rgba(102, 126, 234, 0.3);
    cursor: default;
    aspect-ratio: 1;
    min-height: 200px;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 10;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

/* 错误占位符样式 */
.result-image-card.error-placeholder {
    background: linear-gradient(135deg, #fee 0%, #fcc 100%);
    border: 2px solid #ff6b6b;
    cursor: default;
    aspect-ratio: 1;
    min-height: 200px;
}

.error-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 10;
}

.error-overlay svg {
    color: #ff6b6b;
}

.error-text {
    color: #ff6b6b;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}
/* ============================================
   工作流按钮和侧边栏
   ============================================ */

/* 工作流小按钮（提示词区域） */
.workflow-btn-small {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    white-space: nowrap;
}

.workflow-btn-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.workflow-btn-small:active {
    transform: translateY(0);
}

.workflow-btn-small svg {
    flex-shrink: 0;
}
/* AI分析按钮 - 位于上传区域右上角 */
.analyze-prompt-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
}

.analyze-prompt-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.analyze-prompt-btn:active {
    transform: translateY(0);
}

.analyze-prompt-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.analyze-prompt-btn .spin {
    animation: spin 1s linear infinite;
}
.notification-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.notification-warning {
    background: #fff3cd;
    color: #333;
    border: 1px solid #ffc107;
}
/* 工作流侧边栏 */
.workflow-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: #F5F7FFF2;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.workflow-sidebar.active {
    right: 0;
}

.workflow-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(200, 210, 230, 0.6);
}

.workflow-sidebar-header h3 {
    color: #1a1a2e;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.workflow-close-btn {
    background: transparent;
    border: none;
    color: #4a5568;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.workflow-close-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    opacity: 1;
}

/* 分类按钮行 */
.workflow-category-tabs {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    overflow-x: auto;
    background: rgba(255, 255, 255, 0.6);
    border-bottom: 1px solid rgba(200, 210, 230, 0.5);
    scrollbar-width: none;
}

.workflow-category-tabs::-webkit-scrollbar {
    display: none;
}

.category-tab {
    padding: 8px 16px;
    background: white;
    border: 1px solid rgba(200, 210, 230, 0.8);
    border-radius: 20px;
    color: #4a5568;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.category-tab:hover {
    background: rgba(102, 126, 234, 0.08);
    color: #667eea;
    border-color: #667eea;
}

.category-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* 工作流分类内容 */
.workflow-category-content {
    display: none;
}

.workflow-category-content.active {
    display: block;
}

.workflow-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.workflow-sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.workflow-sidebar-content::-webkit-scrollbar-track {
    background: rgba(200, 210, 230, 0.2);
}

.workflow-sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.4);
    border-radius: 3px;
}

.workflow-sidebar-content::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.6);
}

/* 工作流分类 */
.workflow-category {
    margin-bottom: 24px;
}

.workflow-category:last-child {
    margin-bottom: 0;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid rgba(200, 210, 230, 0.6);
}

.category-header span:first-child {
    color: #1a1a2e;
    font-size: 14px;
    font-weight: 600;
}

.category-badge {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
}

/* 工作流网格 */
.workflow-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.workflow-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(200, 210, 230, 0.6);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.workflow-item:hover {
    background: rgba(102, 126, 234, 0.05);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.workflow-item img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    background: rgba(245, 247, 255, 0.8);
}

.workflow-item span {
    color: #4a5568;
    font-size: 12px;
    text-align: center;
    line-height: 1.3;
    font-weight: 500;
}

/* 遮罩层 */
.workflow-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.workflow-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   滚动条美化
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(200, 210, 230, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 4px;
    transition: all 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.7);
}

/* ============================================
   动画效果
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel-section {
    animation: fadeIn 0.3s ease-out;
}
/* ... existing code ... */

/* 图片放大查看器 */
.image-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
}

.image-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}



/* 编辑工具栏 */
.lightbox-toolbar {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    z-index: 3;
    align-items: center;
}

.toolbar-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    padding: 0;
    position: relative;
}

.toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.toolbar-btn.active {
    background: rgba(102, 126, 234, 0.3);
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.toolbar-btn.save-btn:hover {
    background: rgba(76, 175, 80, 0.3);
    border-color: #4CAF50;
}

.toolbar-btn.download-btn:hover {
    background: rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}
.toolbar-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 4px;
}
/* 原图对比分割线 */
/* 原图对比分割线 */
.compare-slider {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    z-index: 10;
    cursor: ew-resize;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compare-line {
    width: 2px;
    height: 100%;
    background: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* 对比滑块 hover 增强 */
.compare-slider:hover .compare-line {
    background: #667eea;
    box-shadow: 0 0 16px rgba(102, 126, 234, 0.6);
}

.compare-slider:hover .compare-handle {
    background: #667eea;
    color: white;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.5);
    transform: scale(1.1);
}

.compare-handle {
    transition: all 0.2s ease;
}

.compare-handle svg {
    width: 20px;
    height: 20px;
}


/* 新增：原图元素样式（用于双图对比） */
.original-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 1;
}
/* 对比模式下 lightbox 容器适配：
   当内部图片全部使用 absolute 定位时，
   容器必须有明确尺寸，否则会塌陷 */
.lightbox-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    /* 新增：为 absolute 定位子元素提供包含块 */
    min-width: 900px;
    min-height: 600px;
}
/* 对比模式下图片通用处理 */
.lightbox-container img {
    user-select: none;
    -webkit-user-drag: none;
}

/* 对比模式下的 lightbox-image（新图）在对比时 z-index 为上层的保障 */
.lightbox-container .lightbox-image:not(.original-image) {
    z-index: 2;
}
/* 编辑面板通用样式 */
.edit-panel {
    position: fixed;
    right: -350px;
    top: 50%;
    transform: translateY(-50%);
    width: 320px;
    max-height: 80vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    padding: 0;
    z-index: 10000;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
}

.edit-panel.active {
    right: 20px;
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}
/* 调整面板 */


.adjust-header,
.brush-header,
.crop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    color: white;
    font-size: 16px;
    font-weight: 600;
}

.panel-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-close:hover {
    opacity: 1;
}







.adjust-item input[type="range"],
.brush-item input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
}

.adjust-item input[type="range"]::-webkit-slider-thumb,
.brush-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: 2px solid white;
}

.adjust-value,
.brush-value {
    color: white;
    font-size: 12px;
    text-align: right;
}

.brush-item input[type="color"] {
    width: 100%;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}


.btn-apply {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-apply:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.crop-info {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    text-align: center;
    padding: 20px 0;
}

/* 裁剪提示 */
.crop-hint {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    text-align: center;
    padding: 20px 0;
    line-height: 1.6;
}

/* 裁剪选择框（可调整大小） */
.crop-selection {
    position: absolute;
    border: 2px dashed #667eea;
    background: rgba(102, 126, 234, 0.1);
    cursor: move;
    z-index: 5;
}

.crop-selection::before,
.crop-selection::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: #667eea;
    border-radius: 50%;
    border: 2px solid white;
}

.crop-selection::before {
    top: -6px;
    left: -6px;
}

.crop-selection::after {
    bottom: -6px;
    right: -6px;
}
.resize-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #667eea;
    border-radius: 50%;
    border: 2px solid white;
    z-index: 6;
}

.resize-handle.top-left {
    top: -6px;
    left: -6px;
    cursor: nw-resize;
}

.resize-handle.top-right {
    top: -6px;
    right: -6px;
    cursor: ne-resize;
}

.resize-handle.bottom-left {
    bottom: -6px;
    left: -6px;
    cursor: sw-resize;
}

.resize-handle.bottom-right {
    bottom: -6px;
    right: -6px;
    cursor: se-resize;
}
/* 画笔Canvas覆盖层 */
.brush-canvas {
    position: absolute;
    top: 0;
    left: 0;
    cursor: crosshair;
    z-index: 6;
}
.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: lightboxZoomIn 0.3s ease-out;
    transition: transform 0.3s ease;
    cursor: grab;
}

.lightbox-image:active {
    cursor: grabbing;
}
/* 原图（旧图）在对比模式下的细节增强 */
.lightbox-image.original-image {
    pointer-events: none;          /* 原图不拦截鼠标事件，让滑块可拖拽 */
    user-select: none;
    -webkit-user-drag: none;
}

/* 新图 clip-path 过渡动画（滑块拖拽更平滑） */
.lightbox-container .lightbox-image {
    transition: clip-path 0.05s linear;
}
/* 原图/新图 标识标签 */
.compare-label {
    position: absolute;
    top: 12px;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    z-index: 5;
    pointer-events: none;
    backdrop-filter: blur(4px);
    letter-spacing: 0.5px;
}
.compare-label-original {
    left: 12px;
    background: rgba(239, 68, 68, 0.75);   /* 红色 - 原图 */
}

.compare-label-new {
    right: 12px;
    background: rgba(16, 185, 129, 0.75);  /* 绿色 - 新图 */
}
@keyframes lightboxZoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    z-index: 2;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.lightbox-close {
    top: -60px;
    right: 0;
}

.lightbox-prev {
    left: -70px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox-next {
    right: -70px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox-info {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
}

.lightbox-counter {
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}
/* ============================================
   移动端自适应 - 手机 (≤480px)
   ============================================ */
@media (max-width: 480px) {
     /* 顶部导航栏 */
    .top-navbar {
        padding: 0 6px;
        height: 48px;
        /*overflow: hidden;*/
        gap: 0;
    }

    .navbar-left {
        min-width: 0;
        gap: 0;
        flex: 0 0 auto;
    }

    .logo {
        gap: 0;
    }

    .logo img {
        width: 24px;
        height: 24px;
    }

    .logo span {
        font-size: 0;
    }

    .navbar-right {
        gap: 2px;
        min-width: 0;
        flex: 0 1 auto;
    }

    .points-badge {
        padding: 3px 5px;
        font-size: 10px;
        gap: 2px;
        white-space: nowrap;
    }

    .points-badge svg {
        width: 10px;
        height: 10px;
    }

    .user-avatar {
        width: 22px;
        height: 22px;
        font-size: 10px;
        flex-shrink: 0;
    }

    .user-name {
        font-size: 11px;
        max-width: 60px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .user-profile {
        padding: 2px 4px 2px 2px;
        gap: 4px;
    }

    .dropdown-arrow {
        width: 8px;
        height: 8px;
        flex-shrink: 0;
    }

    .icon-btn {
        display: none;
    }

    .navbar-center {
        gap: 2px;
        flex: 0 1 auto;
    }

    .promo-btn {
        font-size: clamp(10px, 0.8vw, 15px);
        padding: 0;
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        line-height: 1;
        flex-shrink: 0;
    }

    .logo-text {
        display: none;
    }

    .icon-btn {
        display: none;
    }
    /* 主工作区 - 单列布局 */
    .workspace-layout {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 10px;
        height: auto;
        min-height: calc(100vh - 56px);
    }

    .left-panel {
        max-height: none;
        gap: 12px;
        padding-right: 0;
    }

    .upload-panel {
        max-height: 350px;
    }

    .upload-zone {
        padding: 16px 12px;
        min-height: 100px;
    }

    .upload-placeholder svg {
        width: 32px;
        height: 32px;
    }

    .upload-placeholder p {
        font-size: 12px;
    }

    .upload-placeholder .hint {
        font-size: 11px;
    }

    .uploaded-preview {
        max-height: 150px;
        gap: 8px;
        padding: 8px;
    }

    .uploaded-image-item {
        flex: 0 0 calc(50% - 4px);
        min-width: 60px;
    }

    .uploaded-image-item .remove-image {
        width: 20px;
        height: 20px;
        font-size: 14px;
        top: 2px;
        right: 2px;
    }

    /* 提示词区域 */
    .prompt-panel .panel-content {
        padding: 12px;
    }

    .modern-prompt-input {
        min-height: 100px;
        font-size: 13px;
        padding: 10px;
    }

    .params-row {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .model-selector, .param-selector {
        padding: 8px 10px;
        font-size: 12px;
    }

    .generate-actions {
        flex-direction: column;
        gap: 10px;
    }

    .generate-btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
        font-size: 14px;
    }

    .cost-indicator {
        font-size: 12px;
        justify-content: center;
    }

    /* 结果展示区 */
    .result-showcase {
        padding: 12px;
    }

    .result-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .result-grid-wrapper {
        flex: 1;
    }

    .image-info-panel {
        display: none;
    }

    .result-image-card {
        border-radius: 6px;
    }

    /* 我的作品 */
    .works-gallery {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
        padding: 10px;
    }

    .work-item {
        border-radius: 6px;
    }

    /* 弹窗适配 */
    .invite-modal {
        width: 94%;
        max-width: 100%;
        border-radius: 24px;
        margin-bottom: 0;
    }

    .modal-body-scroll {
        padding: 16px 14px 20px;
    }

    .modal-header h2 {
        font-size: 1.3rem;
    }

    .reward-cards {
        flex-direction: column;
        gap: 10px;
    }

    .link-box {
        flex-direction: column;
        padding: 12px;
        gap: 8px;
    }

    .link-input {
        font-size: 0.7rem;
    }

    .copy-link-btn {
        width: 100%;
        justify-content: center;
        padding: 10px;
    }

    .modal-container {
        width: 94%;
        max-width: 100%;
        border-radius: 32px;
        margin-bottom: 0;
    }

    .modal-content {
        flex-direction: column;
        padding: 24px 16px 28px;
    }

    .qr-area {
        flex-direction: row;
        gap: 12px;
        padding: 12px;
    }

    .qr-code-img {
        width: 100px;
        height: 100px;
    }

    .close-modal {
        top: 14px;
        right: 14px;
        width: 30px;
        height: 30px;
        font-size: 22px;
    }

    /* 通知消息 */
    .notification {
        top: 64px;
        right: 10px;
        left: 10px;
        max-width: none;
        font-size: 13px;
        padding: 10px 16px;
    }

    /* ===== 图片查看器移动端适配 ===== */
    .lightbox-container {
        min-width: 0;
        min-height: 0;
        max-width: 100vw;
        max-height: 100vh;
    }

    .lightbox-image {
        max-width: 95vw;
        max-height: 70vh;
        border-radius: 4px;
    }

    /* 工具栏移至底部 */
    .lightbox-toolbar {
        top: auto;
        bottom: 16px;
        left: 50%;
        transform: translateX(-50%);
        gap: 4px;
        padding: 6px 8px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .toolbar-btn {
        width: 36px;
        height: 36px;
    }

    .toolbar-divider {
        height: 20px;
        margin: 0 2px;
    }

    /* 关闭按钮移到右上角视口内 */
    .lightbox-close {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
        font-size: 20px;
    }

    /* 前后按钮叠加在图片上 */
    .lightbox-prev {
        left: 8px;
        top: 50%;
        transform: translateY(-50%);
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .lightbox-prev:hover {
        transform: translateY(-50%) scale(1.1);
    }

    .lightbox-next {
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .lightbox-next:hover {
        transform: translateY(-50%) scale(1.1);
    }

    /* 计数器移到底部工具栏上方 */
    .lightbox-info {
        bottom: 80px;
        left: 50%;
        transform: translateX(-50%);
    }

    .lightbox-counter {
        font-size: 12px;
        padding: 4px 10px;
    }

    /* 编辑面板全宽 */
    .edit-panel {
        width: 100vw;
        max-height: 55vh;
        right: 0;
        bottom: 0;
        top: auto;
        transform: translateY(100%);
        border-radius: 16px 16px 0 0;
    }

    .edit-panel.active {
        right: 0;
        transform: translateY(0);
    }

    /* 对比标签缩小 */
    .compare-label {
        top: 6px;
        padding: 2px 8px;
        font-size: 10px;
    }
}

/* ============================================
   移动端自适应 - 平板 (481px-768px)
   ============================================ */
@media (min-width: 481px) and (max-width: 768px) {
    .top-navbar {
        padding: 0 10px;
        height: 54px;
        /*overflow: hidden;*/
    }

    .navbar-left {
        min-width: 0;
        flex-shrink: 1;
        gap: 4px;
    }

    .logo {
        gap: 6px;
    }

    .logo img {
        width: 30px;
        height: 30px;
    }

    .logo span {
        font-size: 15px;
    }

    .navbar-center {
        gap: 8px;
        flex: 0 1 auto;
    }

    .promo-btn {
        font-size: clamp(10px, 0.8vw, 15px);
        padding: 0;
        white-space: nowrap;
    }


    .logo-text {
        display: none;
    }

    .navbar-right {
        gap: 6px;
        min-width: 0;
        flex-shrink: 1;
    }

    .icon-btn {
        display: none;
    }


    .points-badge {
        padding: 4px 8px;
        font-size: 12px;
        gap: 4px;
    }

    .points-badge svg {
        width: 13px;
        height: 13px;
    }

    .user-avatar {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }

    .user-name {
        font-size: 12px;
        max-width: 72px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .user-profile {
        padding: 4px 8px 4px 4px;
        gap: 6px;
    }

    .dropdown-arrow {
        width: 12px;
        height: 12px;
    }

    .workspace-layout {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 14px;
        height: auto;
    }

    .left-panel {
        max-height: none;
        gap: 14px;
    }

    .result-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .works-gallery {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 10px;
    }

    .image-info-panel {
        display: none;
    }

    /* ===== 图片查看器平板适配 ===== */
    .lightbox-container {
        min-width: 0;
        min-height: 0;
        max-width: 95vw;
    }

    .lightbox-image {
        max-width: 90vw;
        max-height: 75vh;
    }

    .lightbox-toolbar {
        top: auto;
        bottom: 20px;
        gap: 6px;
    }

    .lightbox-close {
        top: 16px;
        right: 16px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-info {
        bottom: 80px;
    }

    .edit-panel {
        width: 340px;
    }
    .workflow-btn-small {
        padding: 6px 12px;
        font-size: 12px;
    }

    .workflow-btn-small svg {
        width: 16px;
        height: 16px;
    }

    .workflow-btn-small span {
        display: none;
    }

    .workflow-sidebar {
        width: 100vw;
        right: -100vw;
    }

    .workflow-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .workflow-item {
        padding: 8px;
    }

    .workflow-item span {
        font-size: 11px;
    }
}

/* ============================================
   小屏桌面 (769px-1024px)
   ============================================ */
@media (min-width: 769px) and (max-width: 1024px) {
    .workspace-layout {
        grid-template-columns: 280px 1fr 320px;
        gap: 12px;
    }

    .navbar-center {
        gap: 16px;
    }

    .promo-btn {
        font-size: clamp(10px, 0.8vw, 13px);
        padding: 0;
    }
    .workflow-sidebar {
        width: 320px;
        right: -320px;
    }

    .workflow-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 1025px) and (max-width: 1600px){
    .workspace-layout {
        grid-template-columns: 280px 1fr 360px;
    }
}