/* ============================================
   CSS 变量定义
   ============================================ */
:root {
    /* 主题色 */
    --color-primary: #ff6b6b;
    --color-primary-dark: #ee5a52;
    --color-primary-darker: #e74c3c;
    --color-primary-light: rgba(255, 107, 107, 0.2);
    --color-primary-lighter: rgba(255, 107, 107, 0.15);
    
    /* 文本颜色 */
    --color-text-primary: #2c3e50;
    --color-text-secondary: #606266;
    --color-text-muted: #7f8c8d;
    --color-text-light: #909399;
    --color-text-lightest: #94a3b8;
    
    /* 背景色 */
    --color-bg-main: #f5f7fa;
    --color-bg-light: #f8f9fa;
    --color-bg-card: #ffffff;
    
    /* 边框颜色 */
    --color-border: #dcdfe6;
    --color-border-light: #e0e6ed;
    --color-border-lighter: #e9ecef;
    
    /* 品牌渐变 */
    --gradient-primary: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    --gradient-primary-reverse: linear-gradient(135deg, #ee5a52 0%, #e74c3c 100%);
    --gradient-brand: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-hero: linear-gradient(135deg, #ff6b6b 0%, #ffa502 100%);
    
    /* 阴影 */
    --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-primary: 0 2px 8px rgba(255, 107, 107, 0.3);
    --shadow-primary-lg: 0 4px 12px rgba(255, 107, 107, 0.4);
    
    /* 圆角 */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-2xl: 16px;
    --radius-full: 50%;
    
    /* 间距 */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 20px;
    --spacing-xl: 25px;
    
    /* 过渡 */
    --transition-fast: all 0.2s ease;
    --transition-normal: all 0.3s ease;
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* 成功色 */
    --color-success: #67c23a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 禁止浏览器缩放，但允许正常滚动 */
html {
    width: 100%;
    height: 100%;
    touch-action: pan-x pan-y;
    overscroll-behavior: none;
}

body {
    width: 100%;
    min-height: 100%;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
}

/* 全局链接样式重置 */
a {
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--color-text-primary);
    background: var(--color-bg-main);
    min-height: 100vh;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0;
    background: var(--color-bg-card);
    min-height: 100vh;
    box-shadow: var(--shadow-sm);
}

.header {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0;
    padding: 40px 0;
    background: #0f172a; /* 深色背景 */
    color: white;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-btn {
    position: absolute;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    z-index: 10;
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

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

.header-btn svg {
    width: 14px;
    height: 14px;
}

/* 按钮位置 */
.clear-data-btn {
    bottom: 15px;
}

.key-data-btn {
    bottom: 55px;
}

.about-btn {
    bottom: 95px;
}

.header-bg-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(79, 172, 254, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(0, 242, 254, 0.15) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1;
    position: relative;
}

.logo-icon-box {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 10px rgba(79, 172, 254, 0.5));
}



.logo-glow {
    position: absolute;
    width: 40px;
    height: 40px;
    background: rgba(79, 172, 254, 0.4);
    filter: blur(20px);
    border-radius: 50%;
    z-index: -1;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.2); }
}

.logo-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.main-title {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: 1px;
    margin: 0;
    line-height: 1.2;
    background: linear-gradient(to right, #fff, #e2e8f0);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.highlight {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
}

.tech-lines {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
    opacity: 0.8;
}

.sub-title {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 3px;
    color: #94a3b8;
    text-transform: uppercase;
}

.line {
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.5), transparent);
    width: 20px;
}

/* 导航栏样式 */
.card-nav {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: var(--color-bg-card);
    border-bottom: 1px solid var(--color-border-light);
}

.nav-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    border-radius: var(--radius-xl);
    background: var(--color-bg-light);
    cursor: pointer;
    transition: var(--transition-normal);
    border: 2px solid transparent;
    box-shadow: var(--shadow-sm);
}

.nav-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: var(--color-bg-card);
}

.nav-card.active {
    background: #fff5f5;
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: var(--shadow-primary-lg);
}

.nav-icon {
    font-size: 32px;
    margin-bottom: 8px;
    line-height: 1;
}

.nav-text {
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
}

/* 内容区域 */
.main {
    padding: 20px;
}

.content-section {
    animation: fadeIn 0.3s ease;
}

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

/* 原有样式保持不变 */
.upload-section {
    margin-bottom: 0;
}

.upload-section h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #2c3e50;
    text-align: center;
    font-weight: 600;
}

.upload-area {
    background: var(--color-bg-card);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-xl);
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-sm);
}

.upload-area h3 {
    margin-bottom: 0;
    color: var(--color-text-primary);
    font-size: 18px;
    font-weight: 600;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 0;
    flex: 1; /* Allow grid to expand */
}

.image-upload {
    width: 100%;
    aspect-ratio: 1;
    border: 2px dashed #dcdfe6;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fafafa;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    cursor: default;
    user-select: none;
}

.image-upload.dragging {
    opacity: 0.5;
    border-color: var(--color-primary);
    border-style: solid;
    box-shadow: var(--shadow-primary-lg);
    /* 拖动时的动画效果 */
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    cursor: default;
}

