/* ========== 主题系统 ========== */

/* 日间主题 */
[data-theme="light"] {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --dark-bg: #f5f5f7;
    --darker-bg: #eaeaec;
    --card-bg: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #64748b;
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-2: linear-gradient(135deg, #06b6d4 0%, #6366f1 100%);
    
    /* 扩展变量 */
    --section-bg-alt: #eef0f4;
    --section-bg-mid: #e8eaef;
    --section-bg-end: #f0f0f3;
    --danger-color: #ef4444;
    --danger-dark: #dc2626;
    --warning-color: #f59e0b;
    --neutral-color: #9ca3af;
    --disabled-color: #9ca3af;
    --gold-color: #f59e0b;
    --indigo-color: #6366f1;
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    
    --border-subtle: rgba(0, 0, 0, 0.06);
    --border-light: rgba(0, 0, 0, 0.1);
    --border-medium: rgba(0, 0, 0, 0.15);
    --bg-overlay: rgba(0, 0, 0, 0.03);
    --glow-primary: rgba(99, 102, 241, 0.15);
    --glow-secondary: rgba(139, 92, 246, 0.12);
    
    --nav-bg: rgba(245, 245, 247, 0.85);
    --nav-blur: blur(20px);
    --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --card-hover-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
    --card-border: 1px solid rgba(0, 0, 0, 0.08);
    --section-gradient-1: linear-gradient(135deg, #f5f5f7 0%, #eef0f4 100%);
    --section-gradient-2: linear-gradient(135deg, #eef0f4 0%, #e0e3eb 50%, #eaeaec 100%);
    --section-gradient-3: linear-gradient(135deg, #eef0f4 0%, #eaeaec 100%);
    --input-bg: #f3f4f6;
    --input-border: rgba(0, 0, 0, 0.12);
    --input-border-strong: rgba(0, 0, 0, 0.25);
    --input-focus-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    --text-muted: rgba(26, 26, 46, 0.55);
    --divider-color: rgba(0, 0, 0, 0.08);
    --text-disabled: rgba(26, 26, 46, 0.3);
    --table-header-bg: #f8f9fb;
    --table-row-hover: rgba(99, 102, 241, 0.03);
    --logo-glow: 0 0 30px rgba(99, 102, 241, 0.2);
}

/* 夜间主题（默认） */
:root,
[data-theme="dark"] {
    --primary-color: #6c5ce7;
    --secondary-color: #a29bfe;
    --accent-color: #00cec9;
    --dark-bg: #0d0d0d;
    --darker-bg: #080808;
    --card-bg: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #b2b2b2;
    --gradient-1: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    --gradient-2: linear-gradient(135deg, #00cec9 0%, #6c5ce7 100%);
    
    /* 扩展变量 */
    --section-bg-alt: #1a1a2e;
    --section-bg-mid: #16213e;
    --section-bg-end: #0f0f23;
    --danger-color: #ff6b6b;
    --danger-dark: #ee5a6f;
    --warning-color: #ffc107;
    --neutral-color: #9e9e9e;
    --disabled-color: #757575;
    --gold-color: #fdcb6e;
    --indigo-color: #818cf8;
    --gradient-danger: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    
    --border-subtle: rgba(255, 255, 255, 0.05);
    --border-light: rgba(255, 255, 255, 0.1);
    --border-medium: rgba(255, 255, 255, 0.15);
    --bg-overlay: rgba(255, 255, 255, 0.03);
    --glow-primary: rgba(108, 92, 231, 0.15);
    --glow-secondary: rgba(162, 155, 254, 0.1);
    
    --nav-bg: rgba(13, 13, 13, 0.85);
    --nav-blur: blur(20px);
    --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --card-hover-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    --card-border: 1px solid rgba(255, 255, 255, 0.05);
    --section-gradient-1: linear-gradient(135deg, #0d0d0d 0%, #1a1a2e 100%);
    --section-gradient-2: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
    --section-gradient-3: linear-gradient(135deg, #1a1a2e 0%, #0f0f23 100%);
    --input-bg: rgba(255, 255, 255, 0.05);
    --input-border: rgba(255, 255, 255, 0.1);
    --input-border-strong: rgba(255, 255, 255, 0.35);
    --input-focus-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
    --text-muted: rgba(255, 255, 255, 0.6);
    --divider-color: rgba(255, 255, 255, 0.08);
    --text-disabled: rgba(255, 255, 255, 0.25);
    --table-header-bg: rgba(255, 255, 255, 0.03);
    --table-row-hover: rgba(108, 92, 231, 0.05);
    --logo-glow: 0 0 30px rgba(108, 92, 231, 0.25);
}

/* ========== 主题切换按钮 ========== */
.theme-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--card-bg);
    border: var(--card-border);
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
    color: var(--text-primary);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--card-hover-shadow);
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .theme-toggle {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
}
