/* 全局样式 - 现代化设计 */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --accent-color: #f59e0b;
    --text-dark: #0f172a;
    --text-gray: #64748b;
    --text-light: #94a3b8;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(180deg, #FFF9E6 0%, #FFF5D6 100%);
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    min-height: 100vh;
}

/* 网格背景效果 - 增强可见度 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(to right, rgba(99, 102, 241, 0.12) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(99, 102, 241, 0.12) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* 渐变叠加效果 */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* 确保内容在网格之上 */
body > * {
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 导航栏 - 极简风格 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    gap: 32px;
}

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

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
    transition: all 0.3s ease;
}

.logo:hover .logo-icon {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}

.logo-text h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.02em;
    margin-bottom: 2px;
}

.logo-text p {
    font-size: 11px;
    color: var(--text-gray);
    font-weight: 500;
    letter-spacing: 0.01em;
}

.nav-menu {
    display: flex;
    gap: 40px;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease;
    position: relative;
    padding: 8px 0;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-menu a.active {
    color: var(--primary-color);
}

.nav-menu a.active::after {
    width: 100%;
}

/* 导航下拉菜单 */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    padding: 12px;
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: #f8fafc;
}

.dropdown-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.dropdown-title {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.dropdown-desc {
    font-size: 13px;
    color: #64748b;
}

/* 导航右侧区域 */
.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

/* 语言切换器 */
.lang-switcher {
    display: flex;
    gap: 0;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.lang-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-gray);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.lang-btn:hover {
    color: var(--text-dark);
    background: rgba(99, 102, 241, 0.08);
}

.lang-btn.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* 登录按钮 - 带高光效果 */
.btn-login {
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.45);
}

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

/* 主题切换器 */
.theme-switcher {
    position: relative;
}

.theme-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--text-gray);
    box-shadow: var(--shadow-sm);
}

.theme-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.theme-icon {
    transition: transform 0.3s ease;
}

.theme-btn:hover .theme-icon {
    transform: rotate(20deg);
}

/* 主题菜单下拉 */
.theme-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    padding: 8px;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.theme-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.theme-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-gray);
    transition: all 0.2s ease;
    text-align: left;
}

.theme-option:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.theme-option.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.theme-option svg {
    flex-shrink: 0;
}

/* 深色模式样式 */
html[data-theme="dark"] {
    --text-dark: #f1f5f9;
    --text-gray: #94a3b8;
    --text-light: #64748b;
    --bg-light: #1e293b;
    --bg-white: #0f172a;
    --border-color: #334155;
}

html[data-theme="dark"] body {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: var(--text-dark);
}

/* 深色模式网格 - 更明显 */
html[data-theme="dark"] body::before {
    background-image: 
        linear-gradient(to right, rgba(139, 92, 246, 0.2) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(139, 92, 246, 0.2) 1px, transparent 1px);
}

html[data-theme="dark"] body::after {
    background: radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
}

html[data-theme="dark"] .header {
    background: rgba(15, 23, 42, 0.95);
    border-bottom-color: #334155;
}

html[data-theme="dark"] .logo-text h1 {
    color: var(--text-dark);
}

html[data-theme="dark"] .theme-btn,
html[data-theme="dark"] .theme-menu {
    background: #1e293b;
    border-color: #334155;
}

html[data-theme="dark"] .upload-box-hero,
html[data-theme="dark"] .example-item,
html[data-theme="dark"] .ai-feature-card,
html[data-theme="dark"] .step-card,
html[data-theme="dark"] .pricing-card:not(.featured),
html[data-theme="dark"] .faq-item,
html[data-theme="dark"] .comparison-box,
html[data-theme="dark"] .background-editor {
    background: #1e293b;
    border-color: #334155;
}

