/* 皮肤色 + 动漫壁纸：登录 / 注册 / 控制台共用（读 localStorage napcat-go-theme-*）
   默认皮肤为 ink（墨蓝）；樱粉需显式 data-skin="sakura"。 */

:root[data-skin="sakura"][data-theme="light"],:root[data-skin="sakura"]:not([data-theme]){
  --primary:#f31260;--primary2:#f33b7c;--primarySoft:rgba(243,18,96,.1);--primaryGlow:rgba(243,18,96,.28);
  --red:#f31260;--redSoft:rgba(243,18,96,.11);--mesh:rgba(243,18,96,.07);--mesh2:rgba(0,111,238,.05);
}
:root[data-skin="sakura"][data-theme="dark"]{
  --primary:#ff7fac;--primary2:#f871a0;--primarySoft:rgba(255,127,172,.14);--primaryGlow:rgba(255,127,172,.3);
  --red:#ff7fac;--redSoft:rgba(255,127,172,.14);--mesh:rgba(243,18,96,.12);--mesh2:rgba(0,111,238,.08);
}
:root[data-skin="violet"][data-theme="light"],:root[data-skin="violet"]:not([data-theme]){
  --primary:#7828c8;--primary2:#9353d3;--primarySoft:rgba(120,40,200,.12);--primaryGlow:rgba(120,40,200,.28);
  --red:#7828c8;--redSoft:rgba(120,40,200,.12);--mesh:rgba(120,40,200,.08);--mesh2:rgba(0,111,238,.05);
}
:root[data-skin="violet"][data-theme="dark"]{
  --primary:#c084fc;--primary2:#a855f7;--primarySoft:rgba(192,132,252,.16);--primaryGlow:rgba(168,85,247,.32);
  --red:#c084fc;--redSoft:rgba(192,132,252,.16);--mesh:rgba(168,85,247,.16);--mesh2:rgba(0,111,238,.08);
}
:root[data-skin="aqua"][data-theme="light"],:root[data-skin="aqua"]:not([data-theme]){
  --primary:#0891b2;--primary2:#06b6d4;--primarySoft:rgba(8,145,178,.12);--primaryGlow:rgba(8,145,178,.28);
  --red:#0891b2;--redSoft:rgba(8,145,178,.12);--mesh:rgba(8,145,178,.08);--mesh2:rgba(59,130,246,.05);
}
:root[data-skin="aqua"][data-theme="dark"]{
  --primary:#67e8f9;--primary2:#22d3ee;--primarySoft:rgba(103,232,249,.14);--primaryGlow:rgba(34,211,238,.3);
  --red:#67e8f9;--redSoft:rgba(103,232,249,.14);--mesh:rgba(34,211,238,.14);--mesh2:rgba(59,130,246,.08);
}
:root[data-skin="matcha"][data-theme="light"],:root[data-skin="matcha"]:not([data-theme]){
  --primary:#16a34a;--primary2:#22c55e;--primarySoft:rgba(22,163,74,.12);--primaryGlow:rgba(22,163,74,.26);
  --red:#16a34a;--redSoft:rgba(22,163,74,.12);--mesh:rgba(22,163,74,.08);--mesh2:rgba(245,165,36,.05);
}
:root[data-skin="matcha"][data-theme="dark"]{
  --primary:#4ade80;--primary2:#22c55e;--primarySoft:rgba(74,222,128,.14);--primaryGlow:rgba(34,197,94,.3);
  --red:#4ade80;--redSoft:rgba(74,222,128,.14);--mesh:rgba(34,197,94,.14);--mesh2:rgba(245,165,36,.08);
}
:root[data-skin="sunset"][data-theme="light"],:root[data-skin="sunset"]:not([data-theme]){
  --primary:#ea580c;--primary2:#f97316;--primarySoft:rgba(234,88,12,.12);--primaryGlow:rgba(234,88,12,.28);
  --red:#ea580c;--redSoft:rgba(234,88,12,.12);--mesh:rgba(234,88,12,.08);--mesh2:rgba(243,18,96,.05);
}
:root[data-skin="sunset"][data-theme="dark"]{
  --primary:#fb923c;--primary2:#f97316;--primarySoft:rgba(251,146,60,.16);--primaryGlow:rgba(249,115,22,.32);
  --red:#fb923c;--redSoft:rgba(251,146,60,.16);--mesh:rgba(249,115,22,.16);--mesh2:rgba(243,18,96,.08);
}
:root[data-skin="ink"][data-theme="light"],:root[data-skin="ink"]:not([data-theme]){
  --primary:#2563eb;--primary2:#3b82f6;--primarySoft:rgba(37,99,235,.12);--primaryGlow:rgba(37,99,235,.28);
  --red:#2563eb;--redSoft:rgba(37,99,235,.12);--mesh:rgba(37,99,235,.08);--mesh2:rgba(120,40,200,.05);
}
:root[data-skin="ink"][data-theme="dark"]{
  --primary:#60a5fa;--primary2:#3b82f6;--primarySoft:rgba(96,165,250,.16);--primaryGlow:rgba(59,130,246,.32);
  --red:#60a5fa;--redSoft:rgba(96,165,250,.16);--mesh:rgba(59,130,246,.16);--mesh2:rgba(147,83,211,.08);
}
:root[data-skin="crimson"][data-theme="light"],:root[data-skin="crimson"]:not([data-theme]){
  --primary:#dc2626;--primary2:#ef4444;--primarySoft:rgba(220,38,38,.12);--primaryGlow:rgba(220,38,38,.28);
  --red:#dc2626;--redSoft:rgba(220,38,38,.12);--mesh:rgba(220,38,38,.08);--mesh2:rgba(234,88,12,.05);
}
:root[data-skin="crimson"][data-theme="dark"]{
  --primary:#f87171;--primary2:#ef4444;--primarySoft:rgba(248,113,113,.16);--primaryGlow:rgba(239,68,68,.32);
  --red:#f87171;--redSoft:rgba(248,113,113,.16);--mesh:rgba(239,68,68,.16);--mesh2:rgba(234,88,12,.08);
}
:root[data-skin="queen"][data-theme="light"],:root[data-skin="queen"]:not([data-theme]){
  --primary:#b5179e;--primary2:#f72585;--primarySoft:rgba(181,23,158,.13);--primaryGlow:rgba(247,37,133,.3);
  --red:#f72585;--redSoft:rgba(247,37,133,.12);--mesh:rgba(181,23,158,.14);--mesh2:rgba(114,9,183,.1);
  --bg:#fff5fb;--card:rgba(255,255,255,.88);--glass:rgba(255,245,251,.82);
}
:root[data-skin="queen"][data-theme="dark"]{
  --primary:#ff4d9a;--primary2:#e879f9;--primarySoft:rgba(255,77,154,.18);--primaryGlow:rgba(232,121,249,.36);
  --red:#ff4d9a;--redSoft:rgba(255,77,154,.16);--mesh:rgba(255,77,154,.2);--mesh2:rgba(192,132,252,.14);
  --bg:#140818;--card:rgba(32,18,40,.92);--glass:rgba(24,12,32,.78);
}
:root[data-skin="kawaii"][data-theme="light"],:root[data-skin="kawaii"]:not([data-theme]){
  --primary:#ff6b9d;--primary2:#ff9eb5;--primarySoft:rgba(255,107,157,.14);--primaryGlow:rgba(255,158,181,.34);
  --red:#ff6b9d;--redSoft:rgba(255,107,157,.12);--mesh:rgba(255,182,193,.22);--mesh2:rgba(255,214,165,.16);
  --bg:#fff8fb;--card:rgba(255,255,255,.9);--glass:rgba(255,248,251,.84);
}
:root[data-skin="kawaii"][data-theme="dark"]{
  --primary:#fda4c8;--primary2:#f9a8d4;--primarySoft:rgba(253,164,200,.18);--primaryGlow:rgba(249,168,212,.34);
  --red:#fda4c8;--redSoft:rgba(253,164,200,.16);--mesh:rgba(253,164,200,.18);--mesh2:rgba(253,186,116,.1);
  --bg:#1a1016;--card:rgba(36,22,30,.92);--glass:rgba(28,16,24,.78);
}

