/* 清新白色主题 */
:root {
    /* 主色调 - 清新白色系 */
    --bg-primary: #ffffff;        /* 主背景 - 纯白 */
    --bg-secondary: #f8f9fa;      /* 卡片背景 - 浅灰白 */
    --bg-tertiary: #f1f3f4;       /* 次级背景 - 淡灰 */
    --bg-hover: #e9ecef;          /* 悬停背景 */
    
    /* 文字颜色 */
    --text-primary: #212529;       /* 主要文字 - 深灰 */
    --text-secondary: #495057;     /* 次要文字 - 中灰 */
    --text-muted: #6c757d;         /* 弱化文字 - 浅灰 */
    --text-accent: #0066cc;        /* 强调文字 - 蓝色 */
    
    /* 边框颜色 */
    --border-primary: #dee2e6;     /* 主边框 */
    --border-secondary: #e9ecef;   /* 次边框 */
    --border-accent: #0066cc;      /* 强调边框 */
    
    /* 按钮颜色 */
    --btn-primary-bg: #f8f9fa;
    --btn-primary-hover: #e9ecef;
    --btn-accent-bg: #0066cc;
    --btn-accent-hover: #0052a3;
    
    /* 阴影效果 */
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 8px 32px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 20px rgba(0, 102, 204, 0.3);
}

/* 全局背景重置 */
body {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

/* 主容器 */
.container {
    background: var(--bg-primary) !important;
}

/* 侧边栏主题 */
.sidebar {
    background: var(--bg-secondary) !important;
    border-right: 1px solid var(--border-primary) !important;
    box-shadow: var(--shadow-medium) !important;
}

.sidebar-header {
    background: var(--bg-tertiary) !important;
    border-bottom: 1px solid var(--border-primary) !important;
    color: var(--text-primary) !important;
}

.brand-text {
    color: var(--text-primary) !important;
}

.brand-subtitle {
    color: var(--text-secondary) !important;
}

.tool-category {
    border-bottom: 1px solid var(--border-primary) !important;
}

.category-header {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border-secondary) !important;
}

.tool-item {
    color: var(--text-secondary) !important;
    border-bottom: 1px solid var(--border-secondary) !important;
    transition: all 0.3s ease !important;
}

.tool-item:hover {
    background: var(--bg-hover) !important;
    color: var(--text-primary) !important;
    border-left: 3px solid var(--border-accent) !important;
}

.tool-item.active {
    background: var(--bg-tertiary) !important;
    color: var(--text-accent) !important;
    border-left: 3px solid var(--border-accent) !important;
}

.tool-icon {
    color: var(--text-accent) !important;
}

/* 顶部导航主题 */
.header {
    background: var(--bg-secondary) !important;
    border-bottom: 1px solid var(--border-primary) !important;
    box-shadow: var(--shadow-light) !important;
}

.top-nav {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #dee2e6 100%) !important;
    border-bottom: 2px solid var(--border-primary) !important;
    box-shadow: var(--shadow-medium) !important;
}

/* 顶部导航文字颜色 */
.page-title {
    color: var(--text-primary) !important;
    text-shadow: none !important;
}

.version-tag {
    background: var(--bg-tertiary) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-secondary) !important;
}

.breadcrumb {
    color: var(--text-secondary) !important;
    background: var(--bg-tertiary) !important;
}

.breadcrumb-item.active {
    color: var(--text-primary) !important;
}

.breadcrumb-separator {
    color: var(--text-muted) !important;
}

/* 顶部导航按钮文字颜色 */
.top-nav .btn-icon {
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-secondary) !important;
    color: var(--text-secondary) !important;
}

.top-nav .btn-icon:hover {
    background: var(--bg-hover) !important;
    border-color: var(--border-accent) !important;
    color: var(--text-primary) !important;
    box-shadow: var(--shadow-light) !important;
}

/* 主题切换器在浅色主题下的样式 */
.theme-toggle {
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-secondary) !important;
    color: var(--text-secondary) !important;
}

.theme-toggle:hover {
    background: var(--bg-hover) !important;
    border-color: var(--border-accent) !important;
    color: var(--text-primary) !important;
    box-shadow: var(--shadow-light) !important;
}

/* 导航分隔线 */
.nav-divider {
    background: var(--border-secondary) !important;
}

.nav-item {
    color: var(--text-secondary) !important;
}