html[data-theme="dark"] .hero {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

html[data-theme="dark"] .hero::before {
    background-image: 
        linear-gradient(to right, rgba(139, 92, 246, 0.25) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(139, 92, 246, 0.25) 1px, transparent 1px);
}

html[data-theme="dark"] .feature-tag {
    background: #1e293b;
    border-color: #334155;
}

html[data-theme="dark"] .ai-features-section,
html[data-theme="dark"] .pricing-section {
    background: #0f172a;
}

html[data-theme="dark"] .how-it-works-section {
    background: #0f172a;
}

html[data-theme="dark"] .step-item {
    background: #1e293b;
}

html[data-theme="dark"] .step-item:hover {
    background: #334155;
}

html[data-theme="dark"] .footer {
    background: #0f172a;
    border-top-color: #334155;
}

html[data-theme="dark"] .modal-content {
    background: #1e293b;
    color: var(--text-dark);
}

html[data-theme="dark"] .login-form input {
    background: #0f172a;
    border-color: #334155;
    color: var(--text-dark);
}

/* 深色模式 - 更多优化 */
html[data-theme="dark"] .nav-menu a {
    color: var(--text-gray);
}

html[data-theme="dark"] .nav-menu a:hover {
    color: var(--text-dark);
}

html[data-theme="dark"] .lang-switcher {
    background: rgba(30, 41, 59, 0.8);
}

html[data-theme="dark"] .lang-btn.active {
    background: #0f172a;
}

html[data-theme="dark"] .upload-box {
    background: #1e293b;
    border-color: #334155;
}

html[data-theme="dark"] .preview-item {
    background: #1e293b;
    border-color: #334155;
}

html[data-theme="dark"] .color-option {
    border-color: #334155;
}

html[data-theme="dark"] .gradient-option {
    border-color: #334155;
}

html[data-theme="dark"] .label {
    background: rgba(0, 0, 0, 0.8);
}

html[data-theme="dark"] .label-processed {
    background: rgba(99, 102, 241, 0.9);
}

html[data-theme="dark"] .btn-secondary {
    background: #1e293b;
    border-color: #334155;
    color: var(--text-dark);
}

html[data-theme="dark"] .btn-secondary:hover {
    background: #334155;
    border-color: var(--primary-color);
}

html[data-theme="dark"] .custom-color input[type="color"] {
    border-color: #334155;
}

html[data-theme="dark"] .progress-bar {
    background: #334155;
}

html[data-theme="dark"] .loader {
    border-color: #334155;
    border-top-color: var(--primary-light);
}

/* 深色模式 - 增强视觉效果 */
html[data-theme="dark"] .logo-icon {
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.5);
}

html[data-theme="dark"] .btn-login {
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.5);
}

html[data-theme="dark"] .btn-login:hover {
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.6);
}

html[data-theme="dark"] .btn-upload-hero {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 6px 24px rgba(245, 158, 11, 0.4);
}

html[data-theme="dark"] .btn-upload-hero:hover {
    box-shadow: 0 8px 32px rgba(245, 158, 11, 0.5);
}

html[data-theme="dark"] .btn-primary {
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

html[data-theme="dark"] .btn-primary:hover {
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.5);
}

html[data-theme="dark"] .btn-cta {
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.4);
}

html[data-theme="dark"] .btn-cta:hover {
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.5);
}

html[data-theme="dark"] .step-number {
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.5);
}

html[data-theme="dark"] .pricing-card.featured {
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.4);
}

