:root{
  --bg:#f2f3f5;
  --panel:#ffffff;
  --text:#0b0b0c;
  --muted:#6b6f76;
  --shadow: 0 10px 30px rgba(0,0,0,.12);
  --radius: 16px;
  --topbar-h: 54px;
  --taskbar-h: 58px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow:hidden;
}

.splash{
  position:fixed; inset:0;
  display:flex; align-items:center; justify-content:center;
  background: #fff;
  z-index:9999;
}
.splashCard{
  display:flex; gap:14px; align-items:center;
  padding:18px 20px; border-radius:20px;
  box-shadow: var(--shadow);
}
.logoCircle{
  width:46px; height:46px; border-radius:50%;
  display:grid; place-items:center;
  background:#0f62fe; color:#fff; font-weight:700;
}
.splashTitle{font-size:18px; font-weight:700}
.splashSub{font-size:12px; color:var(--muted); margin-top:2px}

.topbar{
  height:var(--topbar-h);
  display:flex; align-items:center; justify-content:space-between;
  padding:0 12px;
  background: var(--panel);
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
}
.topLeft,.topRight{display:flex; align-items:center; gap:10px}
.brand{font-weight:700}
.clock{font-size:12px; color:var(--muted)}

.circleBtn{
  width:36px; height:36px; border-radius:50%;
  border:1px solid rgba(0,0,0,.08);
  background:#fff;
}

.desktop{
  position:relative;
  height: calc(100vh - var(--topbar-h) - var(--taskbar-h));
  background: linear-gradient(180deg, #f6f7f9 0%, #eef0f3 100%);
}

.windowLayer{
  position:absolute; inset:0;
}

.launcher{
  position:absolute;
  left:12px; top:12px;
  width: 320px;
  height: calc(100% - 24px);
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,.06);
  display:flex; flex-direction:column;
  z-index:2000;
}
.hidden{display:none}
.launcherHeader{
  padding:12px;
  border-bottom:1px solid rgba(0,0,0,.06);
}
.launcherTitle{font-weight:700; margin-bottom:8px}
.launcherSearch{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.10);
  outline:none;
}
.launcherList{
  padding:10px;
  overflow:auto;
}
.launcherItem{
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
}
.launcherItem:hover{background: rgba(0,0,0,.04)}
.launcherItem .meta{display:flex; flex-direction:column}
.launcherItem .name{font-weight:650}
.launcherItem .url{font-size:12px; color:var(--muted)}
.badge{
  font-size:11px; padding:4px 8px; border-radius:999px;
  border:1px solid rgba(0,0,0,.12);
  color:var(--muted);
}

.dock{
  position:absolute;
  left:50%; transform:translateX(-50%);
  bottom:12px;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(8px);
  border:1px solid rgba(0,0,0,.08);
  border-radius: 999px;
  padding:10px;
  display:flex; gap:10px;
  box-shadow: var(--shadow);
  z-index:1500;
}
.dockBtn{
  width:44px; height:44px;
  border-radius:50%;
  border:1px solid rgba(0,0,0,.08);
  background:#fff;
}

.taskbar{
  height:var(--taskbar-h);
  background: var(--panel);
  box-shadow: 0 -1px 0 rgba(0,0,0,.06);
  display:flex; align-items:center;
  padding:0 10px;
}
.tasks{display:flex; gap:8px; overflow:auto; width:100%}
.task{
  border:1px solid rgba(0,0,0,.10);
  background:#fff;
  padding:8px 10px;
  border-radius:12px;
  min-width: 160px;
  display:flex; align-items:center; justify-content:space-between;
  gap:10px;
}
.task .tname{font-size:13px; font-weight:650; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.task .close{border:0; background:transparent; font-size:16px; opacity:.6}
.task.active{outline:2px solid rgba(15,98,254,.25); border-color: rgba(15,98,254,.35)}

/* Window */
.win{
  position:absolute;
  width: 820px;
  height: 520px;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow);
  border:1px solid rgba(0,0,0,.08);
  overflow:hidden;
}
.winHeader{
  height:44px;
  display:flex; align-items:center; justify-content:space-between;
  padding:0 10px;
  background: #fbfbfc;
  border-bottom:1px solid rgba(0,0,0,.06);
  cursor: grab;
}
.winHeader:active{cursor:grabbing}
.winTitle{font-weight:650; font-size:13px}
.winBtns{display:flex; gap:8px}
.winBtn{
  width:30px; height:30px; border-radius:10px;
  border:1px solid rgba(0,0,0,.08);
  background:#fff;
}
.winBody{
  height: calc(100% - 44px);
  background:#fff;
}
.winBody iframe{
  width:100%; height:100%;
  border:0;
}
.winFallback{
  padding:16px;
}
.resizeHandle{
  position:absolute;
  right:8px; bottom:8px;
  width:18px; height:18px;
  border-radius:6px;
  border:1px solid rgba(0,0,0,.12);
  background: rgba(0,0,0,.02);
  cursor:nwse-resize;
}