.nav-item:hover {
    color: var(--text-primary) !important;
    background: var(--bg-hover) !important;
}

.nav-item.active {
    color: var(--text-accent) !important;
    background: var(--bg-tertiary) !important;
}

.user-menu {
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-primary) !important;
    box-shadow: var(--shadow-medium) !important;
}

.user-menu-item {
    color: var(--text-secondary) !important;
}

.user-menu-item:hover {
    background: var(--bg-hover) !important;
    color: var(--text-primary) !important;
}

/* 按钮主题 */
.btn {
    background: var(--btn-primary-bg) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-secondary) !important;
    transition: all 0.3s ease !important;
}

.btn:hover {
    background: var(--btn-primary-hover) !important;
    border-color: var(--border-accent) !important;
    box-shadow: var(--shadow-light) !important;
}

.btn-primary {
    background: var(--btn-accent-bg) !important;
    color: #ffffff !important;
    border: none !important;
}

.btn-primary:hover {
    background: var(--btn-accent-hover) !important;
    box-shadow: var(--shadow-glow) !important;
}

.btn-icon {
    background: var(--bg-tertiary) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-secondary) !important;
}

.btn-icon:hover {
    background: var(--bg-hover) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-accent) !important;
}

/* 工作区主题 */
.workspace {
    background: var(--bg-primary) !important;
}

.image-processing-area {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-primary) !important;
    box-shadow: var(--shadow-medium) !important;
}

.canvas-container {
    background: var(--bg-tertiary) !important;
}

/* 上传区域动态背景 */
.upload-section {
    background: var(--bg-primary) !important;
    position: relative !important;
    overflow: hidden !important;
    border-radius: 0 !important;
}

.upload-section::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: 
        radial-gradient(circle at 60% 20%, rgba(0, 102, 204, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 20% 30%, rgba(0, 102, 204, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 102, 204, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(0, 102, 204, 0.04) 0%, transparent 50%),
        linear-gradient(135deg, 
            rgba(248, 249, 250, 0.9) 0%, 
            rgba(241, 243, 244, 0.95) 25%, 
            rgba(255, 255, 255, 0.98) 50%, 
            rgba(241, 243, 244, 0.95) 75%, 
            rgba(248, 249, 250, 0.9) 100%);
    background-size: 500px 500px, 400px 400px, 350px 350px, 100% 100%;
    background-position: 0% 0%, 100% 100%, 50% 50%, 0% 0%;
    animation: 
        floatingImagesLight1 12s linear infinite,
        floatingImagesLight2 15s linear infinite,
        floatingImagesLight3 18s linear infinite;
    z-index: 2;
}

.upload-container {
    position: relative !important;
    z-index: 3 !important;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid var(--border-primary) !important;
    border-radius: 12px !important;
    padding: 40px !important;
    margin: 1px !important;
    box-shadow: var(--shadow-heavy) !important;
}

.upload-title {
    color: var(--text-primary) !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.upload-subtitle {
    color: var(--text-secondary) !important;
}

.upload-icon-wrapper {
    margin-bottom: 20px !important;
}

.upload-main-icon {
    color: var(--text-accent) !important;
    font-size: 48px !important;
    filter: drop-shadow(0 0 10px rgba(0, 102, 204, 0.3)) !important;
}

.feature-item {
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-secondary) !important;
    color: var(--text-secondary) !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    transition: all 0.3s ease !important;
}

.feature-item:hover {
    background: var(--bg-hover) !important;
    border-color: var(--border-accent) !important;
    color: var(--text-primary) !important;
    transform: translateY(-2px) !important;
    box-shadow: var(--shadow-light) !important;
}

.feature-item i {
    color: var(--text-accent) !important;
}

.btn-upload-primary {
    background: var(--btn-accent-bg) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 14px 28px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    box-shadow: var(--shadow-medium) !important;
    transition: all 0.3s ease !important;
}

.btn-upload-primary:hover {
    background: var(--btn-accent-hover) !important;
    box-shadow: var(--shadow-glow) !important;
    transform: translateY(-2px) !important;
}

.upload-tips {
    color: var(--text-muted) !important;
    font-size: 14px !important;
}

/* 属性面板主题 */
.properties-panel {
    background: var(--bg-secondary) !important;
    border-left: 1px solid var(--border-primary) !important;
    box-shadow: var(--shadow-medium) !important;
}

.panel-section {
    border-bottom: 1px solid var(--border-primary) !important;
}

.panel-title {
    color: var(--text-primary) !important;
}

.control-label {
    color: var(--text-secondary) !important;
}

.form-select {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-secondary) !important;
}