html[data-theme="dark"] .comparison-box {
    /* 暗色主题的棋盘格背景 */
    background-image: 
        linear-gradient(45deg, #2d3748 25%, transparent 25%),
        linear-gradient(-45deg, #2d3748 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #2d3748 75%),
        linear-gradient(-45deg, transparent 75%, #2d3748 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    background-color: #1a202c;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* 深色模式 - 卡片悬停增强 */
html[data-theme="dark"] .ai-feature-card:hover,
html[data-theme="dark"] .step-card:hover,
html[data-theme="dark"] .pricing-card:not(.featured):hover {
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.3);
    border-color: var(--primary-light);
}

html[data-theme="dark"] .example-item:hover {
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3);
    border-color: var(--primary-light);
}

/* 深色模式 - 文字增强 */
html[data-theme="dark"] .hero-title {
    text-shadow: 0 2px 20px rgba(99, 102, 241, 0.3);
}

html[data-theme="dark"] .gradient-text {
    background: linear-gradient(135deg, #818cf8 0%, #a78bfa 50%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: brightness(1.2);
}

/* Hero 布局 - 左右分栏（Raphael AI 风格）*/
.hero-split {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 100px;
    align-items: center;
    min-height: 700px;
    margin-top: 100px;
    padding-top: 0;
}

.hero-left {
    position: relative;
}

/* 装饰视觉区域 */
.hero-visual {
    position: relative;
    width: 100%;
    max-width: 350px;
    height: 350px;
    margin-bottom: 48px;
}

/* 橙色笔刷装饰 */
.decoration-blob {
    position: absolute;
    top: 40px;
    left: 50px;
    width: 250px;
    height: 100px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    opacity: 0.5;
    filter: blur(2px);
    transform: rotate(-15deg);
    z-index: 0;
}

/* 星星装饰 */
.decoration-star {
    position: absolute;
    top: 50px;
    right: 40px;
    font-size: 48px;
    color: #f59e0b;
    opacity: 0.6;
    animation: float 4s ease-in-out infinite;
    z-index: 0;
}

/* 闪光装饰 */
.decoration-sparkle {
    position: absolute;
    top: 80px;
    left: 40px;
    font-size: 28px;
    color: #f59e0b;
    opacity: 0.4;
    animation: float 5s ease-in-out infinite 0.5s;
    z-index: 0;
}

/* 圆圈装饰 */
.decoration-circle {
    position: absolute;
    bottom: 120px;
    left: 30px;
    font-size: 56px;
    color: #f59e0b;
    opacity: 0.3;
    z-index: 0;
}

/* 人物图片区域 */
.hero-image {
    position: relative;
    z-index: 1;
}

.image-placeholder {
    width: 280px;
    height: 320px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(99, 102, 241, 0.15);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.placeholder-icon {
    font-size: 120px;
    opacity: 0.4;
    filter: grayscale(0.5);
}

/* 左侧标题 */
.hero-title-left {
    font-size: 72px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text-dark);
    margin-bottom: 24px;
    text-align: left;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, #8b5cf6 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.hero-subtitle-left {
    font-size: 20px;
    color: var(--text-gray);
    margin-bottom: 0;
    line-height: 1.7;
    font-weight: 400;
    text-align: left;
    max-width: 450px;
}

/* 图片对比滑块 */
.image-comparison {
    width: 280px;
    height: 320px;
    margin: 0 auto;
}

.comparison-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 24px;
    background: var(--bg-light);
    cursor: ew-resize;
    user-select: none;
}

.comparison-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.comparison-slider-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
}

.comparison-before {
    position: absolute;
    top: 0;
    left: 0;
    width: 280px;
    height: 320px;
    object-fit: cover;
    pointer-events: none;
}

.comparison-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    transform: translateX(-50%);
    z-index: 3;
    cursor: ew-resize;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.handle-line {
    flex: 1;
    width: 2px;
    background: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.handle-circle {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: transform 0.2s ease;
}

.handle-circle:hover {
    transform: scale(1.1);
}

.handle-circle svg {
    width: 16px;
    height: 16px;
    color: #374151;
}

/* 右侧区域 */
.hero-right {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* 示例图片区域 - 右侧 */
.example-section-right {
    text-align: left;
}

.example-grid-right {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
}

.example-item-right {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(99, 102, 241, 0.15);
    aspect-ratio: 1;
    overflow: hidden;
    width: 120px;
    height: 120px;
}

.example-item-right:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.example-item-right img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
    /* 隐藏损坏图片的默认图标 */
    font-size: 0;
    color: transparent;
}

.example-item-right:hover img {
    transform: scale(1.15);
}

/* 深色模式适配 */
html[data-theme="dark"] .image-placeholder {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.2);
}

html[data-theme="dark"] .example-item-right {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(99, 102, 241, 0.25);
}

html[data-theme="dark"] .example-item-right:hover {
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 12px 36px rgba(99, 102, 241, 0.35);
    border-color: var(--primary-light);
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 48px;
}

.feature-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border-radius: 100px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    font-weight: 500;
    font-size: 14px;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.feature-tag:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.feature-tag .icon {
    font-size: 18px;
}

/* 主要区域 */
.main-section {
    padding: 60px 0 100px;
    min-height: 60vh;
}

/* 上传区域 - 精致简约 */
.upload-box {
    border: 2px dashed var(--border-color);
    border-radius: 24px;
    padding: 80px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    position: relative;
    overflow: hidden;
}

.upload-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.03) 0%, rgba(139, 92, 246, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.upload-box:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.upload-box:hover::before {
    opacity: 1;
}

.upload-box.dragover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.02);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    transform: scale(1.01);
}

.file-input {
    display: none;
}

.upload-icon {
    font-size: 56px;
    margin-bottom: 24px;
    animation: float 3s ease-in-out infinite;
}

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

.upload-content h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

.upload-content p {
    color: var(--text-gray);
    margin-bottom: 8px;
    font-size: 16px;
}

.upload-hint {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 32px !important;
}

/* 按钮 - 现代渐变 */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.2) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover::before {
    opacity: 1;
}

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

.btn-secondary {
    background: white;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
    padding: 14px 38px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 预览网格 */
.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    margin-top: 32px;
    animation: fadeIn 0.5s ease;
}

.preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    background: white;
}