.image-upload.drag-over {
    border-color: #4facfe;
    border-style: solid;
    background: #e6f7ff;
    transform: scale(1.02);
    /* 目标位置的动画效果 */
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.image-upload.has-image {
    cursor: default;
    /* 禁用文本选择，优化触摸体验 */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* 禁用触摸高亮 */
    -webkit-tap-highlight-color: transparent;
}

.image-upload:active {
    cursor: default;
}

/* 移动端优化：触摸拖动时的样式 */
@media (max-width: 768px) {
    .image-upload.has-image {
        /* 移动端使用更大的点击区域 */
        touch-action: none; /* 阻止默认触摸行为 */
    }
    
    .image-upload.dragging {
        /* 移动端拖动时更大的透明度变化 */
        opacity: 0.4;
        transform: scale(1.05);
    }
    
    .image-upload.drag-over {
        /* 移动端目标位置更明显的视觉反馈 */
        border-width: 3px;
        box-shadow: 0 4px 12px rgba(79, 172, 254, 0.4);
    }
}

/* 禁用状态下的选择图片区域 */
.upload-area.disabled .image-upload {
    opacity: 0.5;
    cursor: not-allowed !important;
    pointer-events: none;
}

.upload-area.disabled .image-upload:hover {
    border-color: #dcdfe6;
    background: #fafafa;
    transform: none;
    box-shadow: none;
}

.image-upload:hover {
    border-color: var(--color-primary);
    background: #fff5f5;
    transform: scale(1.02);
}

.image-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    /* 默认不响应事件，让拖动事件能穿透 */
    pointer-events: none;
}

/* 只有在没有图片时，文件输入框才响应点击事件用于上传 */
.image-upload:not(.has-image) input[type="file"] {
    pointer-events: auto;
}

.upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    z-index: 1;
    transition: all 0.2s ease;
}

.upload-overlay:hover {
    background: rgba(255, 255, 255, 0.9);
}

.image-upload.has-image .upload-overlay {
    display: none;
}

.upload-overlay span {
    color: #909399;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    padding: 8px;
    pointer-events: none;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.setting-group label {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    line-height: 40px;
}

.double-stable-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.double-stable-container .switch-label {
    margin: 0;
}

.double-stable-label {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
}

.setting-group select {
    padding: 10px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    transition: all 0.2s ease;
    cursor: pointer;
}

.switch-label {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    cursor: pointer;
}

.switch-label input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #dcdfe6;
    transition: 0.3s;
    border-radius: 26px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.switch-label input:checked + .switch-slider {
    background-color: #4facfe;
}

.switch-label input:checked + .switch-slider:before {
    transform: translateX(24px);
}

.switch-label input:focus + .switch-slider {
    box-shadow: 0 0 0 2px rgba(79, 172, 254, 0.3);
}

/* 图片比例方框选择器 */
.ratio-selector {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-top: 8px;
    width: 100%;
    max-width: 100%;
}

.ratio-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 6px;
    border: 2px solid #dcdfe6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fafafa;
    min-width: 0;
    width: 100%;
    height: 70px;
    box-sizing: border-box;
}

.ratio-option:hover {
    border-color: #ff6b6b;
    background: #fff5f5;
}

.ratio-option.active {
    border-color: #ff6b6b;
    background: #fff0f0;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.2);
}

.ratio-box {
    background: #909399;
    border-radius: 2px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.ratio-option:hover .ratio-box {
    background: #ff6b6b;
}

.ratio-option.active .ratio-box {
    background: #ff6b6b;
}

/* 不同比例的方框尺寸（缩小） */
.ratio-1-1 { width: 16px; height: 16px; }
.ratio-2-3 { width: 13px; height: 20px; }
.ratio-3-2 { width: 20px; height: 13px; }
.ratio-3-4 { width: 14px; height: 18px; }
.ratio-4-3 { width: 18px; height: 14px; }
.ratio-4-5 { width: 14px; height: 18px; }
.ratio-5-4 { width: 18px; height: 14px; }
.ratio-9-16 { width: 12px; height: 21px; }
.ratio-16-9 { width: 21px; height: 12px; }
.ratio-21-9 { width: 23px; height: 10px; }
/* NB 3.1 专属比例 */
.ratio-1-4 { width: 10px; height: 23px; }
.ratio-4-1 { width: 23px; height: 10px; }
.ratio-1-8 { width: 8px; height: 25px; }
.ratio-8-1 { width: 25px; height: 8px; }

.ratio-option span {
    font-size: 11px;
    color: #606266;
    font-weight: 400;
    text-align: center;
}

.ratio-option:hover span {
    color: #ff6b6b;
}

.ratio-option.active span {
    color: #ff6b6b;
    font-weight: 600;
}

/* 移动端响应式 */
@media (max-width: 768px) {
    .ratio-selector {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }
}

.api-key-section {
    margin-bottom: 25px;
}

.api-key-section label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.api-key-wrapper {
    position: relative;
    margin-bottom: 10px;
    width: 100%;
}

#api-key {
    width: 100%;
    padding: 12px 40px 12px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    height: 48px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    display: block;
}

