/* ============================================
   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-text-dark: #1e293b;
    
    /* 背景色 */
    --color-bg-main: #f5f7fa;
    --color-bg-light: #f8f9fa;
    --color-bg-card: #ffffff;
    --color-bg-muted: #fafafa;
    
    /* 边框颜色 */
    --color-border: #dcdfe6;
    --color-border-light: #e0e6ed;
    --color-border-lighter: #e9ecef;
    
    /* 提示标签颜色 */
    --color-hint-bg: #fffbe6;
    --color-hint-border: #ffeaa7;
    
    /* 状态颜色 */
    --color-success: #67c23a;
    --color-success-bg: #f0f9eb;
    --color-success-border: #c2e7b0;
    --color-error-bg: #fff1f2;
    --color-error-border: #fee2e2;
    --color-warning: #E6A23C;
    --color-warning-bg: #fdf6ec;
    
    /* 其他颜色 */
    --color-primary-bg-light: #fff5f5;
    --gradient-hero-bg: linear-gradient(135deg, #fef7ec 0%, #fde6c8 100%);
    
    /* 品牌渐变 */
    --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%);
    
    /* 阴影 */
    --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);
    
    /* z-index 层级系统 */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 900;
    --z-modal: 1000;
}

/* ============================================
   基础重置
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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;
}

/* ============================================
   公共工具类（新增）
   ============================================ */

/* Flex 布局工具类 */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-center { 
    display: flex;
    justify-content: center;
    align-items: center;
}
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.flex-around {
    display: flex;
    justify-content: space-around;
    align-items: center;
}
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

/* 文本工具类 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.font-bold { font-weight: 600; }
.font-medium { font-weight: 500; }

/* 间距工具类 */
.m-0 { margin: 0; }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }

/* 位置工具类 */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }

/* 溢出工具类 */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

/* 宽高工具类 */
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

/* ============================================
   高优：公共卡片样式（减少重复定义）
   ============================================ */
.card {
    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);
}

/* 应用卡片样式的元素 */
.upload-area,
.result-section,
.input-side,
.compress-upload-panel,
.compress-settings-panel {
    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);
}

/* ============================================
   高优：公共提示标签样式（合并所有 hint 类）
   ============================================ */
.hint-tag {
    font-size: 12px;
    color: var(--color-text-secondary);
    background-color: var(--color-hint-bg);
    border: 1px solid var(--color-hint-border);
    padding: 6px 10px;
    border-radius: var(--radius-md);
    line-height: 1.4;
    display: inline-block;
    width: auto;
}

/* 应用提示标签样式的元素 - 统一使用 .hint-tag 类 */

/* ============================================
   容器布局
   ============================================ */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0;
    background: var(--color-bg-card);
    min-height: 100vh;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

/* ============================================
   头部样式
   ============================================ */
.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: var(--spacing-lg);
    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: var(--transition-normal);
    backdrop-filter: blur(5px);
    z-index: var(--z-base);
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.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: var(--spacing-lg);
    z-index: var(--z-base);
    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));
    will-change: transform;
    animation: float 3s ease-in-out infinite;
}

.logo-glow {
    position: absolute;
    width: 40px;
    height: 40px;
    background: rgba(79, 172, 254, 0.4);
    filter: blur(20px);
    border-radius: var(--radius-full);
    z-index: -1;
    will-change: transform, opacity;
    animation: pulse 2s ease-in-out infinite;
}

@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: var(--color-text-lightest);
    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: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.nav-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: var(--color-bg-card);
}

.nav-card.active {
    background: var(--color-primary-bg-light);
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.15);
}

.nav-icon {
    font-size: 32px;
    margin-bottom: var(--spacing-sm);
    line-height: 1;
}

.nav-text {
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
}

/* ============================================
   内容区域
   ============================================ */
.main {
    padding: var(--spacing-lg);
}