/* 石墨：冷灰蓝 */
:root[data-skin="graphite"][data-theme="light"],:root[data-skin="graphite"]:not([data-theme]){
  --primary:#475569;--primary2:#64748b;--primarySoft:rgba(71,85,105,.12);--primaryGlow:rgba(71,85,105,.24);
  --red:#475569;--redSoft:rgba(71,85,105,.12);--mesh:rgba(71,85,105,.1);--mesh2:rgba(14,165,233,.06);
  --bg:#f1f5f9;--card:#fff;--fg:#0f172a;--text:#0f172a;--muted:#64748b;
}
:root[data-skin="graphite"][data-theme="dark"]{
  --primary:#94a3b8;--primary2:#64748b;--primarySoft:rgba(148,163,184,.16);--primaryGlow:rgba(100,116,139,.3);
  --red:#94a3b8;--redSoft:rgba(148,163,184,.16);--mesh:rgba(148,163,184,.14);--mesh2:rgba(56,189,248,.08);
  --bg:#0c0f14;--card:#171a21;--fg:#e2e8f0;--text:#e2e8f0;--muted:#94a3b8;
}

/* 蜜金：暖琥珀（偏金，非陶土海报风） */
:root[data-skin="honey"][data-theme="light"],:root[data-skin="honey"]:not([data-theme]){
  --primary:#d97706;--primary2:#f59e0b;--primarySoft:rgba(217,119,6,.12);--primaryGlow:rgba(245,158,11,.28);
  --red:#d97706;--redSoft:rgba(217,119,6,.12);--mesh:rgba(245,158,11,.12);--mesh2:rgba(234,179,8,.08);
  --bg:#fffbeb;--card:#fff;--fg:#1c1917;--text:#1c1917;--muted:#78716c;
}
:root[data-skin="honey"][data-theme="dark"]{
  --primary:#fbbf24;--primary2:#f59e0b;--primarySoft:rgba(251,191,36,.16);--primaryGlow:rgba(245,158,11,.32);
  --red:#fbbf24;--redSoft:rgba(251,191,36,.16);--mesh:rgba(245,158,11,.16);--mesh2:rgba(234,179,8,.1);
  --bg:#120e08;--card:#1c1610;--fg:#faf3e6;--text:#faf3e6;--muted:#a8a29e;
}