.api-key-clear-btn,
.quota-btn {
    padding: 4px 12px;
    background-color: #f0f9eb;
    color: #67c23a;
    border: 1px solid #c2e7b0;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.api-key-clear-btn:hover,
.quota-btn:hover {
    background-color: #67c23a;
    color: white;
}

/* ============================================
   额度进度条样式
   ============================================ */
.quota-progress-container {
    display: flex;
    align-items: center;
    width: 100%;
    background-color: #f5f7f9;
    border-radius: 4px;
    padding: 4px 12px;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    height: 28px;
}

.quota-progress-bar {
    height: 4px;
    background-color: #e8eaed;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    flex: 1;
    margin-left: 10px;
}

.quota-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #67c23a 0%, #85ce61 100%);
    transition: width 0.5s ease, background 0.3s ease;
    border-radius: 2px;
}

.quota-progress-fill.warning {
    background: linear-gradient(90deg, #e6a23c 0%, #ebb563 100%);
}

.quota-progress-fill.danger {
    background: linear-gradient(90deg, #f56c6c 0%, #f78989 100%);
}

.quota-progress-text {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #606266;
    font-weight: bold;
    white-space: nowrap;
}

.quota-progress-value {
    font-weight: bold;
    color: #303133;
}

.quota-progress-percent {
    margin-left: 8px;
    color: #909399;
    font-size: 12px;
}

/* 查询中加载动画 */
.quota-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 2px solid #e8eaed;
    border-top-color: #67c23a;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   通用 Focus 样式
   ============================================ */
#api-key:focus,
.prompt-section textarea:focus,
.setting-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary-light);
}

.api-key-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #909399;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    z-index: 2;
}

.api-key-toggle:hover {
    color: #606266;
}

.quota-btn:disabled {
    background-color: #f0f9eb;
    color: #a0cfff;
    cursor: not-allowed;
    opacity: 0.7;
}

.prompt-hint {
    color: #7f8c8d;
    font-size: 13px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.prompt-section textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
    transition: var(--transition-fast);
    line-height: 1.5;
}

.violation-warning {
    display: block;
    visibility: visible;
    opacity: 1;
    color: #ff6b6b;
    font-size: 13px;
    margin-top: 8px;
    font-weight: 500;
    line-height: 1.4;
    position: relative;
    z-index: 999;
    background: #fff;
    padding: 8px;
    border-radius: 4px;
}

.generate-btn {
    width: 100%;
    padding: 14px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-primary);
}

.generate-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-primary-lg);
    background: var(--gradient-primary-reverse);
}

.generate-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.3);
}

.generate-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.result-section {
    background: var(--color-bg-card);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    margin-top: 30px;
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-sm);
}

.result-section h3 {
    margin-bottom: 10px;
    color: var(--color-text-primary);
    font-size: 18px;
    font-weight: 600;
}

.result-section p {
    color: var(--color-text-muted);
    font-size: 14px;
    margin-bottom: 15px;
}

.result-area {
    background: #fafafa;
    padding: 10px;
    border-radius: 6px;
    min-height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px dashed #dcdfe6;
    margin-top: 0;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.empty-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.empty-result p {
    color: #909399;
    text-align: center;
    font-size: 14px;
    line-height: 1.5;
    max-width: 400px;
    margin: 0;
}

.generated-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e6ed;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.generated-image:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.footer {
    margin-top: 5px;
    padding: var(--spacing-lg);
    background: var(--color-bg-light);
    border-top: 1px solid var(--color-border-light);
}

.icp-info {
    text-align: center;
    font-size: 12px;
    color: var(--color-text-light);
}

.icp-info a {
    color: var(--color-text-light);
    transition: color 0.2s;
}

.icp-info a:hover {
    color: var(--color-text-secondary);
}

.icp-info .regulation-link {
    margin-left: 15px;
    color: #4facfe;
    font-weight: 500;
    text-decoration: none !important;
}

.icp-info .regulation-link:hover {
    color: #2196f3;
    text-decoration: none !important;
}

.uploaded-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    z-index: 3;
    cursor: zoom-in; 
    transition: transform 0.2s ease;
}

.image-upload:hover .uploaded-image {
    transform: scale(1.02);
}

.image-info-overlay {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.4;
    z-index: 5;
    pointer-events: none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-upload:hover .image-info-overlay {
    opacity: 1;
    transform: translateY(0);
}

.image-info-dimension,
.image-info-size {
    white-space: nowrap;
}

.image-info-dimension {
    font-weight: 500;
}

.image-info-size {
    opacity: 0.9;
}

/* ============================================
   通用关闭/删除按钮样式（统一合并）
   ============================================ */
.delete-btn {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.7) 100%);
    color: var(--color-primary);
    border: none;
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    line-height: 1;
    padding: 0;
    margin: 0;
    font-size: 16px;
    z-index: 10000;
    box-shadow: var(--shadow-sm), var(--shadow-xs);
    transition: var(--transition-smooth);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0.7;
}

.delete-btn:hover {
    background: var(--gradient-primary);
    color: white;
    transform: scale(1.1) rotate(90deg);
    box-shadow: var(--shadow-primary-lg), 0 2px 6px rgba(0, 0, 0, 0.1);
    opacity: 1;
}

.delete-btn:active {
    transform: scale(0.95) rotate(90deg);
    box-shadow: var(--shadow-primary);
    opacity: 1;
}