.preview-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ef4444;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.preview-item:hover .preview-remove {
    opacity: 1;
}

.preview-remove:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* 结果区域 */
.result-section {
    animation: fadeIn 0.6s ease;
}

.image-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tab-image {
    padding: 12px 24px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-gray);
}

.tab-image:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.tab-image.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* ===================================
   对比组件 - 现代简洁设计
   =================================== */
.comparison-container {
    margin: 48px 0;
}

.comparison-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    min-height: 500px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    /* 棋盘格背景 - 显示透明区域 */
    background-image: 
        linear-gradient(45deg, #e5e5e5 25%, transparent 25%),
        linear-gradient(-45deg, #e5e5e5 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e5e5e5 75%),
        linear-gradient(-45deg, transparent 75%, #e5e5e5 75%);
    background-size: 24px 24px;
    background-position: 0 0, 0 12px, 12px -12px, -12px 0px;
    background-color: #f8f8f8;
}

/* 图片层 */
.image-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.image-layer img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

/* 原图层 */
.original-layer {
    z-index: 1;
}

/* 处理后图片层 - 使用 clip-path 裁剪 */
.processed-layer {
    z-index: 2;
    clip-path: inset(0 50% 0 0);
    -webkit-clip-path: inset(0 50% 0 0);
}

/* 图片标签 */
.image-label {
    position: absolute;
    bottom: 16px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    backdrop-filter: blur(8px);
    z-index: 3;
}

.original-layer .image-label {
    left: 16px;
}

.processed-layer .image-label {
    right: 16px;
}

/* 滑块 */
.comparison-slider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    transform: translateX(-50%);
    cursor: ew-resize;
    z-index: 10;
}

.slider-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: white;
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.slider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    color: #333;
    transition: transform 0.2s ease;
}

.slider-handle:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.slider-handle svg {
    width: 24px;
    height: 24px;
}

/* 滑块拖动区域 */
.comparison-slider::before {
    content: '';
    position: absolute;
    left: -20px;
    right: -20px;
    top: 0;
    bottom: 0;
    cursor: ew-resize;
}

/* 旧的滑块样式已被新样式替代 */

/* 操作按钮 */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 40px 0;
    flex-wrap: wrap;
}

/* 背景编辑器 - 精致卡片 */
.background-editor {
    background: white;
    border-radius: 24px;
    padding: 40px;
    margin-top: 48px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.background-editor h3 {
    text-align: center;
    margin-bottom: 32px;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

.editor-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
    padding: 4px;
    background: var(--bg-light);
    border-radius: 12px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.tab-btn {
    padding: 12px 28px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-gray);
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--text-dark);
    background: white;
    box-shadow: var(--shadow-sm);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.color-option {
    aspect-ratio: 1;
    border-radius: 16px;
    border: 3px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.color-option::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 18px;
    border: 2px solid var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.color-option:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.color-option.active::after {
    opacity: 1;
}

.custom-color {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.custom-color label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 15px;
}

.custom-color input[type="color"] {
    width: 80px;
    height: 48px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-color input[type="color"]:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.gradient-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.gradient-option {
    aspect-ratio: 16/9;
    border-radius: 16px;
    border: 3px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.gradient-option::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 18px;
    border: 2px solid var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gradient-option:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.gradient-option.active::after {
    opacity: 1;
}

.gradient-option span {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-weight: 700;
    font-size: 14px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.02em;
}

/* 功能特色 */
.features-section {
    padding: 100px 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 64px;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.feature-card {
    background: var(--bg-light);
    border-radius: 20px;
    padding: 40px 32px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
    background: white;
}

.feature-icon {
    font-size: 56px;
    margin-bottom: 24px;
}

.feature-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-dark);
    letter-spacing: -0.01em;
}

.feature-card p {
    color: var(--text-gray);
    font-size: 15px;
    line-height: 1.7;
}

/* 加载模态框 */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 24px;
    padding: 48px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.loader {
    width: 64px;
    height: 64px;
    border: 4px solid var(--bg-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 24px;
}

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

.modal-content h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.modal-content p {
    color: var(--text-gray);
    margin-bottom: 24px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-light);
    border-radius: 100px;
    overflow: hidden;
    margin: 24px 0 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 100px;
    transition: width 0.3s ease;
}

.progress-text {
    color: var(--text-gray);
    font-size: 14px;
    font-weight: 600;
}

/* 页脚 */
.footer {
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 48px 0;
    text-align: center;
    margin-top: 100px;
}

.footer p {
    color: var(--text-gray);
    font-size: 14px;
    line-height: 1.8;
}

.footer-note {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-light);
}

/* 工具类 */
.hidden {
    display: none !important;
}

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

/* ========================================
   处理动画 - 背景消失效果
   ======================================== */

.processing-animation {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    display: none; /* 默认隐藏 */
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.processing-animation.active {
    display: flex; /* 激活时显示 */
}

.processing-overlay {
    width: 100%;
    max-width: 1200px;
    padding: 40px;
}

.processing-image-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    aspect-ratio: 16/10;
    border-radius: 24px;
    overflow: hidden;
    background: #1a1a1a;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.processing-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

/* 背景消失叠加层 */
.background-fade-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(99, 102, 241, 0.3) 0%,
        rgba(139, 92, 246, 0.3) 50%,
        rgba(236, 72, 153, 0.3) 100%
    );
    z-index: 2;
    mix-blend-mode: multiply;
    opacity: 1;
}

/* 背景消失动画 */
@keyframes backgroundFade {
    0% {
        opacity: 1;
        filter: blur(0px);
    }
    50% {
        opacity: 0.5;
        filter: blur(10px);
    }
    100% {
        opacity: 0;
        filter: blur(20px);
    }
}

/* 处理进度显示 */
.processing-progress {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
}

.progress-circle {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}

.progress-circle svg {
    transform: rotate(-90deg);
}

.progress-ring {
    transition: stroke-dashoffset 0.3s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.processing-text {
    color: white;
    font-size: 16px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.5);
    padding: 12px 24px;
    border-radius: 100px;
    backdrop-filter: blur(10px);
}

/* 关闭按钮 */
.processing-animation .modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
}