.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 {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.upload-area {
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.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: var(--spacing-md);
    margin-bottom: 0;
    flex: 1;
}

.image-upload {
    width: 100%;
    aspect-ratio: 1;
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-md);
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--color-bg-muted);
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.image-upload:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-bg-light);
    transform: scale(1.02);
}

.image-upload .file-input,
.image-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.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: var(--transition-fast);
}

.upload-overlay:hover {
    background: rgba(255, 255, 255, 0.9);
}

.image-upload.has-image .upload-overlay {
    display: none;
}

.upload-overlay span {
    color: var(--color-text-light);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    padding: var(--spacing-sm);
    pointer-events: none;
}

/* ============================================
   设置组
   ============================================ */
.setting-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.setting-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.setting-group select {
    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);
    cursor: pointer;
}

/* ============================================
   API Key 区域
   ============================================ */
.api-key-section {
    margin-bottom: var(--spacing-xl);
}

.api-key-section label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.api-key-wrapper {
    position: relative;
    margin-bottom: 10px;
    width: 100%;
}

.api-key-input {
    width: 100%;
    padding: 12px 40px 12px 12px;
    border: 2px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    font-size: 16px;
    height: 48px;
    box-sizing: border-box;
    transition: var(--transition-fast);
    display: block;
}

/* ============================================
   通用 Focus 样式
   ============================================ */
.api-key-input: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: var(--color-text-light);
    padding: var(--spacing-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    z-index: 2;
}

.api-key-toggle:hover {
    color: var(--color-text-secondary);
}

.quota-btn {
    padding: 4px 12px;
    background-color: var(--color-success-bg);
    color: var(--color-success);
    border: 1px solid var(--color-success-border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.quota-btn:hover {
    background-color: var(--color-success);
    color: white;
}

.quota-btn:disabled {
    background-color: var(--color-success-bg);
    color: #a0cfff;
    cursor: not-allowed;
    opacity: 0.7;
}

/* ============================================
   提示文本
   ============================================ */
.prompt-hint {
    color: var(--color-text-muted);
    font-size: 13px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.prompt-section textarea {
    width: 100%;
    min-height: 100px;
    padding: var(--spacing-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
    transition: var(--transition-fast);
    line-height: 1.5;
}

.violation-warning {
    display: block;
    color: var(--color-primary);
    font-size: 13px;
    margin-top: var(--spacing-sm);
    font-weight: 500;
    line-height: 1.4;
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    background: var(--color-bg-card);
}

/* ============================================
   生成按钮
   ============================================ */
.generate-btn {
    width: 100%;
    padding: 14px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    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: var(--shadow-primary);
}

.generate-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ============================================
   结果区域
   ============================================ */
.result-section {
    margin-top: 30px;
}

.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: var(--color-bg-muted);
    padding: 20px 10px;
    border-radius: var(--radius-md);
    min-height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px dashed var(--color-border);
    margin-top: 0;
}

.empty-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.empty-result p {
    color: var(--color-text-light);
    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: var(--radius-md);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--color-border-light);
    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);
    text-decoration: none;
    transition: color 0.2s;
}

.icp-info a:hover {
    color: var(--color-text-secondary);
}

/* ============================================
   视频网格布局
   ============================================ */
.video-grid {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: var(--spacing-md);
}

.video-grid .video-upload-box {
    width: 100%;
    aspect-ratio: auto;
    flex: 1;
    min-height: 80px;
}

.video-sub-grid {
    display: flex;
    gap: var(--spacing-md);
    flex: 1;
    min-height: 80px;
}

.video-sub-grid .video-upload-box {
    width: 100%;
    flex: 1;
}

.main-video-upload {
    flex: 1.5;
}

/* 视频上传区域布局 - 动态类（保留用于未来扩展） */
/* .video-grid-vertical 和 .video-grid-horizontal 类保留但当前未使用 */

/* ============================================
   已上传图片
   ============================================ */
.uploaded-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
    z-index: 3;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.image-upload:hover .uploaded-image {
    transform: scale(1.02);
}

/* ============================================
   通用关闭/删除按钮样式
   ============================================ */
.delete-btn,
.lightbox-close {
    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-size: 16px;
    font-weight: 600;
    line-height: 1;
    padding: 0;
    margin: 0;
    z-index: 4;
    box-shadow: var(--shadow-sm), var(--shadow-xs);
    transition: var(--transition-smooth);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0.7;
}

.lightbox-close {
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    z-index: var(--z-modal);
}

.delete-btn:hover,
.lightbox-close: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,
.lightbox-close:active {
    transform: scale(0.95) rotate(90deg);
    box-shadow: var(--shadow-primary);
    opacity: 1;
}

/* ============================================
   加载状态
   ============================================ */
.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: var(--radius-full);
    will-change: transform;
    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: var(--spacing-sm);
    padding: 12px 16px;
    background: var(--color-bg-light);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-lighter);
    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;
}