/* 图片编辑器打开时，隐藏上传区域的删除按钮 */
.image-editor-overlay .image-upload .delete-btn,
.image-editor-active .image-upload .delete-btn,
.image-editor-active .compress-preview-container .delete-btn {
    display: none !important;
}

.close-x-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 28px;
    height: 28px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.3);
    z-index: 10;
}

.close-x-btn:hover {
    background: #ff6666;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.5);
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    background: transparent;
    width: 100%;
    min-height: 250px;
}

.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner-border {
    width: 100%;
    height: 100%;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ffb300;
    border-left: 4px solid #ffb300;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 20px rgba(255, 179, 0, 0.15);
    position: absolute;
    top: 0;
    left: 0;
}

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

.loading-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 24px;
    font-weight: 400;
}

.loading-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    max-width: 400px;
}

.tip-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.tip-text {
    font-size: 14px;
    color: #ff9800;
    line-height: 1.5;
    text-align: left;
}

.error-result {
    text-align: center;
    padding: 20px;
    background: #fff1f2;
    border-radius: 8px;
    border: 1px solid #fee2e2;
}

.error-result p {
    margin: 10px 0;
}

.btn-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: text-bottom;
}

/* Lightbox styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    cursor: pointer;
}

.lightbox-container {
    position: relative;
    display: inline-block;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-lg);
}

/* 首页样式 - 科技AI感 */

/* 英雄区域 */
.hero-section {
    display: flex;
    gap: 30px;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: linear-gradient(135deg, #fef7ec 0%, #fde6c8 100%);
    border-radius: 16px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(79, 172, 254, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 242, 254, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: none;
}

.hero-content {
    flex: 1;
    position: relative;
    z-index: 2;
    color: #1e293b;
}

.hero-content h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 16px;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 20px rgba(255, 107, 107, 0.2);
}

.hero-subtitle {
    font-size: 18px;
    color: #64748b;
    margin-bottom: 20px;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.hero-stats .stat-item {
    text-align: center;
}

.hero-stats .stat-number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 4px;
}

.hero-stats .stat-label {
    color: #94a3b8;
    font-size: 14px;
    font-weight: 500;
}

/* 视频容器样式 */
.hero-visual {
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
}

.hero-video-container {
    position: relative;
    width: 400px;
    border-radius: 16px;
    box-shadow: 0 0 20px rgba(79, 172, 254, 0.3);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
}

.hero-video {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    border-radius: 16px;
}

/* 响应式设计 - 英雄区域 */
@media (max-width: 768px) {
    .hero-section {
        flex-direction: column;
        padding: 30px 20px;
        gap: 20px;
        text-align: center;
    }
    
    .hero-visual {
        flex: 0 0 auto;
        width: 100%;
        max-width: 350px;
        display: flex;
        justify-content: center;
    }
    
    .hero-video-container {
        width: 100%;
        overflow: hidden;
        border-radius: 16px;
    }
    
    .hero-video {
        width: 100%;
        height: auto;
        object-fit: cover;
        border-radius: 16px;
    }
    
    .hero-content h2 {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: 20px;
        justify-content: center;
    }
    
    .hero-stats .stat-number {
        font-size: 24px;
    }
    
    .hero-stats .stat-label {
        font-size: 12px;
    }
    
    .hero-visual {
        flex: 0 0 auto;
        width: 100%;
        max-width: 350px;
        display: flex;
        justify-content: center;
    }
    
    .hero-video-container {
        width: 100%;
        overflow: hidden;
        border-radius: 16px;
    }
    
    .hero-video {
        width: 100%;
        height: auto;
        object-fit: cover;
        border-radius: 16px;
    }
    
    /* 调整装饰元素 */
    .hero-section::before {
        width: 300px;
        height: 300px;
        right: -50%;
        top: -20%;
    }
    
    .hero-section::after {
        width: 250px;
        height: 250px;
        left: -30%;
        bottom: -20%;
    }
}

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

/* 标题样式 - 用于技术优势区 */
.section-title {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    color: #1e293b;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 2px;
}



/* 技术优势区 */
.tech-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 40px 20px;
    border-radius: 16px;
    margin-bottom: 0;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.tech-item {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid transparent;
}

.tech-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(79, 172, 254, 0.15);
    border-color: #4facfe;
}

.tech-badge {
    font-size: 32px;
    margin-bottom: 15px;
    animation: none;
}

.tech-item h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1e293b;
}

.tech-item p {
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

/* 自定义 Alert 样式 */
.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease-out;
}

/* 提示笔记弹窗专用样式 */
.prompt-tips-box {
    animation: scaleIn 0.2s ease-out;
    border-radius: 12px !important;
    overflow: hidden;
}

@media (max-width: 768px) {
    .prompt-tips-box {
        width: 95vw !important;
        height: 75vh !important;
    }
}

.custom-alert-box {
    background: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 320px;
    text-align: center;
    animation: scaleIn 0.2s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.custom-alert-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
}

.custom-alert-icon svg {
    width: 100%;
    height: 100%;
}