/* 深海：靛蓝青绿 */
:root[data-skin="ocean"][data-theme="light"],:root[data-skin="ocean"]:not([data-theme]){
  --primary:#0e7490;--primary2:#0f766e;--primarySoft:rgba(14,116,144,.12);--primaryGlow:rgba(15,118,110,.26);
  --red:#0e7490;--redSoft:rgba(14,116,144,.12);--mesh:rgba(14,116,144,.1);--mesh2:rgba(15,118,110,.08);
  --bg:#f0fdfa;--card:#fff;--fg:#134e4a;--text:#134e4a;--muted:#5b7c7a;
}
:root[data-skin="ocean"][data-theme="dark"]{
  --primary:#2dd4bf;--primary2:#14b8a6;--primarySoft:rgba(45,212,191,.14);--primaryGlow:rgba(20,184,166,.3);
  --red:#2dd4bf;--redSoft:rgba(45,212,191,.14);--mesh:rgba(20,184,166,.16);--mesh2:rgba(56,189,248,.1);
  --bg:#06141a;--card:#0f1f26;--fg:#e6fffa;--text:#e6fffa;--muted:#8ab4b0;
}

/* 青柠 */
:root[data-skin="citrus"][data-theme="light"],:root[data-skin="citrus"]:not([data-theme]){
  --primary:#65a30d;--primary2:#84cc16;--primarySoft:rgba(101,163,13,.12);--primaryGlow:rgba(132,204,22,.26);
  --red:#65a30d;--redSoft:rgba(101,163,13,.12);--mesh:rgba(132,204,22,.12);--mesh2:rgba(250,204,21,.08);
  --bg:#f7fee7;--card:#fff;--fg:#1a2e05;--text:#1a2e05;--muted:#4d7c0f;
}
:root[data-skin="citrus"][data-theme="dark"]{
  --primary:#a3e635;--primary2:#84cc16;--primarySoft:rgba(163,230,53,.14);--primaryGlow:rgba(132,204,22,.3);
  --red:#a3e635;--redSoft:rgba(163,230,53,.14);--mesh:rgba(132,204,22,.16);--mesh2:rgba(250,204,21,.1);
  --bg:#0c1406;--card:#15200c;--fg:#ecfccb;--text:#ecfccb;--muted:#a3b18a;
}

/* 霜蓝：冷淡冰蓝 */
:root[data-skin="frost"][data-theme="light"],:root[data-skin="frost"]:not([data-theme]){
  --primary:#0284c7;--primary2:#38bdf8;--primarySoft:rgba(2,132,199,.12);--primaryGlow:rgba(56,189,248,.28);
  --red:#0284c7;--redSoft:rgba(2,132,199,.12);--mesh:rgba(56,189,248,.14);--mesh2:rgba(125,211,252,.1);
  --bg:#f0f9ff;--card:#fff;--fg:#0c4a6e;--text:#0c4a6e;--muted:#0369a1;
}
:root[data-skin="frost"][data-theme="dark"]{
  --primary:#7dd3fc;--primary2:#38bdf8;--primarySoft:rgba(125,211,252,.16);--primaryGlow:rgba(56,189,248,.32);
  --red:#7dd3fc;--redSoft:rgba(125,211,252,.16);--mesh:rgba(56,189,248,.18);--mesh2:rgba(14,165,233,.1);
  --bg:#061018;--card:#0c1a24;--fg:#e0f2fe;--text:#e0f2fe;--muted:#7dd3fc;
}

