/* ============================================================
   Windows XP 怀旧模拟器 — Luna 主题样式
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 100%; height: 100%; overflow: hidden;
  font-family: Tahoma, "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-size: 12px; color: #000; user-select: none;
  cursor: default;
}
.hidden { display: none !important; }
sup { font-size: 60%; }

/* ---------- 开机画面 ---------- */
.boot {
  position: fixed; inset: 0; background: #000; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 60px;
}
.boot-logo { text-align: center; color: #fff; }
.boot-flag { display: inline-grid; grid-template-columns: 1fr 1fr; gap: 3px; transform: perspective(60px) rotateY(-18deg); margin-bottom: 14px; }
.boot-flag i { width: 30px; height: 26px; display: block; border-radius: 2px; }
.boot-flag i:nth-child(1) { background: #f65314; }
.boot-flag i:nth-child(2) { background: #7cbb00; }
.boot-flag i:nth-child(3) { background: #00a1f1; }
.boot-flag i:nth-child(4) { background: #ffbb00; }
.boot-flag.small i { width: 10px; height: 9px; }
.boot-title { font-size: 34px; font-weight: 300; letter-spacing: 1px; }
.boot-title sup { font-size: 14px; }
.boot-sub { color: #888; margin-top: 8px; font-size: 13px; letter-spacing: 4px; }
.boot-progress { width: 200px; }
.boot-bar { height: 14px; border: 1px solid #333; border-radius: 7px; overflow: hidden; position: relative; background: #111; }
.boot-bar span {
  position: absolute; top: 1px; width: 12px; height: 10px; border-radius: 3px;
  background: linear-gradient(#7ab8ff, #2e6fd8);
  animation: bootslide 1.4s linear infinite;
}
.boot-bar span:nth-child(2) { animation-delay: .15s; }
.boot-bar span:nth-child(3) { animation-delay: .3s; }
@keyframes bootslide { from { left: -16px; } to { left: 204px; } }

/* ---------- 登录界面 ---------- */
.login {
  position: fixed; inset: 0; z-index: 9000;
  background: linear-gradient(180deg, #00309c 0%, #0048c8 55%, #5a8de8 100%);
  display: flex; align-items: center; justify-content: center; gap: 8vw;
}
.login-left { color: #fff; }
.login-brand { display: flex; align-items: center; gap: 10px; font-size: 40px; font-weight: 300; font-style: italic; margin-bottom: 30px; }
.login-brand sup { font-size: 16px; font-style: normal; color: #f60; font-weight: bold; }
.login-tip { font-size: 14px; color: #cfe0ff; }
.login-user {
  display: flex; align-items: center; gap: 14px; padding: 12px 26px 12px 12px;
  border-radius: 8px; cursor: pointer; transition: background .15s;
}
.login-user:hover { background: rgba(255,255,255,.12); }
.login-avatar {
  width: 64px; height: 64px; border-radius: 6px; font-size: 38px;
  background: linear-gradient(145deg, #f9a03f, #d96c1f);
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255,255,255,.7);
}
.login-name { font-size: 20px; color: #fff; }
.login-desc { font-size: 12px; color: #bcd4ff; margin-top: 3px; }

/* ---------- 桌面 ---------- */
.desktop {
  position: fixed; inset: 0; z-index: 1;
  background:
    url('../assets/img/bliss.jpg') center/cover no-repeat,
    radial-gradient(140% 90% at 50% 118%, #2e7d22 0%, #4e9e2c 32%, rgba(120,190,80,.55) 52%, transparent 68%),
    radial-gradient(90% 55% at 82% 8%, rgba(255,255,255,.85), transparent 42%),
    radial-gradient(70% 40% at 20% 22%, rgba(255,255,255,.55), transparent 45%),
    linear-gradient(180deg, #2358b8 0%, #4d83d8 45%, #8dbcec 78%, #bfe0f8 100%);
}
.desktop.wall-css   { background:
    radial-gradient(140% 90% at 50% 118%, #2e7d22 0%, #4e9e2c 32%, rgba(120,190,80,.55) 52%, transparent 68%),
    radial-gradient(90% 55% at 82% 8%, rgba(255,255,255,.85), transparent 42%),
    radial-gradient(70% 40% at 20% 22%, rgba(255,255,255,.55), transparent 45%),
    linear-gradient(180deg, #2358b8 0%, #4d83d8 45%, #8dbcec 78%, #bfe0f8 100%);
}
.desktop.wall-blue  { background: linear-gradient(180deg, #004e98, #3a6ea5); }
.desktop.wall-green { background: linear-gradient(180deg, #0a5c36, #1e8f4e); }
.desktop.wall-tea   { background: #008080; }

.xp-icons {
  position: absolute; top: 8px; left: 8px; bottom: 38px;
  display: flex; flex-direction: column; flex-wrap: wrap; align-content: flex-start;
  gap: 2px;
}
.xp-icon {
  width: 84px; padding: 6px 2px 4px; text-align: center; cursor: pointer;
  border: 1px solid transparent; border-radius: 3px;
}
.xp-icon:hover { background: rgba(49,106,197,.35); border-color: rgba(255,255,255,.4); }
.xp-icon.sel { background: rgba(49,106,197,.6); border-color: rgba(255,255,255,.7); }
.xp-icon .ico { font-size: 32px; line-height: 38px; filter: drop-shadow(1px 1px 1px rgba(0,0,0,.5)); }
.xp-icon .lbl {
  color: #fff; font-size: 11px; margin-top: 2px; line-height: 1.25;
  text-shadow: 1px 1px 1px #000; max-height: 28px; overflow: hidden;
}
.xp-icon.flicker { animation: iconflick .22s 2; }
@keyframes iconflick { 50% { opacity: .25; filter: brightness(1.6); } }

#windows { position: absolute; inset: 0 0 30px 0; pointer-events: none; }
#windows > * { pointer-events: auto; }

/* ---------- 窗口 ---------- */
.xp-window {
  position: absolute; min-width: 220px; min-height: 90px;
  background: #ece9d8; border-radius: 8px 8px 0 0;
  box-shadow: 2px 3px 14px rgba(0,0,0,.45);
  display: flex; flex-direction: column;
  border: 1px solid #0058e6;
}
.xp-window.inactive { border-color: #98a8c0; box-shadow: 2px 3px 10px rgba(0,0,0,.3); }
.xp-titlebar {
  height: 26px; flex: none; border-radius: 7px 7px 0 0;
  background: linear-gradient(180deg, #0997ff 0%, #0053ee 8%, #0050ee 40%, #06f 88%, #0058eb 100%);
  display: flex; align-items: center; padding: 0 4px 0 8px; gap: 6px; cursor: default;
}
.xp-window.inactive .xp-titlebar { background: linear-gradient(180deg, #b8c4dc, #98a8c0); }
.xp-title-icon { font-size: 15px; }
.xp-title-text {
  flex: 1; color: #fff; font-weight: bold; font-size: 12px;
  text-shadow: 1px 1px 1px rgba(0,0,0,.5);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.xp-title-btns { display: flex; gap: 2px; }
.xp-tb-btn {
  width: 21px; height: 21px; border-radius: 3px; border: 1px solid rgba(255,255,255,.6);
  color: #fff; font-size: 13px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #3c8cfd, #1565e8);
  font-family: "Marlett", Tahoma, sans-serif;
}
.xp-tb-btn:hover { filter: brightness(1.15); }
.xp-tb-btn.close { background: linear-gradient(180deg, #f08a6d, #d84a28); }
.xp-tb-btn.close:hover { background: linear-gradient(180deg, #ff9a7d, #e8502a); }
.xp-window-body {
  flex: 1; overflow: auto; position: relative; background: #ece9d8;
  margin: 0 3px 3px; border: 1px solid #a09c8c; border-top: none;
}
.xp-window.maxed { border-radius: 0; }
.xp-window.maxed .xp-titlebar { border-radius: 0; }
.xp-resize {
  position: absolute; right: 0; bottom: 0; width: 16px; height: 16px;
  cursor: nwse-resize; z-index: 5;
}
.xp-window.shake { animation: winshake .5s; }
@keyframes winshake {
  0%,100% { transform: translateX(0); }
  10%,30%,50%,70%,90% { transform: translateX(-8px); }
  20%,40%,60%,80% { transform: translateX(8px); }
}

/* ---------- XP 通用控件 (供各应用复用) ---------- */
.xp-btn {
  font-family: inherit; font-size: 12px; padding: 3px 14px; min-height: 23px;
  background: linear-gradient(180deg, #fff, #ece9d8 45%, #ddd8c8);
  border: 1px solid #003c74; border-radius: 3px; cursor: pointer; color: #000;
}
.xp-btn:hover { box-shadow: inset 0 0 0 1px #ffcf31; }
.xp-btn:active { background: linear-gradient(180deg, #ddd8c8, #ece9d8 55%, #fff); }
.xp-btn:disabled { color: #aca899; border-color: #aca899; cursor: default; box-shadow: none; }
.xp-input, .xp-textarea {
  font-family: inherit; font-size: 12px; padding: 3px 5px;
  border: 1px solid #7f9db9; background: #fff; color: #000; outline: none;
}
.xp-input:focus, .xp-textarea:focus { border-color: #316ac5; }
.xp-listbox {
  border: 1px solid #7f9db9; background: #fff; overflow: auto;
}
.xp-listbox .lb-item { padding: 2px 6px; cursor: default; white-space: nowrap; }
.xp-listbox .lb-item:hover { background: #cfe0fa; }
.xp-listbox .lb-item.sel { background: #316ac5; color: #fff; }
.xp-menubar {
  display: flex; background: #ece9d8; border-bottom: 1px solid #d8d4c4; padding: 1px 2px;
}
.xp-menubar span { padding: 3px 8px; cursor: default; }
.xp-menubar span:hover { background: #316ac5; color: #fff; }
.xp-toolbar {
  display: flex; align-items: center; gap: 2px; padding: 3px 4px;
  background: linear-gradient(180deg, #f7f5ee, #e3dfd0); border-bottom: 1px solid #d0ccbc;
}
.xp-tool-btn {
  display: flex; align-items: center; gap: 3px; padding: 2px 6px; cursor: pointer;
  border: 1px solid transparent; border-radius: 2px; font-size: 12px;
}
.xp-tool-btn:hover { border-color: #316ac5; background: #c1d2ee; }
.xp-tool-btn:active { background: #a4bfe8; }
.xp-statusbar {
  display: flex; gap: 8px; padding: 2px 6px; font-size: 11px; color: #444;
  background: #ece9d8; border-top: 1px solid #d8d4c4; flex: none;
}
.xp-statusbar .sb-cell { border-left: 1px solid #c8c4b4; padding-left: 8px; }
.xp-fieldset { border: 1px solid #d0d0bf; border-radius: 4px; padding: 8px 10px 10px; margin: 8px; position: relative; }
.xp-fieldset legend { padding: 0 5px; color: #0046d5; font-size: 12px; }
.xp-tabbar { display: flex; border-bottom: 2px solid #919b9c; padding: 0 4px; }
.xp-tab {
  padding: 4px 14px; cursor: pointer; border: 1px solid #919b9c; border-bottom: none;
  border-radius: 4px 4px 0 0; background: #e0ddd0; margin-bottom: -2px; margin-right: 2px;
}
.xp-tab.sel { background: #fff; font-weight: bold; border-bottom: 2px solid #fff; }
.xp-progress { height: 12px; border: 1px solid #7f9db9; background: #fff; overflow: hidden; }
.xp-progress > div { height: 100%; background: linear-gradient(180deg, #68d868, #189418); transition: width .2s; }

/* XP 风格滚动条 */
.xp-window-body::-webkit-scrollbar, .xp-listbox::-webkit-scrollbar,
.xp-textarea::-webkit-scrollbar, .xp-scroll::-webkit-scrollbar { width: 17px; height: 17px; }
.xp-window-body::-webkit-scrollbar-track, .xp-listbox::-webkit-scrollbar-track,
.xp-textarea::-webkit-scrollbar-track, .xp-scroll::-webkit-scrollbar-track { background: #f1efe2; }
.xp-window-body::-webkit-scrollbar-thumb, .xp-listbox::-webkit-scrollbar-thumb,
.xp-textarea::-webkit-scrollbar-thumb, .xp-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #c8d6f0, #a8c0e8);
  border: 1px solid #7f9db9; border-radius: 2px;
}

/* ---------- 任务栏 ---------- */
.taskbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 30px; z-index: 5000;
  background: linear-gradient(180deg, #245edb 0%, #3f8cf3 9%, #245edb 18%, #245edb 92%, #1941a5 100%);
  display: flex; align-items: stretch;
}
.start-btn {
  flex: none; width: 98px; border: none; cursor: pointer;
  background: radial-gradient(ellipse at 50% 30%, #5fc451, #3c8f3a 70%, #2e702c);
  color: #fff; font-weight: bold; font-style: italic; font-size: 15px;
  border-radius: 0 12px 12px 0; text-shadow: 1px 1px 1px rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center; gap: 5px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 2px 0 4px rgba(0,0,0,.3);
}
.start-btn:hover { filter: brightness(1.08); }
.start-btn.active { background: radial-gradient(ellipse at 50% 30%, #2e702c, #3c8f3a 70%, #5fc451); }
.start-flag { display: inline-grid; grid-template-columns: 1fr 1fr; gap: 1px; transform: perspective(30px) rotateY(-20deg); }
.start-flag i { width: 7px; height: 6px; }
.start-flag i:nth-child(1) { background: #f65314; }
.start-flag i:nth-child(2) { background: #7cbb00; }
.start-flag i:nth-child(3) { background: #00a1f1; }
.start-flag i:nth-child(4) { background: #ffbb00; }
.quicklaunch {
  flex: none; display: flex; align-items: center; gap: 4px; padding: 0 8px;
  border-left: 1px solid rgba(255,255,255,.25); margin-left: 6px;
}
.quicklaunch span { font-size: 17px; cursor: pointer; filter: drop-shadow(1px 1px 1px rgba(0,0,0,.4)); }
.quicklaunch span:hover { filter: brightness(1.3) drop-shadow(1px 1px 1px rgba(0,0,0,.4)); }
.task-buttons { flex: 1; display: flex; align-items: center; gap: 3px; padding: 2px 6px; overflow: hidden; }
.task-btn {
  height: 24px; min-width: 120px; max-width: 180px; padding: 0 8px;
  display: flex; align-items: center; gap: 5px; cursor: pointer;
  background: linear-gradient(180deg, #3c81f0, #1f5fd8);
  border: none; border-radius: 3px; color: #fff; font-size: 11px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.task-btn:hover { filter: brightness(1.1); }
.task-btn.active {
  background: linear-gradient(180deg, #1c4fa8, #2a63c8);
  box-shadow: inset 1px 1px 3px rgba(0,0,0,.4);
}
.task-btn .tb-ico { flex: none; }
.task-btn .tb-txt { overflow: hidden; text-overflow: ellipsis; }
.task-btn.flash { animation: taskflash 0.9s step-end infinite; }
@keyframes taskflash {
  0%, 100% { background: linear-gradient(180deg, #3c81f0, #1f5fd8); }
  50% { background: linear-gradient(180deg, #ffb347, #e07b00); }
}
.tray-icons .blink { animation: trayblink 0.8s step-end infinite; }
@keyframes trayblink { 50% { opacity: .15; filter: drop-shadow(0 0 5px #ff8c00); } }
.tray {
  flex: none; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 8px;
  background: linear-gradient(180deg, #0c8aef, #19b9f3);
  box-shadow: inset 2px 0 3px rgba(0,0,0,.2);
  color: #fff; font-size: 11px;
}
.tray-icons { display: flex; align-items: center; gap: 6px; }
.tray-icons span { font-size: 15px; cursor: pointer; }
.clock { min-width: 42px; text-align: center; line-height: 1.15; }

/* ---------- 开始菜单 ---------- */
.start-menu {
  position: absolute; left: 0; bottom: 30px; width: 400px; z-index: 6000;
  background: #fff; border-radius: 6px 6px 0 0; overflow: hidden;
  box-shadow: 3px -2px 16px rgba(0,0,0,.5); border: 1px solid #0058e6;
}
.sm-header {
  height: 54px; display: flex; align-items: center; gap: 10px; padding: 0 12px;
  background: linear-gradient(180deg, #1568d8, #0050d0);
  color: #fff; font-size: 15px; font-weight: bold; text-shadow: 1px 1px 1px rgba(0,0,0,.5);
}
.sm-avatar {
  width: 40px; height: 40px; border-radius: 5px; font-size: 24px;
  background: linear-gradient(145deg, #f9a03f, #d96c1f);
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255,255,255,.85);
}
.sm-body { display: flex; min-height: 330px; }
.sm-left { flex: 1.25; padding: 6px 0; display: flex; flex-direction: column; }
.sm-right { flex: 1; background: #d3e5fa; border-left: 1px solid #95bdee; padding: 6px 0; }
.sm-item {
  display: flex; align-items: center; gap: 8px; padding: 5px 10px; cursor: pointer; font-size: 12px;
}
.sm-item:hover { background: #316ac5; color: #fff; }
.sm-item .ico { font-size: 20px; width: 26px; text-align: center; }
.sm-right .sm-item { color: #00136b; }
.sm-right .sm-item:hover { color: #fff; }
.sm-right .sm-item .ico { font-size: 17px; width: 22px; }
.sm-sep { height: 1px; background: #d0d0d0; margin: 4px 8px; }
.sm-allprograms {
  margin-top: auto; text-align: center; padding: 6px; cursor: pointer; font-weight: bold; color: #005030;
}
.sm-allprograms:hover { background: #316ac5; color: #fff; }
.sm-footer {
  display: flex; justify-content: flex-end; gap: 4px; padding: 6px 10px;
  background: linear-gradient(180deg, #0050d0, #1568d8);
}
.sm-foot-btn {
  color: #fff; font-size: 12px; padding: 4px 10px; cursor: pointer; border-radius: 3px;
}
.sm-foot-btn:hover { background: rgba(255,255,255,.2); }

/* ---------- 桌面右键菜单 ---------- */
.ctx-menu {
  position: absolute; z-index: 7000; min-width: 170px;
  background: #fff; border: 1px solid #aca899; padding: 2px;
  box-shadow: 2px 2px 6px rgba(0,0,0,.35); font-size: 12px;
}
.ctx-menu .cm-item { padding: 4px 20px; cursor: default; }
.ctx-menu .cm-item:hover { background: #316ac5; color: #fff; }
.ctx-menu .cm-sep { height: 1px; background: #d0d0d0; margin: 2px 4px; }

/* ---------- 气泡通知 ---------- */
.xp-balloon {
  position: absolute; right: 8px; bottom: 36px; width: 260px; z-index: 6500;
  background: #ffffe1; border: 1px solid #000; border-radius: 6px; padding: 8px 10px;
  font-size: 12px; box-shadow: 2px 2px 8px rgba(0,0,0,.35);
  animation: balloon-in .25s ease-out;
}
.xp-balloon .bl-title { font-weight: bold; margin-bottom: 3px; }
.xp-balloon .bl-close { position: absolute; top: 3px; right: 6px; cursor: pointer; font-weight: bold; }
@keyframes balloon-in { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ---------- 关机画面 ---------- */
.shutdown {
  position: fixed; inset: 0; z-index: 9500; background: #00309c;
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 30px;
}
.shutdown-text { color: #fff; font-size: 18px; }
.shutdown.off { background: #5a7a8c; }
.shutdown .restart-btn {
  color: #fff; border: 1px solid #fff; background: transparent; padding: 8px 24px;
  font-size: 14px; cursor: pointer; border-radius: 4px;
}
.shutdown .restart-btn:hover { background: rgba(255,255,255,.15); }
/* ---------- 屏保 ---------- */
.screensaver { position: fixed; inset: 0; z-index: 9998; background: #000; cursor: none; }
.screensaver video { width: 100%; height: 100%; object-fit: cover; }
.ss-tip {
  position: absolute; bottom: 40px; left: 0; right: 0; text-align: center;
  color: rgba(255,255,255,.85); font-size: 14px; text-shadow: 0 0 8px #000;
  animation: ssfade 2.4s ease-in-out infinite;
}
@keyframes ssfade { 0%, 100% { opacity: .3; } 50% { opacity: .9; } }

