/* ════════════════════════════════════════════════════════════
   CSS 变量 — 暗色系二次元 ACG 风格主题
   金色主品牌色（2026-06-23 升级：补充稀有度色阶）
   ════════════════════════════════════════════════════════════ */

:root {
    /* ── 背景色阶（深空黑系） ── */
    --bg-darkest: #08080d;              /* 主背景：深空黑 */
    --bg-darker: #0f0f18;               /* 次背景：暗紫黑 */
    --bg-dark: #12121f;                 /* 深层背景 */
    --bg-medium: #1a1a2e;               /* 中层背景 */
    --bg-light: #232342;                /* 浅层背景 */
    --bg-card: rgba(21, 21, 34, 0.55);  /* 卡片半透明 */
    --bg-card-hover: rgba(28, 28, 48, 0.65);

    /* ── 主色调：金色（主品牌色） ── */
    --gold: #d4af37;
    --gold-light: #f4d03f;
    --gold-dark: #b7950b;

    /* ── 稀有度色阶（完整 N/R/SR/SSR/UR，新增） ── */
    --rarity-n: #9ca3af;                /* N：灰色（普通） */
    --rarity-r: #60a5fa;                /* R：蓝色（稀有） */
    --rarity-sr: #c084fc;               /* SR：紫色（超稀有） */
    --rarity-ssr: #f472b6;              /* SSR：粉紫色（2026-06-26 反馈5：原为金色#fbbf24，与UR交换） */
    --rarity-ur: #fbbf24;               /* UR：金色（2026-06-26 反馈5：原为粉色#f472b6，最高等级设为金色） */

    /* ── 特殊卡牌渐变色（新增，用于特殊卡牌边框/背景） ── */
    --special-liujin: linear-gradient(135deg, #fbbf24, #f59e0b, #fbbf24);   /* 鎏金：金色渐变 */
    --special-shanyao: linear-gradient(135deg, #c084fc, #e879f9, #f472b6);  /* 闪耀：紫粉渐变 */
    --special-huancai: linear-gradient(135deg, #34d399, #06b6d4, #8b5cf6);  /* 幻彩：彩虹渐变 */
    --special-fupian: linear-gradient(135deg, #1f2937, #374151, #1f2937);   /* 负片：暗灰渐变 */

    /* ── 幻彩三色（保留） ── */
    --prismatic-1: #ff6b9d;
    --prismatic-2: #c44dff;
    --prismatic-3: #4dffff;

    /* ── 词缀色（保留） ── */
    --gilded: #ffd700;
    --shine: #e8e8ff;
    --prismatic: #ff6bff;
    --negative: #4a4a5a;

    /* ── 文字色（优化层级对比度） ── */
    --text-primary: #f5f5fa;
    --text-secondary: #b8b8d4;
    --text-tertiary: #7878a0;
    --text-gold: #d4af37;
    --text-on-gold: #1a1a2e;

    /* ── 边框色 ── */
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-medium: rgba(255, 255, 255, 0.15);
    --border-gold: rgba(212, 175, 55, 0.4);
    --border-glass: rgba(255, 255, 255, 0.08);           /* 玻璃态边框（新增） */
    --border-hover: rgba(168, 85, 247, 0.35);            /* 悬浮边框紫色（新增） */
    --border-rare: rgba(251, 191, 36, 0.6);              /* 稀有边框金色（新增） */

    /* ── 字体 ── */
    --font-display: 'Cinzel Decorative', 'Noto Serif SC', serif;
    --font-title: 'Noto Serif SC', serif;
    --font-body: 'Noto Sans SC', sans-serif;

    /* ── 字号 ── */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;

    /* ── 间距 ── */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* ── 圆角 ── */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* ── 阴影 ── */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 0 20px rgba(212, 175, 55, 0.3);

    /* ── 渐变 ── */
    --gradient-gold: linear-gradient(135deg, #d4af37 0%, #f4d03f 50%, #d4af37 100%);
    --gradient-prismatic: linear-gradient(135deg, #ff6b9d 0%, #c44dff 50%, #4dffff 100%);
    --gradient-dark: linear-gradient(180deg, #0a0a14 0%, #12121f 100%);

    /* ── 过渡 ── */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* ── 增强渐变（任务2） ── */
    --gradient-gold-shine: linear-gradient(135deg, #b7950b 0%, #ffd700 25%, #fff8dc 50%, #ffd700 75%, #b7950b 100%);
    --gradient-gold-radial: radial-gradient(circle at center, #ffd700 0%, #d4af37 40%, transparent 70%);
    --gradient-prismatic-flow: linear-gradient(135deg, #ff6b9d 0%, #c44dff 25%, #4dffff 50%, #c44dff 75%, #ff6b9d 100%);
    --gradient-prismatic-radial: radial-gradient(circle at center, #ff6bff 0%, #c44dff 40%, transparent 70%);
    --gradient-purple-dark: linear-gradient(180deg, #0a0a14 0%, #1a0a2e 50%, #0a0a14 100%);
    --gradient-acg-bg: linear-gradient(135deg, #0a0a14 0%, #1a0a2e 40%, #0d0d1f 70%, #0a0a14 100%);
    --gradient-card-bg: linear-gradient(145deg, rgba(26, 26, 46, 0.85) 0%, rgba(18, 18, 31, 0.9) 100%);
    --gradient-hero-glow: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.15) 0%, transparent 60%);

    /* ── 发光色（任务2） ── */
    --glow-gold: 0 0 20px rgba(212, 175, 55, 0.5);
    --glow-gold-strong: 0 0 30px rgba(212, 175, 55, 0.7);
    --glow-prismatic: 0 0 20px rgba(255, 107, 255, 0.5);
    --glow-shine: 0 0 20px rgba(232, 232, 255, 0.5);
    --glow-pink: 0 0 20px rgba(255, 107, 157, 0.5);

    /* ── 稀有度光晕（新增，用于卡牌分级光效） ── */
    --glow-rarity-n: none;                                          /* N：无光晕 */
    --glow-rarity-r: 0 0 8px rgba(96, 165, 250, 0.15);             /* R：微弱蓝色光晕 */
    --glow-rarity-sr: 0 0 20px rgba(192, 132, 252, 0.2);           /* SR：紫色光晕 */
    --glow-rarity-ssr: 0 0 20px rgba(244, 114, 182, 0.3), 0 0 40px rgba(244, 114, 182, 0.15), inset 0 0 20px rgba(244, 114, 182, 0.1);  /* SSR：粉紫色光晕（2026-06-26 反馈5：与UR交换） */
    --glow-rarity-ur: 0 0 30px rgba(251, 191, 36, 0.4), 0 0 60px rgba(251, 191, 36, 0.2);  /* UR：金色强光晕（2026-06-26 反馈5：与SSR交换） */

    /* ── 流式字号（任务3，clamp 适配高分辨率） ── */
    --fs-title: clamp(1.5rem, 3vw, 2.5rem);
    --fs-subtitle: clamp(1.125rem, 2vw, 1.5rem);
    --fs-body: clamp(0.875rem, 1.2vw, 1rem);
    --fs-card-name: clamp(0.9rem, 1.5vw, 1.1rem);
    --fs-stat-value: clamp(1.5rem, 2.5vw, 2rem);

    /* ── 玻璃态（任务2） ── */
    --glass-bg: rgba(18, 18, 31, 0.6);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-blur: blur(16px);

    /* ── 性能优化（阶段6） ── */
    --contain-card: layout style;                    /* 卡片 containment（移除paint，避免阻止3D变换传递） */
    --contain-grid: layout style;                    /* 网格 containment */
}