/* 赤铜 */
:root[data-skin="copper"][data-theme="light"],:root[data-skin="copper"]:not([data-theme]){
  --primary:#b45309;--primary2:#c2410c;--primarySoft:rgba(180,83,9,.12);--primaryGlow:rgba(194,65,12,.26);
  --red:#b45309;--redSoft:rgba(180,83,9,.12);--mesh:rgba(180,83,9,.1);--mesh2:rgba(120,53,15,.06);
  --bg:#faf6f1;--card:#fff;--fg:#292524;--text:#292524;--muted:#78716c;
}
:root[data-skin="copper"][data-theme="dark"]{
  --primary:#fdba74;--primary2:#fb923c;--primarySoft:rgba(253,186,116,.16);--primaryGlow:rgba(251,146,60,.3);
  --red:#fdba74;--redSoft:rgba(253,186,116,.16);--mesh:rgba(251,146,60,.16);--mesh2:rgba(180,83,9,.1);
  --bg:#140c08;--card:#1f1410;--fg:#fff7ed;--text:#fff7ed;--muted:#d6d3d1;
}

:root[data-wallpaper="queen"]{--wallpaper-url:url('/skins/skin-queen.webp')}
:root[data-wallpaper="kawaii"]{--wallpaper-url:url('/skins/skin-kawaii.webp')}
:root[data-wallpaper="sakura-scape"]{--wallpaper-url:url('/skins/skin-sakura-scape.webp')}
:root[data-wallpaper="night-city"]{--wallpaper-url:url('/skins/skin-night-city.webp')}

/* 壁纸：图要看得见；遮罩只保证文字可读，不能盖成白屏 */
:root[data-wallpaper] html{
  min-height:100%;
  background-color:var(--bg);
}
:root[data-wallpaper] body{
  background-color:transparent !important;
  background-image:
    linear-gradient(105deg,rgba(255,255,255,.55) 0%,rgba(255,255,255,.28) 42%,rgba(255,255,255,.08) 100%),
    var(--wallpaper-url) !important;
  background-size:cover !important;
  background-position:center center !important;
  background-attachment:scroll !important;
  background-repeat:no-repeat !important;
}
:root[data-wallpaper][data-theme="dark"] body{
  background-image:
    linear-gradient(105deg,rgba(9,9,11,.72) 0%,rgba(9,9,11,.42) 48%,rgba(9,9,11,.18) 100%),
    var(--wallpaper-url) !important;
}

/* 桌面：壁纸偏右，左侧略深一点方便侧栏阅读 */
@media (min-width:1081px){
  :root[data-wallpaper] body{
    background-position:center right !important;
    background-attachment:fixed !important;
    background-image:
      linear-gradient(105deg,rgba(255,255,255,.72) 0%,rgba(255,255,255,.38) 46%,rgba(255,255,255,.1) 100%),
      var(--wallpaper-url) !important;
  }
  :root[data-wallpaper][data-theme="dark"] body{
    background-image:
      linear-gradient(105deg,rgba(9,9,11,.82) 0%,rgba(9,9,11,.5) 48%,rgba(9,9,11,.2) 100%),
      var(--wallpaper-url) !important;
  }
}

:root[data-wallpaper] .sidebar-inner,
:root[data-wallpaper] .topbar,
:root[data-wallpaper] .m-tabbar{
  background:rgba(255,255,255,.78);
  backdrop-filter:blur(12px) saturate(1.2);
}
:root[data-wallpaper][data-theme="dark"] .sidebar-inner,
:root[data-wallpaper][data-theme="dark"] .topbar,
:root[data-wallpaper][data-theme="dark"] .m-tabbar{
  background:rgba(24,24,27,.78);
}
:root[data-wallpaper] .card{
  background:rgba(255,255,255,.86);
  backdrop-filter:blur(10px) saturate(1.15);
}
:root[data-wallpaper][data-theme="dark"] .card{
  background:rgba(24,24,27,.86);
}

/* 首页 / 登录页：有壁纸时减弱固定色块遮罩，跟控制台同套皮肤 */
:root[data-wallpaper] .backdrop{
  background:
    linear-gradient(105deg,rgba(255,255,255,.55) 0%,rgba(255,255,255,.2) 50%,transparent 100%) !important;
  opacity:1;
}
:root[data-wallpaper][data-theme="dark"] .backdrop{
  background:
    linear-gradient(105deg,rgba(9,9,11,.7) 0%,rgba(9,9,11,.35) 50%,transparent 100%) !important;
}
:root[data-wallpaper] .backdrop::after{display:none}
:root[data-wallpaper] .shell,
:root[data-wallpaper] .auth-card,
:root[data-wallpaper] .panel{
  position:relative;z-index:1;
}