.processing-animation .modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }
    
    .hero-title {
        font-size: 56px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: flex;
        gap: 20px;
        font-size: 14px;
    }
    
    .hero-title {
        font-size: 40px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .upload-box {
        padding: 60px 24px;
    }
    
    .color-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .nav-menu {
        gap: 12px;
        font-size: 12px;
    }
    
    .nav-menu a {
        font-size: 12px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-features {
        flex-direction: column;
        align-items: center;
    }
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 选择文本样式 */
::selection {
    background: rgba(99, 102, 241, 0.2);
    color: var(--text-dark);
}

/* ========================================
   新增样式 - Hero 上传区域
   ======================================== */

.upload-box-hero {
    border: 3px dashed rgba(99, 102, 241, 0.25);
    border-radius: 32px;
    padding: 140px 100px;
    text-align: center;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 48px;
}

.upload-box-hero:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    background: rgba(255, 255, 255, 0.7);
}

.upload-box-hero.dragover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
    transform: scale(1.02);
}

.upload-hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.btn-upload-hero {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    padding: 24px 72px;
    border-radius: 20px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(245, 158, 11, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-upload-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.btn-upload-hero:hover::before {
    left: 100%;
}

.btn-upload-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(245, 158, 11, 0.5);
}

.upload-hint-hero {
    color: var(--text-gray);
    font-size: 18px;
    font-weight: 500;
}

/* 示例图片区域 - 居中 */
.example-section-center {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.example-hint {
    color: var(--text-gray);
    margin-bottom: 20px;
    font-size: 15px;
    font-weight: 500;
}

.example-grid-center {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.example-item-center {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(99, 102, 241, 0.15);
    aspect-ratio: 1;
    overflow: hidden;
}

.example-item-center:hover {
    border-color: var(--primary-color);
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.25);
}

.example-item-center img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* 隐藏损坏图片的默认图标 */
    font-size: 0;
    color: transparent;
}

html[data-theme="dark"] .upload-box-hero {
    background: rgba(30, 41, 59, 0.4);
    border-color: rgba(99, 102, 241, 0.25);
}

html[data-theme="dark"] .upload-box-hero:hover {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(99, 102, 241, 0.4);
}

html[data-theme="dark"] .example-item-center {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(99, 102, 241, 0.25);
}

html[data-theme="dark"] .example-item-center:hover {
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.3);
    border-color: var(--primary-light);
}

/* 示例图片区域 */
.example-section {
    margin-top: 48px;
    text-align: center;
}

.example-hint {
    color: var(--text-gray);
    margin-bottom: 24px;
    font-size: 15px;
}

.example-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.example-item {
    background: white;
    border-radius: 16px;
    padding: 24px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
}

.example-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.example-placeholder {
    font-size: 48px;
    margin-bottom: 8px;
}

.example-item p {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-gray);
}