/* ============================================
   视频生成进度条
   ============================================ */
.video-progress-container {
    width: 100%;
    max-width: 400px;
    margin-bottom: 24px;
}

.video-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--color-border-lighter);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 12px;
}

.video-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--gradient-brand);
    border-radius: var(--radius-sm);
    transition: width 0.3s ease;
    position: relative;
}

.video-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    will-change: transform;
    animation: progressShine 1.5s ease-in-out infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.video-progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.video-progress-text #video-progress-percent {
    font-weight: 600;
    color: #4facfe;
}

.video-progress-text #video-progress-status {
    color: #666;
}

/* ============================================
   错误结果
   ============================================ */
.error-result {
    text-align: center;
    padding: var(--spacing-lg);
    background: var(--color-error-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-error-border);
}

.error-result p {
    margin: 10px 0;
}

/* ============================================
   动画关键帧
   ============================================ */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   按钮加载指示器
   ============================================ */
.btn-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
    border-top-color: #fff;
    will-change: transform;
    animation: spin 0.8s linear infinite;
    margin-right: var(--spacing-sm);
    vertical-align: text-bottom;
}

/* ============================================
   Lightbox 样式
   ============================================ */
.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: var(--z-modal-backdrop);
    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);
}

/* ============================================
   首页英雄区域
   ============================================ */
.hero-section {
    display: flex;
    gap: 30px;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: var(--gradient-hero-bg);
    border-radius: var(--radius-2xl);
    margin-bottom: var(--spacing-lg);
    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: var(--radius-full);
    will-change: transform, opacity;
    animation: pulse 4s ease-in-out infinite;
}

.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: var(--radius-full);
    will-change: transform, opacity;
    animation: pulse 3s ease-in-out infinite 1s;
}

.hero-content {
    flex: 1;
    position: relative;
    z-index: 2;
    color: var(--color-text-dark);
}

.hero-content h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa502 100%);
    -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: var(--spacing-lg);
    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: linear-gradient(135deg, #ff6b6b 0%, #ffa502 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 4px;
}

.hero-stats .stat-label {
    color: var(--color-text-lightest);
    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: var(--radius-2xl);
    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;
}

/* ============================================
   标题样式 - 技术优势区
   ============================================ */
.section-title {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    color: var(--color-text-dark);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-brand);
    border-radius: 2px;
}

/* ============================================
   技术优势区
   ============================================ */
.tech-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 40px 20px;
    border-radius: var(--radius-2xl);
    margin-bottom: 0;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    margin-top: 30px;
}

.tech-item {
    background: var(--color-bg-card);
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    transition: var(--transition-normal);
    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;
    will-change: transform;
    animation: bounce 2s ease-in-out infinite;
}

.tech-item h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--color-text-dark);
}

.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: var(--z-modal);
    animation: fadeIn 0.2s ease-out;
}