.form-select:focus {
    border-color: var(--border-accent) !important;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2) !important;
}

/* 滑块控件主题 */
.slider {
    background: var(--bg-tertiary) !important;
}

.slider::-webkit-slider-thumb {
    background: var(--btn-accent-bg) !important;
    box-shadow: var(--shadow-light) !important;
}

.slider::-moz-range-thumb {
    background: var(--btn-accent-bg) !important;
    box-shadow: var(--shadow-light) !important;
}

.slider-value {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-secondary) !important;
}

/* 美颜参数面板主题 */
.beauty-panel {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-primary) !important;
    box-shadow: var(--shadow-heavy) !important;
}

.beauty-panel .panel-header {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%) !important;
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border-primary) !important;
}

.beauty-panel .panel-title {
    color: var(--text-primary) !important;
}

.beauty-panel .panel-title i {
    color: var(--text-accent) !important;
}

.beauty-panel .panel-subtitle {
    color: var(--text-secondary) !important;
}

.beauty-panel .panel-content {
    background: var(--bg-secondary) !important;
}

/* 参数组样式 */
.parameter-group {
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-secondary) !important;
}

.group-header {
    border-bottom: 1px solid var(--border-secondary) !important;
}

.group-header i {
    color: var(--text-accent) !important;
}

.group-title {
    color: var(--text-primary) !important;
}

.parameter-label {
    color: var(--text-secondary) !important;
}

.parameter-value {
    background: var(--btn-accent-bg) !important;
    color: #ffffff !important;
}

/* 美颜滑块样式 */
.beauty-slider {
    background: #cbd5e1 !important;
    border: 1px solid #94a3b8 !important;
}

.beauty-slider::-webkit-slider-thumb {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%) !important;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.5) !important;
    border: 2px solid #ffffff !important;
}

.beauty-slider::-webkit-slider-thumb:hover {
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.7) !important;
}

.beauty-slider::-moz-range-thumb {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%) !important;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.5) !important;
    border: 2px solid #ffffff !important;
}

.beauty-slider::-moz-range-thumb:hover {
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.7) !important;
}

/* 滑块轨道进度效果 */
.beauty-slider::-webkit-slider-track {
    background: #cbd5e1 !important;
    border: 1px solid #94a3b8 !important;
}

.beauty-slider::-moz-range-track {
    background: #cbd5e1 !important;
    border: 1px solid #94a3b8 !important;
}

.parameter-tips {
    color: var(--text-muted) !important;
}

/* 预设方案样式 */
.preset-section {
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-secondary) !important;
}

.preset-header {
    border-bottom: 1px solid var(--border-secondary) !important;
}

.preset-header i {
    color: var(--text-accent) !important;
}

.preset-header span {
    color: var(--text-primary) !important;
}

.preset-btn {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-secondary) !important;
    color: var(--text-secondary) !important;
}

.preset-btn:hover {
    background: var(--bg-hover) !important;
    border-color: var(--border-accent) !important;
    color: var(--text-primary) !important;
}

.preset-btn.active {
    background: var(--btn-accent-bg) !important;
    border-color: var(--text-accent) !important;
    color: #ffffff !important;
}

/* 面板操作按钮 */
.panel-actions {
    background: var(--bg-secondary) !important;
    border-top: 1px solid var(--border-primary) !important;
}

.btn-process-beauty {
    background: var(--btn-accent-bg) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: var(--shadow-medium) !important;
}

.btn-process-beauty:hover {
    background: var(--btn-accent-hover) !important;
    box-shadow: var(--shadow-glow) !important;
}

.btn-process-beauty:disabled {
    background: var(--bg-tertiary) !important;
    color: var(--text-muted) !important;
    box-shadow: none !important;
}

/* 上传区域样式覆盖 */
.upload-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
    color: var(--text-primary) !important;
}

.upload-container {
    color: var(--text-primary) !important;
}

.upload-title {
    background: linear-gradient(45deg, var(--text-primary), var(--text-accent)) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    text-shadow: none !important;
}

.upload-subtitle {
    color: var(--text-secondary) !important;
    opacity: 1 !important;
}

