/* ====================================
   主题变量系统 - Neumorphism设计
   ==================================== */

:root {
    /* ========== 浅色主题 ========== */
    --theme-light-bg-primary: #f0f0f3;
    --theme-light-bg-secondary: #ffffff;
    --theme-light-bg-card: #f0f0f3;
    --theme-light-shadow-light: #ffffff;
    --theme-light-shadow-dark: #d1d9e6;
    --theme-light-text-primary: #2d3748;
    --theme-light-text-secondary: #718096;
    --theme-light-text-muted: #a0aec0;

    /* ========== 深色主题 ========== */
    --theme-dark-bg-primary: #2d3748;
    --theme-dark-bg-secondary: #1a202c;
    --theme-dark-bg-card: #2d3748;
    --theme-dark-shadow-light: #4a5568;
    --theme-dark-shadow-dark: #171923;
    --theme-dark-text-primary: #f7fafc;
    --theme-dark-text-secondary: #a0aec0;
    --theme-dark-text-muted: #718096;

    /* ========== 主题色系 ========== */
    --primary-color: #ff9000;
    --primary-hover: #e67e22;
    --primary-light: #ffb84d;
    --primary-dark: #cc7400;

    /* ========== 功能色彩 ========== */
    --success-color: #48bb78;
    --warning-color: #ed8936;
    --error-color: #f56565;
    --info-color: #4299e1;

    /* ========== 默认使用深色主题 ========== */
    --bg-primary: var(--theme-dark-bg-primary);
    --bg-secondary: var(--theme-dark-bg-secondary);
    --bg-card: var(--theme-dark-bg-card);
    --shadow-light: var(--theme-dark-shadow-light);
    --shadow-dark: var(--theme-dark-shadow-dark);
    --text-primary: var(--theme-dark-text-primary);
    --text-secondary: var(--theme-dark-text-secondary);
    --text-muted: var(--theme-dark-text-muted);

    /* ========== Neumorphism变量 ========== */
    --neuro-distance: 20px;
    --neuro-intensity: 0.15;
    --neuro-blur: 30px;
    --neuro-radius: 20px;

    /* ========== 过渡动画 ========== */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* ========== 间距系统 ========== */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
}

/* ========== 浅色主题切换 ========== */
[data-theme="light"] {
    --bg-primary: var(--theme-light-bg-primary);
    --bg-secondary: var(--theme-light-bg-secondary);
    --bg-card: var(--theme-light-bg-card);
    --shadow-light: var(--theme-light-shadow-light);
    --shadow-dark: var(--theme-light-shadow-dark);
    --text-primary: var(--theme-light-text-primary);
    --text-secondary: var(--theme-light-text-secondary);
    --text-muted: var(--theme-light-text-muted);
}

/* ========== 深色主题切换 ========== */
[data-theme="dark"] {
    --bg-primary: var(--theme-dark-bg-primary);
    --bg-secondary: var(--theme-dark-bg-secondary);
    --bg-card: var(--theme-dark-bg-card);
    --shadow-light: var(--theme-dark-shadow-light);
    --shadow-dark: var(--theme-dark-shadow-dark);
    --text-primary: var(--theme-dark-text-primary);
    --text-secondary: var(--theme-dark-text-secondary);
    --text-muted: var(--theme-dark-text-muted);
}

/* ========== 系统主题检测 ========== */
@media (prefers-color-scheme: light) {
    :root:not([data-theme]) {
        --bg-primary: var(--theme-light-bg-primary);
        --bg-secondary: var(--theme-light-bg-secondary);
        --bg-card: var(--theme-light-bg-card);
        --shadow-light: var(--theme-light-shadow-light);
        --shadow-dark: var(--theme-light-shadow-dark);
        --text-primary: var(--theme-light-text-primary);
        --text-secondary: var(--theme-light-text-secondary);
        --text-muted: var(--theme-light-text-muted);
    }
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        --bg-primary: var(--theme-dark-bg-primary);
        --bg-secondary: var(--theme-dark-bg-secondary);
        --bg-card: var(--theme-dark-bg-card);
        --shadow-light: var(--theme-dark-shadow-light);
        --shadow-dark: var(--theme-dark-shadow-dark);
        --text-primary: var(--theme-dark-text-primary);
        --text-secondary: var(--theme-dark-text-secondary);
        --text-muted: var(--theme-dark-text-muted);
    }
}