.custom-alert-box {
    background: var(--color-bg-card);
    padding: 24px;
    border-radius: var(--radius-lg);
    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: var(--radius-sm);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.custom-alert-btn:hover {
    background: #00f2fe;
}

/* 关于模态框图片样式 */
.custom-alert-message img {
    display: block;
    margin: 0 auto 15px;
    width: 200px;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* 响应式调整 */
@media (max-width: 480px) {
    .custom-alert-message img {
        width: 160px;
    }
}

/* ============================================
   分栏布局（基础样式，高优：提取重复）
   ============================================ */
.split-layout-container {
    margin-top: var(--spacing-lg);
}

.input-side {
    display: flex;
    flex-direction: column;
}

/* 大屏布局 */
@media (min-width: 769px) {
    .split-layout-container {
        display: flex;
        gap: var(--spacing-lg);
        align-items: stretch;
    }

    .input-side {
        flex: 1;
    }

    .result-section {
        flex: 1;
        margin-top: 0;
        display: flex;
        flex-direction: column;
    }

    .result-area {
        flex: 1;
    }

    .prompt-section textarea {
        min-height: 250px;
        height: 100%;
    }
}

/* ============================================
   通用样式调整
   ============================================ */
.prompt-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: var(--spacing-lg);
}

.prompt-section label {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.upload-section .prompt-section {
    margin-bottom: 0;
}

/* 高优：删除 !important，使用更具体的选择器 */
.section-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.section-header > label,
.section-header > h3 {
    margin-bottom: 0;
    white-space: nowrap;
}

/* 水印开关样式 - 融合设计 */
.watermark-toggle-inline {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    cursor: pointer;
    user-select: none;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    padding: 4px 10px 4px 6px;
    border-radius: 16px;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
    height: 22px;
    box-sizing: border-box;
}

.watermark-toggle-inline:hover {
    border-color: #bbb;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.watermark-toggle-inline input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-track {
    position: relative;
    width: 28px;
    height: 14px;
    background: #ccc;
    border-radius: 14px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.toggle-thumb {
    position: absolute;
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.toggle-text {
    font-size: 12px;
    color: #666;
    margin-left: 6px;
    font-weight: 500;
    line-height: 1;
}

/* 选中状态 */
.watermark-toggle-inline input:checked ~ .toggle-track {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.watermark-toggle-inline input:checked ~ .toggle-track .toggle-thumb {
    transform: translateX(14px);
}

.watermark-toggle-inline input:checked ~ .toggle-text {
    color: #667eea;
}

/* ============================================
   按钮基础样式系统（优化版）
   ============================================ */

/* 按钮基础类 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 12px;
    border: none;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    backdrop-filter: blur(5px);
}

.btn svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.btn:hover svg {
    transform: translateY(1px);
}

/* 按钮变体 */
.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.5);
    background: linear-gradient(135deg, #ff8787 0%, #ff6b6b 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #7b8eef 0%, #8a5db5 100%);
}

.btn:active {
    transform: translateY(1px) scale(0.98);
}

/* 按钮位置类 */
.btn-pos-left {
    position: absolute;
    bottom: 10px;
    left: 10px;
}

.btn-pos-right {
    position: absolute;
    bottom: 10px;
    right: 10px;
}

/* 动画延迟类 */
.btn-delay-1 {
    animation-delay: 0.1s;
}

.btn-delay-3 {
    animation-delay: 0.3s;
}

/* 旧类名保持兼容（展开完整样式） */
/* 结果区域按钮公共样式 */
.result-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 12px;
    border: none;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    backdrop-filter: blur(5px);
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: absolute;
    bottom: 10px;
    opacity: 0;
    transform: translateY(10px);
    animation: slideUpFade 0.5s ease forwards 0.3s;
    z-index: var(--z-base);
}

.result-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.5);
    background: linear-gradient(135deg, #ff8787 0%, #ff6b6b 100%);
}

.result-btn svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.result-btn:hover svg {
    transform: translateY(1px);
}

/* 下载按钮 - 右侧 */
.download-btn {
    right: 10px;
    animation-delay: 0.3s;
}

/* 编辑按钮 - 左侧 */
.edit-btn {
    left: 10px;
    animation-delay: 0.1s;
}

.edit-btn svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.edit-btn:hover svg {
    transform: translateY(1px);
}

.copy-link-btn {
    /* 继承 .btn */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 12px;
    border: none;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    backdrop-filter: blur(5px);
    /* 继承 .btn-secondary */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    /* 继承 .btn-pos-left */
    position: absolute;
    bottom: 10px;
    left: 10px;
    /* 继承 .btn-delay-1 */
    animation-delay: 0.1s;
    /* 原有样式 */
    opacity: 0;
    transform: translateY(10px);
    animation: slideUpFade 0.5s ease forwards 0.3s;
    z-index: var(--z-base);
}

.copy-link-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #7b8eef 0%, #8a5db5 100%);
}

.copy-link-btn svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.copy-link-btn:hover svg {
    transform: translateY(1px);
}

/* ============================================
   配置区分栏
   ============================================ */
.image-config-split-outer {
    display: flex;
    gap: var(--spacing-lg);
    align-items: stretch;
    margin-bottom: var(--spacing-xl);
}

.image-config-split-outer .upload-area {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    height: auto;
}

.image-settings-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: 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: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.section-header-inline h3 {
    margin-bottom: 0;
    color: var(--color-text-primary);
    font-size: 18px;
    font-weight: 600;
}

.image-settings-right .setting-group:first-of-type {
    margin-top: 0;
}

.image-settings-right .setting-group:last-of-type {
    margin-bottom: 0;
}

.settings-container-flex {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: var(--spacing-lg);
}

.image-settings-right .setting-group {
    background: var(--color-bg-card);
    padding: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
    gap: var(--spacing-sm);
}

.image-settings-right .setting-group label {
    color: var(--color-text-primary);
    font-size: 14px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
    margin-bottom: 0;
    display: block;
}

.image-settings-right .setting-group select {
    width: 100%;
    border-color: #cbd5e1;
    font-size: 14px;
    color: var(--color-text-dark);
    padding: 10px 12px;
}

.image-settings-right .setting-group select:hover {
    border-color: #94a3b8;
}

/* ============================================
   移动端响应式（中优：提取重复样式）
   ============================================ */
@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: var(--spacing-lg);
    }

    .result-section {
        margin-top: 0;
    }

    .image-config-split-outer {
        flex-direction: column;
    }
    
    .image-settings-right {
        width: 100%;
        justify-content: flex-start;
    }

    /* 英雄区域响应式 */
    .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;
    }
    
    .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-section::before {
        width: 300px;
        height: 300px;
        right: -50%;
        top: -20%;
    }
    
    .hero-section::after {
        width: 250px;
        height: 250px;
        left: -30%;
        bottom: -20%;
    }
}