.terms-hint {
    margin-top: 32px;
    font-size: 13px;
    color: var(--text-light);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.terms-hint a {
    color: var(--primary-color);
    text-decoration: none;
}

.terms-hint a:hover {
    text-decoration: underline;
}

/* ========================================
   语言切换器（已在前面定义，这里删除重复）
   ======================================== */

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    transition: all 0.3s ease;
}

/* ========================================
   AI 功能特色区域
   ======================================== */

.ai-features-section {
    padding: 100px 0;
    background: white;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-tag {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-gray);
    margin-top: 16px;
}

.ai-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.ai-feature-card {
    background: var(--bg-light);
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.ai-feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
    background: white;
}

.ai-feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.ai-feature-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.ai-feature-card p {
    color: var(--text-gray);
    font-size: 14px;
    line-height: 1.6;
}

/* ========================================
   工作流程区域
   ======================================== */

.how-it-works-section {
    padding: 100px 0;
    background: #ffffff;
}

.steps-container {
    max-width: 1000px;
    margin: 60px auto 0;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.step-item {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    background: #f8f9fa;
    border-radius: 16px;
    padding: 40px;
    transition: all 0.3s ease;
}

.step-item:hover {
    background: #f1f3f5;
    transform: translateX(8px);
}

.step-badge {
    flex-shrink: 0;
}

.step-label {
    display: inline-block;
    background: #6366f1;
    color: white;
    padding: 8px 20px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.step-desc {
    color: var(--text-gray);
    font-size: 16px;
    line-height: 1.7;
    margin: 0;
}

/* ========================================
   定价区域
   ======================================== */

.pricing-section {
    padding: 100px 0;
    background: white;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    max-width: 1200px;
    margin: 64px auto 0;
}

.pricing-card {
    background: var(--bg-light);
    border-radius: 24px;
    padding: 40px 32px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.pricing-card.featured {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: transparent;
    transform: scale(1.05);
}

.pricing-card.featured:hover {
    transform: scale(1.08) translateY(-8px);
}

.pricing-card .badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color);
    color: white;
    padding: 6px 20px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.pricing-card h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
}

.pricing-card.featured h3,
.pricing-card.featured .features-list,
.pricing-card.featured .price {
    color: white;
}

.price {
    margin-bottom: 32px;
}

.price-amount {
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
}

.price-period {
    font-size: 18px;
    color: var(--text-gray);
}

.pricing-card.featured .price-period {
    color: rgba(255, 255, 255, 0.8);
}

.features-list {
    list-style: none;
    margin-bottom: 32px;
}

.features-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 15px;
}