.custom-alert-message {
    color: #333;
    font-size: 16px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.custom-alert-btn {
    background: #4facfe;
    color: white;
    border: none;
    padding: 8px 24px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.custom-alert-btn:hover {
    background: #3a9bdc;
}

/* 左右分栏布局 */
.input-side {
    background: var(--color-bg-card);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

@media (min-width: 769px) {
    .split-layout-container {
        display: flex;
        gap: 20px;
        align-items: stretch; /* 上下底对齐 */
        margin-top: 20px;
    }

    .input-side {
        flex: 1;
    }

    .result-section {
        flex: 1;
        margin-top: 0;
        height: auto;
        display: flex;
        flex-direction: column;
        background: var(--color-bg-card);
        padding: var(--spacing-lg);
        border-radius: var(--radius-lg);
        border: 1px solid var(--color-border-light);
        box-shadow: var(--shadow-sm);
    }


    .result-area {
        flex: 1; /* 让结果区域撑满剩余空间 */
    }

    /* 确保 textarea 在大屏下也有合适的高度 */
    .prompt-section textarea {
        min-height: 250px;
        height: 100%;
    }
}

/* 通用样式调整 */
.prompt-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.prompt-section label {
    font-size: 18px; /* 与 result-section h3 一致 */
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
}

/* 移除原有的 prompt-section margin-bottom，由 flex gap 控制 */
.upload-section .prompt-section {
    margin-bottom: 0;
}

/* Re-add missing styles for other sections */
.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.section-header label,
.section-header h3 {
    margin-bottom: 0;
    white-space: nowrap;
}

.prompt-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

/* 提示标签样式（统一合并） */
.prompt-hint,
.prompt-hint-inline,
.result-hint-inline,
.prompt-hint-block {
    font-size: 12px;
    color: var(--color-text-secondary);
    background-color: #fffbe6;
    border: 1px solid #ffeaa7;
    padding: 6px 10px;
    border-radius: 6px;
    line-height: 1.4;
    display: inline-block;
    width: auto;
}

/* 图片大小悬浮显示样式 */
.image-size-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 10;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    line-height: 1.4;
}

.image-size-badge > div {
    white-space: nowrap;
}

.image-wrapper:hover .image-size-badge,
.result-image-wrapper:hover .image-size-badge {
    opacity: 1;
    transform: translateY(0);
}

/* 下载按钮样式优化 */
.download-btn, .edit-btn {
    position: absolute;
    bottom: 10px;
    padding: 10px 20px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-primary-lg);
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(10px);
    animation: slideUpFade 0.5s ease forwards 0.3s;
    backdrop-filter: blur(5px);
    z-index: 10;
}

.edit-btn {
    left: 10px;
    animation-delay: 0.1s;
}

.download-btn {
    right: 10px;
    animation-delay: 0.3s;
}

.download-btn:hover, .edit-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
    background: linear-gradient(135deg, #ff8787 0%, #ff6b6b 100%);
}

.download-btn:active, .edit-btn:active {
    transform: translateY(1px) scale(0.98);
}

.download-btn svg, .edit-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.download-btn:hover svg, .edit-btn:hover svg {
    transform: translateY(2px);
}

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

.image-config-split-outer {
    display: flex;
    gap: 20px;
    align-items: stretch; /* Ensure both sides have equal height */
    margin-bottom: 25px;
}

.image-config-split-outer .upload-area {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
    background: var(--color-bg-card);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    height: auto; /* Allow auto height */
}

/* Re-add missing .image-settings-right styles */
.image-settings-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--color-bg-card);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-sm);
    height: auto;
}

.section-header-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.section-header-inline h3 {
    margin-bottom: 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.image-settings-right .setting-group:first-of-type {
    margin-top: 0; /* Ensure the first setting starts at the top */
}

.image-settings-right .setting-group:last-of-type {
    margin-bottom: 0; /* Ensure the last setting ends at the bottom */
}

.settings-container-flex {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* 图片比例区域跨越两列，宽度等于模型选择 + 分辨率 */
.image-settings-right .setting-group:last-child {
    grid-column: 1 / -1;
}

.image-settings-right .setting-group {
    background: white;
    padding: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
    gap: 8px; /* Increased gap between label and select */
}

.image-settings-right .setting-group label {
    color: #2c3e50;
    font-size: 14px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
    margin-bottom: 0; /* Remove margin as we use gap */
    display: block;
}

.image-settings-right .setting-group select {
    width: 100%;
    border-color: #cbd5e1;
    font-size: 14px; /* Ensure select text is also readable */
    color: #1e293b;
    padding: 10px 12px;
}

.image-settings-right .setting-group select:hover {
    border-color: #94a3b8;
}

/* Unified Mobile Responsive Styles */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .logo-wrapper {
        flex-direction: column;
        gap: 10px;
    }

    .card-nav {
        gap: 10px;
        padding: 15px;
        overflow-x: auto; /* 允许横向滚动如果屏幕太小 */
        justify-content: space-between; /* 在小屏幕上分散对齐 */
    }

    .nav-card {
        width: auto;
        min-width: 80px;
        height: 80px;
        flex: 1; /* 平分宽度 */
    }
    
    .image-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); /* 调小最小宽度以适应手机 */
    }

    .icp-info {
        margin-top: 15px; /* 增加一点间距 */
    }

    .split-layout-container {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .result-section {
        margin-top: 0;
    }

    .image-config-split-outer {
        flex-direction: column;
    }
    
    .image-settings-right {
        width: 100%;
        justify-content: flex-start;
    }

    .settings-container-flex {
        grid-template-columns: 1fr;
    }
    
    .image-settings-right .setting-group:last-child {
        grid-column: 1 / -1;
    }
}