/* ============================================
   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: var(--z-modal);
    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;
}

/* ============================================
   额度查询弹窗样式
   ============================================ */
.quota-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal-backdrop);
}

.quota-modal-container {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 800px;
    height: 80vh;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.quota-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: 500;
    font-size: 15px;
}

.quota-modal-close {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: var(--spacing-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.quota-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.quota-modal-body {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.quota-modal-body .quota-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-text-light);
    font-size: 14px;
}

.quota-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ============================================
   单张参考图提示
   ============================================ */
.single-ref-hint {
    color: var(--color-warning);
    font-size: 13px;
    margin: 0 0 10px 0;
    padding: 6px 10px;
    background: var(--color-warning-bg);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--color-warning);
}

/* ============================================
   API Key 模态框样式
   ============================================ */
.api-key-modal-box {
    width: 400px;
    text-align: left;
    align-items: stretch;
}

.api-key-modal-header {
    text-align: center;
    margin-bottom: 15px;
}

.api-key-modal-header h3 {
    margin: 0;
    color: var(--color-text-primary);
}

.api-key-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.api-key-remember-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.api-key-remember-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.api-key-remember-group label {
    font-size: 14px;
    color: var(--color-text-secondary);
    cursor: pointer;
    margin: 0;
    font-weight: normal;
}