.pricing-card.featured .features-list li {
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.features-list li:last-child {
    border-bottom: none;
}

.btn-pricing {
    width: 100%;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
}

.btn-pricing:hover {
    background: var(--primary-color);
    color: white;
}

.btn-pricing.primary {
    background: white;
    color: var(--primary-color);
}

.btn-pricing.primary:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* ========================================
   FAQ 区域
   ======================================== */

.faq-section {
    padding: 100px 0;
    background: #fef9f0;
    position: relative;
}

.faq-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(to right, rgba(99, 102, 241, 0.12) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(99, 102, 241, 0.12) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

.faq-section .container {
    position: relative;
    z-index: 1;
}

/* 深色模式 FAQ */
html[data-theme="dark"] .faq-section {
    background: #1a1a1a;
}

html[data-theme="dark"] .faq-section::before {
    background-image: 
        linear-gradient(to right, rgba(139, 92, 246, 0.15) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(139, 92, 246, 0.15) 1px, transparent 1px);
}

html[data-theme="dark"] .faq-section .section-title {
    color: #ffffff;
}

html[data-theme="dark"] .faq-section .section-subtitle {
    color: rgba(255, 255, 255, 0.6);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    max-width: 1100px;
    margin: 64px auto 0;
}

.faq-item {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    padding: 28px;
    display: flex;
    gap: 20px;
    transition: all 0.3s ease;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.faq-item:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.faq-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: 2px solid #d4a574;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: #d4a574;
}

.faq-content {
    flex: 1;
}

.faq-question {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.faq-answer {
    font-size: 14px;
    line-height: 1.8;
    color: #666666;
    margin: 0;
}

/* 深色模式 FAQ 卡片 */
html[data-theme="dark"] .faq-item {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .faq-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: none;
}

html[data-theme="dark"] .faq-question {
    color: #ffffff;
}

html[data-theme="dark"] .faq-answer {
    color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 768px) {
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .faq-item {
        padding: 20px;
    }
    
    .faq-answer {
        font-size: 13px;
        line-height: 1.7;
    }
}

/* ========================================
   页脚
   ======================================== */

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 48px;
    padding: 64px 0 32px;
}

.footer-section h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 32px 0;
    text-align: center;
}

/* ========================================
   登录模态框
   ======================================== */

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 32px;
    color: var(--text-gray);
    cursor: pointer;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.login-form {
    margin-top: 32px;
}

.login-form input {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s ease;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.signup-link {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--text-gray);
}

.signup-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

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

/* ========================================
   法律页面样式
   ======================================== */

.legal-page {
    padding: 60px 0;
    max-width: 900px;
    margin: 0 auto;
}

.legal-page h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.last-updated {
    color: var(--text-gray);
    font-size: 14px;
    margin-bottom: 48px;
}

.legal-page section {
    margin-bottom: 48px;
}

.legal-page h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.legal-page p {
    color: var(--text-gray);
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 16px;
}

.legal-page ul {
    margin-left: 24px;
    margin-bottom: 16px;
}

.legal-page ul li {
    color: var(--text-gray);
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 12px;
}

/* ========================================
   响应式设计 - 移动端优化
   ======================================== */

@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }
    
    .hero-content {
        gap: 48px;
    }
    
    .hero-title {
        font-size: 56px;
    }
    
    .hero-decoration {
        max-width: 300px;
    }
    
    .hero-image-placeholder {
        width: 240px;
        height: 280px;
    }
    
    .ai-features-grid,
    .steps-grid,
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* 导航 */
    .nav-menu {
        display: flex;
        gap: 16px;
        font-size: 13px;
    }
    
    .nav-menu a {
        font-size: 13px;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .lang-switcher {
        margin-left: auto;
        margin-right: 12px;
    }
    
    /* Hero - 移动端优化 */
    .hero-split {
        grid-template-columns: 1fr;
        gap: 48px;
        min-height: auto;
    }
    
    .hero-left {
        text-align: center;
    }
    
    .hero-visual {
        margin: 0 auto 32px;
        max-width: 300px;
        height: 350px;
    }
    
    .image-placeholder {
        width: 240px;
        height: 300px;
    }
    
    .placeholder-icon {
        font-size: 100px;
    }
    
    .hero-title-left {
        font-size: 40px;
        text-align: center;
    }
    
    .hero-subtitle-left {
        font-size: 18px;
        text-align: center;
        margin: 0 auto;
    }
    
    .upload-box-hero {
        padding: 60px 32px;
        min-height: 300px;
    }
    
    .btn-upload-hero {
        padding: 18px 48px;
        font-size: 17px;
    }
    
    .example-section-right {
        text-align: center;
    }
    
    /* 工作流程 - 移动端 */
    .steps-container {
        gap: 24px;
    }
    
    .step-item {
        flex-direction: column;
        padding: 32px 24px;
        gap: 20px;
    }
    
    .step-badge {
        align-self: flex-start;
    }
    
    .step-title {
        font-size: 20px;
    }
    
    .step-desc {
        font-size: 15px;
    }
    
    .step-item:hover {
        transform: translateX(0);
    }
    
    .example-grid-right {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    /* 各区域 */
    .ai-features-grid,
    .steps-grid,
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 36px;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .hero-title-left {
        font-size: 32px;
    }
    
    .hero-subtitle-left {
        font-size: 16px;
    }
    
    .upload-box-hero {
        padding: 48px 24px;
    }
    
    .btn-upload-hero {
        padding: 16px 40px;
        font-size: 16px;
    }
    
    .example-grid-right {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   质量展示板块
   =================================== */
.quality-showcase-section {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--bg-light) 0%, white 100%);
}

.quality-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 40px 0 48px;
    flex-wrap: wrap;
}

.quality-tab {
    padding: 14px 32px;
    border-radius: 100px;
    border: 2px solid var(--border-color);
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 16px;
    color: var(--text-gray);
}

.quality-tab:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.quality-tab.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.quality-comparison-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.quality-comparison {
    width: 100%;
    aspect-ratio: 16/10;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.quality-comparison-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: ew-resize;
    user-select: none;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.quality-comparison-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.quality-comparison-slider-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
    transition: width 0.05s linear;
}

.quality-comparison-before {
    position: absolute;
    top: 0;
    left: 0;
    width: 900px;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.quality-comparison-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    transform: translateX(-50%);
    z-index: 3;
    cursor: ew-resize;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: left 0.05s linear;
}

