/* base.css — 全局变量、重置、主题 */
:root {
  --accent: #0078D7;
  --accent-rgb: 0, 120, 215;
  --accent-hover: #106EBE;
  --accent-press: #005A9E;
  --on-accent: #ffffff;
  --success: #107C10;
  --warning: #CA5010;
  --error: #E81123;
  --taskbar-h: 40px;
  --titlebar-h: 32px;
  /* accent 衍生：浅底半透明（hover 10% / 选中 20% / 描边 45%） */
  --accent-soft: rgba(var(--accent-rgb), .10);
  --accent-sel: rgba(var(--accent-rgb), .20);
  --accent-edge: rgba(var(--accent-rgb), .45);
  --font: "Segoe UI", "Segoe UI Emoji", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --win-bg: #ffffff;
  --win-bg2: #f5f5f5;
  --win-fg: #1b1b1b;
  --win-fg-dim: #555555;
  --win-sel: #cce4f7;
  --win-border: rgba(0, 0, 0, .16);
  --win-border-active: #0078D7;
  --win-border-inactive: #9a9a9a;
  --menu-bg: #f3f3f3;
  --menu-fg: #1b1b1b;
  --menu-hover: rgba(0, 0, 0, .07);
  --menu-sel: #E5F3FB;
  --titlebar-hover: #E5E5E5;
  --btn-bg: #e1e1e1;
  --btn-border: #adadad;
  --dlg-btns-bg: #F0F0F0;
  --acrylic: rgba(242, 242, 242, .86);
  /* 任务栏：纯色（亮白/暗黑，无半透明）及前景/交互色 */
  --taskbar-bg: #FFFFFF;
  --tb-fg: #1b1b1b;
  --tb-hover: rgba(0, 0, 0, .06);
  --tb-win-bg: rgba(0, 0, 0, .045);
  --tb-win-active: #D6EBFB;
  --tb-sep: rgba(0, 0, 0, .12);
  --shadow-pop: 0 8px 26px rgba(0, 0, 0, .32);
  /* 文件图标 Win10 配色（桌面/资源管理器/搜索统一，svg 为 currentColor） */
  --fico-folder: #FFC94D;
  --fico-file: #9FB0BD;
  --fico-txt: #7E97A8;
  --fico-image: #41A35F;
  --fico-audio: #A374D8;
  --fico-video: #3D92E0;
  --fico-zip: #B08A57;
  --fico-pc: #3D92E0;
}
[data-theme="dark"] {
  --win-bg: #1b1b1b;
  --win-bg2: #242424;
  --win-fg: #ececec;
  --win-fg-dim: #b0b0b0;
  --win-sel: #0d4a74;
  --win-border: rgba(255, 255, 255, .14);
  --win-border-active: #0078D7;
  --win-border-inactive: #555555;
  --menu-bg: #2b2b2b;
  --menu-fg: #ececec;
  --menu-hover: rgba(255, 255, 255, .09);
  --menu-sel: rgba(255, 255, 255, .1);
  --titlebar-hover: #3f3f3f;
  --btn-bg: #333333;
  --btn-border: #555555;
  --dlg-btns-bg: #252525;
  --acrylic: rgba(28, 28, 30, .9);
  --taskbar-bg: #000000;
  --tb-fg: #ffffff;
  --tb-hover: rgba(255, 255, 255, .10);
  --tb-win-bg: rgba(255, 255, 255, .07);
  --tb-win-active: rgba(255, 255, 255, .20);
  --tb-sep: rgba(255, 255, 255, .14);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; }
body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--win-fg);
  background: #000;
  user-select: none;
  -webkit-user-select: none;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; }