.api-key-modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.api-key-modal-buttons .custom-alert-btn {
    flex: 1;
}

.api-key-modal-buttons .custom-alert-btn.cancel {
    background: #909399;
}

/* 关于模态框样式 */
.about-modal-content {
    line-height: 1.6;
}

.about-modal-content img {
    width: 200px;
    height: auto;
    margin-bottom: 15px;
    border-radius: var(--radius-lg);
}

.about-modal-text {
    white-space: pre-line;
}

/* ============================================
   图片压缩功能样式
   ============================================ */

/* 压缩上传区域 */
.compress-upload-area {
    min-height: 400px;
}

/* 拖放区域 */
.compress-drop-zone {
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-lg);
    padding: 40px 20px;
    text-align: center;
    background: var(--color-bg-muted);
    transition: var(--transition-normal);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 367px;
}

.compress-drop-zone:hover,
.compress-drop-zone.drag-over {
    border-color: var(--color-primary);
    background: var(--color-primary-bg-light);
    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-preview-container {
    margin-top: 20px;
    padding: 15px;
    background: var(--color-bg-light);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
}

.compress-preview-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 15px;
    text-align: center;
}

.compress-image-preview {
    width: 100%;
    max-height: 320px;
    overflow: hidden;
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    background: var(--color-bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
}

.compress-image-preview img {
    max-width: 100%;
    max-height: 320px;
    object-fit: contain;
}

.compress-file-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    font-size: 13px;
    color: var(--color-text-secondary);
}

.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-controls {
    margin-top: 20px;
    padding: 20px;
    background: var(--color-bg-light);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
}

.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: 20px;
    height: 20px;
    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.1);
    box-shadow: 0 3px 8px rgba(255, 107, 107, 0.5);
}

.quality-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    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);
}

/* 格式选择 */
.compress-format-control {
    margin-bottom: 20px;
}

.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);
}

.compress-format-control select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary-light);
}

/* 压缩结果 */
.compress-result-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px;
}

.compress-result-image-container {
    width: 100%;
    max-height: 300px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--color-bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border-light);
}

.compress-result-image {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
}

.compress-result-info {
    width: 100%;
    text-align: center;
}

.compress-stats {
    background: var(--color-bg-light);
    border-radius: var(--radius-lg);
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid var(--color-border-light);
}

/* 统计行样式 - 与 .stat-item 共享基础样式 */
.stat-row,
.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border-lighter);
}

.stat-row {
    padding: 8px 0;
}

.stat-item {
    padding: 12px 0;
}

.stat-row:last-child,
.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    font-size: 14px;
    color: var(--color-text-secondary);
}

.stat-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.stat-value.highlight {
    color: var(--color-primary);
    font-size: 16px;
}

.stat-value.success {
    color: var(--color-success);
    font-size: 16px;
}

/* 下载按钮 */
.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);
    margin-bottom: 10px;
}

.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-muted);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* ============================================
   压缩功能布局样式 - 新版
   ============================================ */

/* 顶部行：上传和设置水平排列 */
.compress-top-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    align-items: stretch;
}

/* 上传面板 */
.compress-upload-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;
}

/* 设置面板 */
.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;
    height: fit-content;
}

/* 设置占位区域 */
.compress-settings-placeholder {
    background: var(--color-bg-muted);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 2px dashed var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.placeholder-content {
    text-align: center;
    color: var(--color-text-muted);
}

.placeholder-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
}

.placeholder-text {
    font-size: 14px;
    margin: 0;
}

/* 结果行：完整宽度 */
.compress-result-row {
    width: 100%;
}

.compress-full-width {
    width: 100%;
}

.compress-full-width .result-area {
    min-height: 200px;
}

/* ============================================
   上传区域优化 - 预览区域
   ============================================ */