.quality-handle-line {
    flex: 1;
    width: 3px;
    background: white;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.4);
}

.quality-handle-circle {
    width: 56px;
    height: 56px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: transform 0.2s ease;
}

.quality-handle-circle:hover {
    transform: scale(1.15);
}

.quality-handle-circle svg {
    width: 18px;
    height: 18px;
    color: #374151;
}

.quality-label {
    position: absolute;
    bottom: 24px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 14px;
    font-weight: 600;
    border-radius: 100px;
    backdrop-filter: blur(8px);
    z-index: 4;
}

.quality-label-before {
    left: 24px;
}

.quality-label-after {
    right: 24px;
}

/* 深色模式适配 */
html[data-theme="dark"] .quality-showcase-section {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
}

html[data-theme="dark"] .quality-tab {
    background: #1e293b;
    border-color: #334155;
    color: var(--text-gray);
}

html[data-theme="dark"] .quality-tab:hover {
    background: #334155;
    border-color: var(--primary-light);
}

html[data-theme="dark"] .quality-tab.active {
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

html[data-theme="dark"] .quality-comparison {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .quality-comparison-container {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

/* 背景面板样式 */
.color-item {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.color-item:hover {
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.color-item:active {
    transform: scale(0.98) !important;
}

#closeBgPanel:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #f9fafb !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .quality-showcase-section {
        padding: 60px 0;
    }
    
    .quality-tabs {
        gap: 8px;
        margin: 32px 0;
    }
    
    .quality-tab {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .quality-comparison {
        border-radius: 16px;
    }
    
    .quality-handle-circle {
        width: 48px;
        height: 48px;
    }
    
    .quality-label {
        font-size: 12px;
        padding: 8px 16px;
        bottom: 16px;
    }
    
    .quality-label-before {
        left: 16px;
    }
    
    .quality-label-after {
        right: 16px;
    }
}

/* 背景面板主题适配 */
.bg-panel-theme {
    background: #ffffff;
    color: #1f2937;
}

.bg-panel-theme h3 {
    color: #1f2937 !important;
}

.bg-panel-theme .bg-divider {
    background: rgba(0, 0, 0, 0.08) !important;
}

.bg-panel-theme .bg-tab {
    color: #6b7280 !important;
}

.bg-panel-theme .bg-tab.active {
    color: #1f2937 !important;
}

.bg-panel-theme #closeBgPanel {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #6b7280 !important;
}

.bg-panel-theme #closeBgPanel:hover {
    background: rgba(0, 0, 0, 0.1) !important;
    color: #1f2937 !important;
}

.bg-panel-theme #photoSearch {
    background: rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: #1f2937 !important;
}

.bg-panel-theme #searchBtn {
    background: #6366f1 !important;
}

.bg-panel-theme #uploadBgBtn {
    border: 2px dashed rgba(0, 0, 0, 0.2) !important;
    color: #1f2937 !important;
}

/* 深色模式下的背景面板 */
html[data-theme="dark"] .bg-panel-theme {
    background: #1f2937;
    color: #ffffff;
}

html[data-theme="dark"] .bg-panel-theme h3 {
    color: #f9fafb !important;
}

html[data-theme="dark"] .bg-panel-theme .bg-divider {
    background: rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .bg-panel-theme .bg-tab {
    color: #9ca3af !important;
}

html[data-theme="dark"] .bg-panel-theme .bg-tab.active {
    color: #f9fafb !important;
}

html[data-theme="dark"] .bg-panel-theme #closeBgPanel {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #9ca3af !important;
}

html[data-theme="dark"] .bg-panel-theme #closeBgPanel:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #f9fafb !important;
}

html[data-theme="dark"] .bg-panel-theme #photoSearch {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
}

html[data-theme="dark"] .bg-panel-theme #uploadBgBtn {
    border: 2px dashed rgba(255, 255, 255, 0.3) !important;
    color: #fff !important;
}

/* 图片网格滚动条样式 */
#photoGrid::-webkit-scrollbar {
    width: 6px;
}

#photoGrid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

#photoGrid::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 3px;
    transition: background 0.2s;
}

#photoGrid::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

/* 深色模式下的滚动条 */
html[data-theme="dark"] #photoGrid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] #photoGrid::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.4);
}

html[data-theme="dark"] #photoGrid::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.6);
}

/* Logo 样式 */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo h1 {
    color: #1f2937;
    transition: color 0.3s;
}

html[data-theme="dark"] .logo h1 {
    color: #f9fafb !important;
}