/* Win10 风格滚动条：细浅灰条，hover 加深 */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: #cdcdcd; border: none; border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: #a6a6a6; }
::-webkit-scrollbar-thumb:active { background: #8a8a8a; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-corner { background: transparent; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #4d4d4d; }
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: #6b6b6b; }
[data-theme="dark"] ::-webkit-scrollbar-thumb:active { background: #7d7d7d; }

.hidden { display: none !important; }
.acrylic {
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
}
.os-icon { fill: currentColor; vertical-align: middle; flex: none; display: inline-block; }
.os-icon [fill]:not([fill="none"]) { fill: currentColor; }
/* 复杂应用图标（assets/icons/*.png）：窗口标题栏/任务栏/桌面快捷方式，与极简 .os-icon 分工 */
.os-appicon { display: block; flex: none; object-fit: contain; -webkit-user-drag: none; user-select: none; }
.os-th { -webkit-user-drag: none; user-select: none; }

/* 全局账户头像：自定义图片与默认图形尺寸一致 */
.os-avatar {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  flex: none; overflow: hidden; border-radius: 50%; isolation: isolate;
  color: #fff; background: linear-gradient(145deg, #55768e, #2e4b61);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22), 0 1px 4px rgba(0,0,0,.16);
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif; font-weight: 600; line-height: 1;
  vertical-align: middle; user-select: none; -webkit-user-select: none;
}
.os-avatar-admin { background: linear-gradient(145deg, #327da5, #173b60 68%, #102c4c); color: #f4fbff; }
.os-avatar-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.os-avatar-fallback > svg { width: 68%; height: 68%; display: block; filter: drop-shadow(0 1px 1px rgba(0,0,0,.15)); }
.os-avatar-image { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; object-fit: cover; background: var(--win-bg2); }

.elos-dnd-ghost {
  position: fixed; z-index: 100000; width: 48px; height: 48px;
  pointer-events: none; touch-action: none; opacity: .78;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .28));
}
.elos-dnd-ghost-icon { display: block; width: 48px; height: 48px; }
.elos-dnd-ghost-icon img, .elos-dnd-ghost-icon svg { display: block; width: 48px; height: 48px; object-fit: contain; }
.elos-drag-source { opacity: .45 !important; }
.elos-drop-target { outline: 2px solid var(--accent) !important; outline-offset: -2px; }
.elos-drop-target.elos-drop-forbidden { outline-color: var(--error) !important; }
.elos-drop-target.elos-drop-noop { outline-style: dashed !important; outline-color: var(--win-fg-dim) !important; }
body.elos-file-dragging, body.elos-file-dragging * { user-select: none !important; }

/* 文件类图标统一 Win10 配色：桌面 / 资源管理器列表·导航 / 全局搜索结果 */
#desktop svg[data-os-icon="folder"],
.ex-items svg[data-os-icon="folder"],
.ex-nav svg[data-os-icon="folder"],
.sp-results svg[data-os-icon="folder"] { color: var(--fico-folder); }
#desktop svg[data-os-icon="txt"],
.ex-items svg[data-os-icon="txt"],
.ex-nav svg[data-os-icon="txt"],
.sp-results svg[data-os-icon="txt"] { color: var(--fico-txt); }
#desktop svg[data-os-icon="image"],
.ex-items svg[data-os-icon="image"],
.ex-nav svg[data-os-icon="image"],
.sp-results svg[data-os-icon="image"] { color: var(--fico-image); }
#desktop svg[data-os-icon="audio"],
.ex-items svg[data-os-icon="audio"],
.ex-nav svg[data-os-icon="audio"],
.sp-results svg[data-os-icon="audio"] { color: var(--fico-audio); }
#desktop svg[data-os-icon="video"],
.ex-items svg[data-os-icon="video"],
.ex-nav svg[data-os-icon="video"],
.sp-results svg[data-os-icon="video"] { color: var(--fico-video); }
#desktop svg[data-os-icon="zip"],
.ex-items svg[data-os-icon="zip"],
.ex-nav svg[data-os-icon="zip"],
.sp-results svg[data-os-icon="zip"] { color: var(--fico-zip); }
#desktop svg[data-os-icon="file"],
.ex-items svg[data-os-icon="file"],
.sp-results svg[data-os-icon="file"] { color: var(--fico-file); }
.ex-nav svg[data-os-icon="pc"],
.ex-items svg[data-os-icon="pc"],
.sp-results svg[data-os-icon="pc"] { color: var(--fico-pc); }

#wallpaper {
  position: fixed; inset: 0; z-index: 0;
  background: #000 center / cover no-repeat;
  transition: background-image .3s;
}
body.dragging, body.dragging * { user-select: none !important; cursor: default; }

html :focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
@media (forced-colors: active) {
  html :focus-visible { outline-color: Highlight; }
  .win.active, .desk-icon.sel, .tb-win.active { outline: 1px solid Highlight; outline-offset: -1px; }
}