/* Toast 提示样式 */
.toast-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 16px 32px;
    border-radius: var(--radius-lg);
    font-size: 15px;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.toast-notification.show {
    opacity: 1;
}

/* 下载成功提示样式 */
.download-success-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%) scale(0.8);
    background: linear-gradient(135deg, rgba(103, 194, 58, 0.95) 0%, rgba(103, 194, 58, 0.95) 100%);
    color: #fff;
    padding: 14px 28px;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 500;
    z-index: 10001;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
    text-align: center;
    box-shadow: 0 8px 24px rgba(103, 194, 58, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
}

.download-success-toast::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
}

.download-success-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-50%) scale(1);
}

/* ============================================
   图片压缩功能样式
   ============================================ */

/* 拖放区域：样式在 .compress-upload-panel 后面定义 */

.compress-drop-zone:hover,
.compress-drop-zone.drag-over {
    border-color: var(--color-primary);
    background: var(--color-primary-lighter);
    transform: scale(1.02);
}

.compress-drop-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.compress-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.compress-drop-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0;
}

.compress-drop-subtext {
    font-size: 14px;
    color: var(--color-text-muted);
    margin: 0 0 15px 0;
}

.browse-btn {
    padding: 10px 24px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-primary);
}

.browse-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-primary-lg);
}

.compress-image-preview {
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    background: var(--color-bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border-lighter);
    cursor: zoom-in;
    flex: 0 0 auto;
    min-height: 150px;
    max-height: 250px;
    transition: var(--transition-fast); /* 快速过渡动画，让hover效果更平滑 */
}

.compress-image-preview:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.compress-image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.compress-file-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    font-size: 13px;
    color: var(--color-text-secondary);
    margin-top: auto;
    align-self: flex-end;
    margin-top: 20px;
}

.file-info-item {
    padding: 6px 10px;
    background: var(--color-bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border-lighter);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.file-info-item strong {
    color: var(--color-text-primary);
}

/* 压缩模式选择 */
.compress-mode-control {
    margin-bottom: 20px;
}

.compress-mode-control label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 10px;
}

.mode-options {
    display: flex;
    gap: 12px;
}

.mode-radio {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    flex: 1;
    justify-content: center;
}

.mode-radio:hover {
    background: var(--color-bg-card);
    border-color: var(--color-primary);
}

.mode-radio input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.mode-radio input[type="radio"]:checked + span {
    color: var(--color-primary);
    font-weight: 600;
}

.mode-radio:has(input[type="radio"]:checked) {
    background: var(--color-bg-card);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.1);
}

.mode-radio span {
    font-size: 13px;
    color: var(--color-text-secondary);
}

/* 压缩控制区域 */
.compression-control {
    margin-bottom: 20px;
}

.quality-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.quality-value {
    color: var(--color-primary);
    font-size: 16px;
}

.slider-container {
    margin-bottom: 8px;
}

.quality-slider {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--color-border-lighter);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.quality-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    background: var(--gradient-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.4);
    transition: var(--transition-fast);
}

.quality-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 8px rgba(255, 107, 107, 0.5);
}

.quality-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    background: var(--gradient-primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.4);
}

.slider-ticks {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 5px;
}

/* 格式选择和预估大小一行显示 */
.compress-format-estimate-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.compress-format-control {
    flex: 1;
    min-width: 0;
}

.compress-format-control label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 8px;
}

.compress-format-control select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 14px;
    background: var(--color-bg-card);
    cursor: pointer;
    transition: var(--transition-fast);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    min-height: 44px; /* 与预估大小区域高度一致 */
}

.compress-estimate-container {
    flex: 1;
    min-width: 0;
    background: var(--color-bg-light);
    border-radius: var(--radius-md);
    padding: 12px 15px;
    margin-bottom: 0;
    border: 1px solid var(--color-border-lighter);
    min-height: 44px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.compress-format-control select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary-light);
}

/* 大小和尺寸输入框 */
.compress-size-control,
.compress-dimension-control {
    margin-bottom: 20px;
    min-height: 75px; /* 与质量模式保持一致的高度 */
}

.compress-size-control label,
.compress-dimension-control label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 8px;
}

.compress-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 14px;
    background: var(--color-bg-card);
    transition: var(--transition-fast);
}

.compress-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary-light);
}

.input-hint {
    display: block;
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 6px;
}

/* 压缩中容器 */
.compressing-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    text-align: center;
    gap: 15px;
}

.compressing-animation {
    position: relative;
    width: 60px;
    height: 60px;
    margin-bottom: 0;
}

.compressing-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 0;
}

.compressing-subtitle {
    font-size: 13px;
    color: var(--color-text-secondary);
    margin-bottom: 10px;
}

/* 进度条（内联在压缩容器中） */
.progress-container-inline {
    width: 100%;
    max-width: 400px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    gap: 15px;
}