.upload-main-icon {
    color: var(--text-accent) !important;
    filter: none !important;
}

.feature-item {
    background: rgba(59, 130, 246, 0.1) !important;
    border: 1px solid var(--border-secondary) !important;
    color: var(--text-primary) !important;
}

.feature-item i {
    color: var(--text-accent) !important;
}

.feature-item span {
    color: var(--text-primary) !important;
}

/* 侧边栏Logo区域样式覆盖 */
.logo {
    color: var(--text-primary) !important;
}

.logo i {
    color: var(--text-accent) !important;
}

.logo span {
    color: var(--text-primary) !important;
}

/* 用户信息区域样式覆盖 */
.user-info {
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-secondary) !important;
}

.user-name {
    color: var(--text-primary) !important;
}

.user-level {
    color: var(--text-primary) !important;
    background: linear-gradient(135deg, var(--text-accent) 0%, #0066cc 100%) !important;
}

.user-menu-toggle {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-secondary) !important;
    color: var(--text-secondary) !important;
}

.user-menu-toggle:hover {
    background: var(--bg-hover) !important;
    border-color: var(--border-accent) !important;
    color: var(--text-primary) !important;
}

/* 动画定义 */
@keyframes gradientShiftLight {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes floatingImagesLight1 {
    0% {
        background-position: 0% 0%, 100% 100%, 50% 50%, 0% 0%;
    }
    100% {
        background-position: 100% 100%, 0% 0%, 150% 150%, 0% 0%;
    }
}

@keyframes floatingImagesLight2 {
    0% {
        background-position: 100% 0%, 0% 100%, 25% 75%, 0% 0%;
    }
    100% {
        background-position: 0% 100%, 100% 0%, 125% 175%, 0% 0%;
    }
}

@keyframes floatingImagesLight3 {
    0% {
        background-position: 50% 100%, 150% 50%, 75% 25%, 0% 0%;
    }
    100% {
        background-position: 150% 0%, 50% 150%, 175% 125%, 0% 0%;
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .upload-container {
        margin: 10px !important;
        padding: 20px !important;
    }
    
    .upload-main-icon {
        font-size: 36px !important;
    }
}

/* 滚动条主题 */
::-webkit-scrollbar {
    width: 8px;
    background: var(--bg-secondary);
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-accent);
}

/* 模态框主题 */
.modal-overlay {
    background: rgba(0, 0, 0, 0.5) !important;
}

.modal {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-primary) !important;
    box-shadow: var(--shadow-heavy) !important;
}

.modal-header {
    background: var(--bg-tertiary) !important;
    border-bottom: 1px solid var(--border-primary) !important;
    color: var(--text-primary) !important;
}

.modal-body {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

.modal-close {
    color: var(--text-secondary) !important;
}

.modal-close:hover {
    color: var(--text-primary) !important;
    background: var(--bg-hover) !important;
}

/* 表单元素主题 */
.form-group label {
    color: var(--text-secondary) !important;
}

.form-control {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-secondary) !important;
}

.form-control:focus {
    border-color: var(--border-accent) !important;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2) !important;
}

/* 状态栏主题 */
.status-bar {
    background: var(--bg-secondary) !important;
    border-top: 1px solid var(--border-primary) !important;
    color: var(--text-secondary) !important;
}

/* 加载覆盖层主题 */
.loading-overlay {
    background: rgba(255, 255, 255, 0.9) !important;
}

.loading-content {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-primary) !important;
    color: var(--text-primary) !important;
    box-shadow: var(--shadow-heavy) !important;
}

/* 图片预览主题 */
.image-preview {
    background: var(--bg-tertiary) !important;
}

.image-controls {
    background: rgba(248, 249, 250, 0.9) !important;
    border: 1px solid var(--border-secondary) !important;
}

/* 工具提示主题 */
.tooltip {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-secondary) !important;
    box-shadow: var(--shadow-medium) !important;
}

/* 通知主题 */
.notification {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-primary) !important;
    color: var(--text-primary) !important;
    box-shadow: var(--shadow-medium) !important;
}

.notification.success {
    border-left: 4px solid #28a745 !important;
}

.notification.error {
    border-left: 4px solid #dc3545 !important;
}

.notification.warning {
    border-left: 4px solid #ffc107 !important;
}

.notification.info {
    border-left: 4px solid var(--text-accent) !important;
}