/* 预览容器优化 */
.compress-preview-container {
    margin-top: 10px;
    padding: 8px;
    background: var(--color-bg-light);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
    position: relative;
}

/* 预览容器内的删除按钮定位 */
.compress-preview-container .delete-btn {
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    font-size: 14px;
    z-index: 10;
}

/* 图片预览区域优化 - 增大图片尺寸 */
.compress-image-preview {
    width: 100%;
    max-height: 280px;
    min-height: 200px;
    overflow: hidden;
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    background: var(--color-bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border-lighter);
}

.compress-image-preview img {
    max-width: 100%;
    max-height: 280px;
    min-height: 200px;
    object-fit: contain;
}

/* 文件信息优化 - 更紧凑 */
.compress-file-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    font-size: 11px;
    color: var(--color-text-secondary);
    margin: 0;
}

.file-info-item {
    padding: 4px 6px;
    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-estimate-container {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    border-radius: var(--radius-lg);
    padding: 12px 15px;
    margin: 12px 0;
    border: 1px solid var(--color-border-light);
    text-align: center;
    transition: var(--transition-normal);
}

.compress-estimate-container:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.estimate-label {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 5px;
    font-weight: 500;
}

.estimate-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary);
    margin: 5px 0;
    transition: var(--transition-fast);
}

.estimate-value.larger {
    color: #ff6b6b;
}

.estimate-comparison {
    font-size: 13px;
    margin-top: 5px;
}

.comparison-good {
    color: var(--color-success);
    font-weight: 500;
}

.comparison-warning {
    color: #ff6b6b;
    font-weight: 500;
}

.comparison-neutral {
    color: var(--color-text-muted);
}

/* 响应式调整 */
@media (max-width: 768px) {
    /* 移动端：上下排列 */
    .compress-top-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .compress-upload-area {
        min-height: auto;
    }
    
    .compress-drop-zone {
        padding: 30px 15px;
    }
    
    .compress-icon {
        font-size: 36px;
    }
    
    .compress-drop-text {
        font-size: 16px;
    }
    
    .compress-file-info {
        grid-template-columns: 1fr;
    }
    
    .compress-result-wrapper {
        padding: 10px;
    }
    
    .compress-settings-placeholder {
        min-height: 200px;
    }
    
    .compress-upload-panel,
    .compress-settings-panel {
        padding: 15px;
    }
}

/* ============================================
   压缩结果水平布局 - 图片左，统计右
   ============================================ */

.compress-result-horizontal {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 20px;
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
}

.compress-result-left {
    flex: 0 0 auto;
    max-width: 60%;
}

.compress-result-img {
    max-width: 100%;
    max-height: 280px;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.compress-result-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    min-width: 200px;
}

.compress-result-stats {
    width: 100%;
    background: var(--color-bg-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--color-border-light);
}

/* .stat-item 基础样式已合并到 .stat-row 中 */
.stat-name {
    font-size: 14px;
    color: var(--color-text-secondary);
}

.stat-num {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.stat-num.highlight {
    color: var(--color-primary);
    font-size: 18px;
}

.stat-num.success {
    color: var(--color-success);
    font-size: 18px;
}

/* 平板设备 */
@media (min-width: 769px) and (max-width: 1024px) {
    .compress-top-row {
        gap: 15px;
    }
    
    .compress-upload-panel,
    .compress-settings-panel {
        padding: 15px;
    }
}

/* 移动端：垂直排列 */
@media (max-width: 768px) {
    .compress-result-horizontal {
        flex-direction: column;
        gap: 20px;
        padding: 15px;
    }
    
    .compress-result-left {
        max-width: 100%;
        width: 100%;
    }
    
    .compress-result-img {
        max-height: 200px;
        width: 100%;
    }
    
    .compress-result-right {
        width: 100%;
        min-width: auto;
    }
    
    .compress-result-stats {
        padding: 15px;
    }
    
    .stat-item {
        padding: 10px 0;
    }
}