.progress-bar-bg {
    width: 100%;
    height: 12px;
    background: var(--color-border-lighter);
    border-radius: 6px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--gradient-primary);
    border-radius: 6px;
    transition: width 0.3s ease;
}

.progress-percent {
    color: var(--color-primary);
    font-size: 16px;
    font-weight: bold;
}

/* 取消按钮（内联样式） */
.cancel-btn-inline {
    flex-shrink: 0;
    padding: 4px 10px;
    background: #fff;
    color: #666;
    border: 1px solid #ddd;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.cancel-btn-inline:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

/* 取消结果 */
.cancel-result {
    text-align: center;
    padding: 40px 20px;
    background: var(--color-bg-light);
    border-radius: var(--radius-lg);
}

/* 预估大小区域 */
.estimate-label {
    font-size: 13px;
    color: var(--color-text-secondary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
}

.estimate-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-success); /* 改成绿色 */
    display: flex;
    align-items: center;
    line-height: 1.2;
}

.estimate-value.larger {
    color: var(--color-primary);
}

.estimate-comparison {
    font-size: 12px;
    margin-top: 2px;
    display: flex;
    align-items: center;
    line-height: 1.2;
}

.comparison-good {
    color: var(--color-success);
}

.comparison-warning {
    color: var(--color-primary);
}

.comparison-neutral {
    color: var(--color-text-muted);
}

/* ============================================
   压缩功能布局样式 - 新版
   ============================================ */

/* 顶部行：右侧决定高度，左侧绝对定位填满 */
.compress-top-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    position: relative;
}

/* 上传面板和设置面板公共样式 */
.compress-upload-panel,
.compress-settings-panel {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* 上传面板：绝对定位填满左侧 grid cell，高度始终等于右侧，不参与高度撑开 */
.compress-upload-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: calc(50% - 10px); /* 50% 减去 gap 的一半 */
    overflow: hidden;
}

/* 设置面板：正常流，高度由内容决定，是行高基准 */
.compress-settings-panel {
    grid-column: 2;
    justify-content: space-between;
}

/* 拖放区域：flex:1 填满上传面板剩余高度，与右侧按钮底部对齐 */
.compress-drop-zone {
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-lg);
    padding: 40px 20px;
    text-align: center;
    background: var(--color-bg-light);
    transition: var(--transition-normal);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    margin-top: 12px;
    box-sizing: border-box;
}

/* 预览容器：上传后 flex:1 填满面板剩余高度 */
.compress-preview-container {
    margin-top: 0px;
    padding: 8px;
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: visible;
}

/* 结果行：完整宽度 */
.compress-result-row {
    width: 100%;
}

.compress-full-width {
    width: 100%;
}

.compress-full-width .result-area {
    min-height: 200px;
}

/* ============================================
   压缩结果水平布局 - 图片左，统计右
   ============================================ */
.compress-result-horizontal {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    width: 100%;
    padding: 15px;
}

.compress-result-left {
    flex: 0 0 auto;
    max-width: 50%;
}

.compress-result-img {
    max-width: 100%;
    max-height: 250px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border-light);
    cursor: zoom-in;
    transition: var(--transition-fast);
}

.compress-result-img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.compress-result-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 0;
}

.compress-result-stats {
    background: var(--color-bg-light);
    border-radius: var(--radius-md);
    padding: 12px 15px;
    border: 1px solid var(--color-border-lighter);
}

.compress-result-stats .stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border-lighter);
}

.compress-result-stats .stat-item:last-child {
    border-bottom: none;
}

.stat-name {
    font-size: 13px;
    color: var(--color-text-secondary);
}

.stat-num {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.stat-num.highlight {
    color: var(--color-primary);
    font-size: 15px;
}

.stat-num.success {
    color: var(--color-success);
    font-size: 15px;
}

/* 下载按钮 */
.compress-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-primary);
}

.compress-download-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-primary-lg);
    color: white;
}

.compress-download-btn svg {
    width: 16px;
    height: 16px;
}

/* 压缩新图片按钮 */
.compress-new-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--color-bg-light);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.compress-new-btn:hover {
    background: var(--color-bg-light);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* 压缩功能响应式样式 */
@media (max-width: 768px) {
    .compress-top-row {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .compress-upload-panel {
        position: relative;
        width: 100%;
        order: 1;
    }

    .compress-settings-panel {
        width: 100%;
        order: 2;
    }

    .compress-result-horizontal {
        flex-direction: column;
        align-items: center;
    }

    .compress-result-left {
        max-width: 100%;
    }

    .compress-result-img {
        max-height: 200px;
    }
}

/* ============================================
   历史记录功能样式
   ============================================ */

/* 历史记录展开窗口 */
.history-expand-window {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 320px;
    max-height: 500px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--color-border-light);
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(20px) scale(0.95);
}

.history-expand-window.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.history-expand-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: var(--gradient-primary);
    color: white;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.history-expand-header h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.history-expand-controls {
    display: flex;
    gap: 6px;
}

.history-expand-minimize-btn {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    transition: var(--transition-fast);
    padding: 0;
}

.history-expand-minimize-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.history-expand-content {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.history-expand-content::-webkit-scrollbar {
    width: 6px;
}

.history-expand-content::-webkit-scrollbar-track {
    background: var(--color-bg-light);
    border-radius: 3px;
}

.history-expand-content::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 3px;
}

.history-expand-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-expand-empty {
    text-align: center;
    padding: 30px 15px;
    color: var(--color-text-muted);
    font-size: 13px;
}

.history-expand-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-xs);
    transition: var(--transition-fast);
    cursor: pointer;
    position: relative;
}

