/* ============================================================
   主题变量定义文件（深色模式专用，已移除亮色主题）
   包含：颜色、尺寸、圆角、阴影、动画、字体等全部可配置变量
   后台主题编辑器可通过修改这些变量实时预览并保存
   ============================================================ */

/* 深色主题默认值 */
:root {
    /* ========== 主色调 ========== */
    --primary: #8b5cf6;
    --primary-light: #a855f7;
    --primary-dark: #7c3aed;
    --secondary: #3b82f6;
    --secondary-light: #60a5fa;
    --secondary-dark: #2563eb;
    --accent: #10b981;
    --accent-light: #34d399;
    --accent-dark: #059669;

    /* ========== 背景色 ========== */
    --bg-base: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #2d3a5e;
    --bg-input: #0f172a;
    --bg-header: #1e293b;
    --bg-modal: #1e293b;
    --bg-sidebar: #1e293b;
    --bg-tooltip: #1e293b;

    /* ========== 边框 ========== */
    --border: #334155;
    --border-light: #475569;
    --border-focus: #a855f7;
    --border-input: #334155;

    /* ========== 文字颜色 ========== */
    --text-primary: #f0f3fc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-inverse: #1e293b;
    --text-link: #8b5cf6;
    --text-link-hover: #a855f7;

    /* ========== 字体（新增） ========== */
    --font-family-base: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, sans-serif;
    --font-family-heading: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, sans-serif;
    --font-family-mono: 'SF Mono', 'Menlo', 'Monaco', 'Cascadia Code', 'Fira Code', monospace;

    /* ========== 按钮颜色（基础） ========== */
    --btn-primary-bg: #7c3aed;
    --btn-primary-hover: #6d28d9;
    --btn-primary-text: #ffffff;
    --btn-secondary-bg: #3b82f6;
    --btn-secondary-hover: #2563eb;
    --btn-secondary-text: #ffffff;
    --btn-success-bg: #10b981;
    --btn-success-hover: #059669;
    --btn-success-text: #ffffff;
    --btn-danger-bg: #ef4444;
    --btn-danger-hover: #dc2626;
    --btn-danger-text: #ffffff;
    --btn-warning-bg: #f59e0b;
    --btn-warning-hover: #d97706;
    --btn-warning-text: #1e293b;
    --btn-copy-bg: #8b5cf6;
    --btn-clear-bg: #f97316;

    /* ========== 按钮样式（尺寸、圆角、阴影、动画） ========== */
    --btn-font-weight: 600;
    --btn-letter-spacing: 0;
    --btn-border-radius: 60px;
    --btn-padding-x: 24px;
    --btn-padding-y: 10px;
    --btn-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    --btn-hover-transform: translateY(-2px);
    --btn-hover-box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    --btn-active-scale: 0.98;
    --btn-transition: all 0.2s ease;

    /* ========== 输入框样式 ========== */
    --input-bg: #0f172a;
    --input-border: #334155;
    --input-text: #f0f3fc;
    --input-placeholder: #64748b;
    --input-focus-border: #a855f7;
    --input-focus-shadow: rgba(168, 85, 247, 0.3);
    --input-disabled-bg: #1e293b;
    --input-disabled-text: #64748b;
    --input-border-radius: 28px;
    --input-border-width: 1px;
    --input-padding-x: 16px;
    --input-padding-y: 12px;
    --input-shadow: none;

    /* ========== 滚动条 ========== */
    --scrollbar-track: #1e293b;
    --scrollbar-thumb: #475569;
    --scrollbar-thumb-hover: #64748b;
    --scrollbar-width: 8px;
    --scrollbar-border-radius: 10px;

    /* ========== 通知/消息 ========== */
    --toast-bg: #1e293b;
    --toast-text: #ffffff;
    --toast-success-border: #10b981;
    --toast-error-border: #ef4444;
    --toast-info-border: #3b82f6;
    --toast-warning-border: #f59e0b;
    --toast-padding: 14px 24px;
    --toast-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    --toast-icon-size: 20px;
    --message-success-bg: rgba(16, 185, 129, 0.15);
    --message-success-border: #10b981;
    --message-success-text: #10b981;
    --message-error-bg: rgba(239, 68, 68, 0.15);
    --message-error-border: #ef4444;
    --message-error-text: #ef4444;
    --message-info-bg: rgba(59, 130, 246, 0.15);
    --message-info-border: #3b82f6;
    --message-info-text: #3b82f6;

    /* ========== 列表 ========== */
    --list-item-bg: #1e293b;
    --list-item-hover: #2d3a5e;
    --list-item-selected: #2d3a5e;
    --list-item-border: #334155;
    --list-item-padding: 14px 18px;
    --list-item-gap: 12px;
    --list-divider-style: 1px solid #334155;
    --list-border-radius: 24px;

    /* ========== 优先级标签 ========== */
    --priority-vip: #f43f5e;
    --priority-king: #f59e0b;
    --priority-kylin: #14b8a6;
    --priority-normal: #64748b;

    /* ========== 标签通用样式 ========== */
    --tag-bg: #334155;
    --tag-text: #e2e8f0;
    --tag-primary-bg: #8b5cf6;
    --tag-primary-text: #ffffff;
    --tag-success-bg: #10b981;
    --tag-success-text: #ffffff;
    --tag-warning-bg: #f59e0b;
    --tag-warning-text: #1e293b;
    --tag-danger-bg: #ef4444;
    --tag-danger-text: #ffffff;
    --tag-padding: 4px 12px;
    --tag-font-size: 11px;
    --tag-font-weight: 700;
    --tag-border-radius: 60px;

    /* ========== 阴影 ========== */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.8);

    /* ========== 渐变背景 ========== */
    --gradient-logo: linear-gradient(135deg, #c084fc, #a855f7);
    --gradient-primary: linear-gradient(135deg, #8b5cf6, #7c3aed);
    --gradient-success: linear-gradient(135deg, #10b981, #059669);
    --gradient-danger: linear-gradient(135deg, #ef4444, #dc2626);

    /* ========== 弹窗/模态框 ========== */
    --modal-bg: #1e293b;
    --modal-border: #334155;
    --modal-border-radius: 48px;
    --modal-padding: 32px;
    --modal-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    --modal-backdrop-bg: rgba(0, 0, 0, 0.5);
    --modal-backdrop-blur: 4px;
    --modal-animation-duration: 0.2s;

    /* ========== 下拉菜单 ========== */
    --dropdown-bg: #1e293b;
    --dropdown-border: #334155;
    --dropdown-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    --dropdown-border-radius: 24px;
    --dropdown-padding: 8px;
    --dropdown-item-hover: #2d3a5e;
    --dropdown-divider: #334155;

    /* ========== 分割线 ========== */
    --divider-color: #334155;
    --divider-width: 1px;

    /* ========== 悬浮/点击效果 ========== */
    --hover-brightness: 1.05;
    --active-brightness: 0.95;
    --selected-border-width: 8px;

    /* ========== 动画速度 ========== */
    --transition-fast: 0.15s;
    --transition-base: 0.2s;
    --transition-slow: 0.3s;

    /* ========== 在放进度条与波形 ========== */
    --progress-color: #0ef;
    --wave-style: 'scan';
}

/* 深色模式固定，无需亮色覆盖 */
body {
    color-scheme: dark;
    font-family: var(--font-family-base);
}

/* 标题字体 */
h1, h2, h3, h4, h5, h6,
.site-logo,
.modal-card h3,
.card h2,
.admin-header h1 {
    font-family: var(--font-family-heading);
}

/* 等宽字体用于代码、编号等 */
code, pre, .loaded-data-item, .song-number, .mono {
    font-family: var(--font-family-mono);
}

/* ========== 全局滚动条样式（使用变量） ========== */
* {
    scrollbar-width: var(--scrollbar-width);
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

*::-webkit-scrollbar {
    width: var(--scrollbar-width);
    height: var(--scrollbar-width);
}

*::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: var(--scrollbar-border-radius);
}

*::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: var(--scrollbar-border-radius);
    border: 2px solid var(--scrollbar-track);
}

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