.history-expand-item:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
    transform: translateX(-3px);
    background: var(--color-primary-lighter);
}

.history-expand-item.active {
    border-color: var(--color-primary);
    background: var(--color-primary-lighter);
    box-shadow: var(--shadow-md);
}

/* 历史记录禁用状态 */
.history-expand-window.disabled .history-expand-item {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.history-expand-window.disabled .history-expand-item:hover {
    transform: none;
    border-color: var(--color-border-light);
    box-shadow: var(--shadow-xs);
    background: var(--color-bg-card);
}

.history-expand-window.disabled .history-expand-action-btn {
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.5;
}

.history-expand-index {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.history-expand-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--color-bg-light);
    border: 1px solid var(--color-border-lighter);
}

.history-expand-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.history-expand-info {
    flex: 1;
    min-width: 0;
}

.history-expand-prompt {
    font-size: 13px;
    color: var(--color-text-primary);
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-expand-meta {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: var(--color-text-muted);
}

.history-expand-time {
    display: flex;
    align-items: center;
    gap: 3px;
}

.history-expand-actions {
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: var(--transition-fast);
}

.history-expand-item:hover .history-expand-actions {
    opacity: 1;
}

.history-expand-action-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: var(--color-bg-light);
    color: var(--color-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.history-expand-action-btn:hover {
    background: var(--color-primary);
    color: white;
    transform: scale(1.1);
}

.history-expand-delete-btn:hover {
    background: #ff4444;
    color: white;
}

/* 历史记录固定图标 */
.history-fixed-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 101;
    transition: all 0.3s ease;
    border: 2px solid white;
}

.history-fixed-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

.history-icon {
    font-size: 20px;
    color: white;
}

.history-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* 历史记录响应式调整 */
@media (max-width: 768px) {
    .history-expand-window {
        width: calc(100vw - 40px);
        max-width: 300px;
        bottom: 80px;
        right: 20px;
        left: auto;
    }
    
    .history-expand-content {
        max-height: 300px;
    }
    
    .history-expand-thumbnail {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .history-expand-window {
        width: calc(100vw - 20px);
        right: 10px;
        left: 10px;
    }
    
    .history-fixed-icon {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
    }
}

/* ============================================
   图片编辑器样式
   ============================================ */
.image-editor-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.image-editor-overlay.active {
    display: flex;
}

.image-editor-container {
    background: var(--color-bg-card);
    border-radius: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: visible;
    position: relative;
}

.image-editor-header {
    padding: 16px 24px;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    border-radius: 0;
}

/* 图片编辑器头部内的删除按钮 - 覆盖通用样式 */
.image-editor-header .delete-btn {
    position: static !important;
    margin-left: auto;
}

.image-editor-title {
    font-size: 18px;
    font-weight: 600;
}

.image-editor-close {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.image-editor-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.image-editor-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
    min-height: 0;
}

.image-editor-canvas-container {
    flex: 1;
    background: #1a1a1a;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    min-height: 0;
    width: 100%;
    height: 100%;
}

#editor-stage {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    background: transparent;
    overflow: hidden;
}

.image-editor-toolbar {
    padding: 12px 24px;
    background: var(--color-bg-light);
    border-top: 1px solid var(--color-border);
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    flex-shrink: 0;
    border-radius: 0;
}

.editor-tool-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.editor-tool-btn {
    padding: 8px 12px;
    border: 2px solid var(--color-border);
    background: white;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.editor-tool-btn:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

.editor-tool-btn.active {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: white;
}

.editor-color-picker {
    width: 40px;
    height: 32px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    padding: 2px;
}

.editor-size-slider {
    width: 100px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--color-border);
    border-radius: var(--radius-full);
    outline: none;
}

.editor-size-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--color-primary);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.editor-size-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.editor-action-btn {
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.editor-save-btn {
    background: var(--gradient-primary);
    color: white;
}

.editor-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

.editor-cancel-btn {
    background: var(--color-bg-light);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
}

.editor-cancel-btn:hover {
    background: var(--color-border-light);
}

.editor-zoom-controls {
    display: flex;
    gap: 4px;
    align-items: center;
}

.editor-zoom-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--color-border);
    background: white;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
}

.editor-zoom-btn:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

.editor-zoom-level {
    min-width: 50px;
    text-align: center;
    font-size: 13px;
    color: var(--color-text-secondary);
}

@media (max-width: 768px) {
    .image-editor-container {
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .image-editor-toolbar {
        padding: 8px 12px;
        gap: 8px;
    }
    
    .editor-tool-btn span,
    .editor-action-btn span {
        display: none;
    }
    
    .image-editor-canvas-container {
        width: 100vw;
        height: calc(100vh - 120px);
    }
}


