:root {
  --glass: rgba(20, 28, 45, 0.72);
  --glass-light: rgba(255, 255, 255, 0.08);
  --accent: #22d3ee;
}
* { box-sizing: border-box; margin: 0; }
html, body, #root { height: 100%; overflow: hidden; }
body {
  font-family: 'Bricolage Grotesque', sans-serif;
  color: #e8eefc;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.desktop { position: fixed; inset: 0; overflow: hidden; }
.wall-holder { position: absolute; inset: 0; z-index: 0; }
.wall { position: absolute; inset: 0; }
.wall-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Desktop icons */
.icon-col {
  position: absolute; top: 16px; left: 12px; z-index: 5;
  display: flex; flex-direction: column; gap: 6px;
}
.desk-icon {
  width: 84px; padding: 10px 4px; border: none; background: transparent;
  color: #fff; display: flex; flex-direction: column; align-items: center; gap: 4px;
  border-radius: 8px; cursor: pointer; transition: background .15s;
  text-shadow: 0 1px 3px rgba(0,0,0,.7);
}
.desk-icon:hover, .desk-icon:focus { background: rgba(255,255,255,.15); }
.di-emoji { font-size: 32px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
.di-label { font-size: 11px; line-height: 1.1; }

/* Windows */
.win {
  position: absolute; background: var(--glass);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,.5);
  display: flex; flex-direction: column;
  animation: winpop .18s ease-out;
}
@keyframes winpop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.win-active { box-shadow: 0 24px 70px rgba(0,0,0,.65); border-color: rgba(34,211,238,.4); }
.titlebar {
  height: 38px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 6px 0 12px; cursor: grab;
  background: rgba(255,255,255,.06); border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: 13px; font-weight: 600;
}
.titlebar:active { cursor: grabbing; }
.ticon { font-size: 15px; }
.wbtn {
  width: 34px; height: 30px; border: none; background: transparent; color: #cfe0ff;
  cursor: pointer; border-radius: 6px; font-size: 14px; transition: background .12s;
}
.wbtn:hover { background: rgba(255,255,255,.15); }
.wclose:hover { background: #e11d48; color: #fff; }
.wbody { flex: 1; overflow: auto; padding: 10px; }
.resize-h {
  position: absolute; right: 0; bottom: 0; width: 18px; height: 18px;
  cursor: nwse-resize; background: linear-gradient(135deg, transparent 50%, rgba(255,255,255,.35) 50%);
}

/* Notepad */
.np-toolbar { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.np-b {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15);
  color: #e8eefc; padding: 4px 10px; border-radius: 6px; font-size: 12px; cursor: pointer;
  transition: background .12s;
}
.np-b:hover { background: rgba(255,255,255,.2); }
.np-b.accent { background: var(--accent); color: #05202a; border-color: var(--accent); font-weight: 700; }
.np-b.accent:hover { background: #67e8f9; }
.np-b:disabled { opacity: .5; }
.np-area {
  flex: 1; width: 100%; resize: none; background: rgba(0,0,0,.35);
  color: #dfe9ff; border: 1px solid rgba(255,255,255,.1); border-radius: 8px;
  padding: 10px; font-family: 'JetBrains Mono', monospace; font-size: 13px; line-height: 1.5;
  user-select: text; outline: none;
}
.np-status { font-size: 11px; opacity: .6; padding-top: 6px; font-family: 'JetBrains Mono', monospace; }

/* Paint */
.paint-tools { display: flex; gap: 10px; align-items: center; }
.cinput { width: 36px; height: 30px; border: none; background: none; cursor: pointer; padding: 0; }
.paint-canvas {
  width: 100%; flex: 1; min-height: 200px; border-radius: 8px; touch-action: none;
  border: 1px solid rgba(255,255,255,.15); background: #0b1220; cursor: crosshair;
}
.p-prompt {
  flex: 1; min-width: 120px; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.15);
  color: #dfe9ff; border-radius: 6px; padding: 5px 8px; font-size: 12px; user-select: text; outline: none;
}

/* Weather */
.wgt-input {
  flex: 1; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.15);
  color: #dfe9ff; border-radius: 6px; padding: 6px 10px; user-select: text; outline: none;
}
.wgt-now { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.wgt-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.wgt-card {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px; padding: 8px 4px; text-align: center;
}

/* Memory */
.mem-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mem-card {
  aspect-ratio: 1; border-radius: 10px; font-size: 26px; cursor: pointer;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  color: #7dd3fc; transition: transform .2s, background .2s; display: flex;
  align-items: center; justify-content: center;
}
.mem-card:hover { background: rgba(255,255,255,.16); }
.mem-card.flip { background: rgba(34,211,238,.15); transform: rotateY(0); }
.mem-card.done { background: rgba(16,185,129,.25); border-color: rgba(16,185,129,.5); cursor: default; }
.mem-lb { margin-top: auto; background: rgba(0,0,0,.3); border-radius: 8px; padding: 8px; }
.mem-lb-row { display: flex; justify-content: space-between; font-size: 12px; padding: 2px 0; }

/* About */
.about-win { padding: 12px; }
.remix-link { color: var(--accent); font-size: 12px; text-decoration: underline; }

/* Taskbar */
.taskbar {
  position: absolute; bottom: 0; left: 0; right: 0; height: 48px; z-index: 100;
  background: rgba(12, 18, 32, 0.78); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; gap: 6px; padding: 0 8px;
}
.start-btn {
  width: 40px; height: 38px; border: none; background: rgba(255,255,255,.05);
  border-radius: 8px; font-size: 20px; cursor: pointer; transition: background .15s;
}
.start-btn:hover, .start-btn.on { background: rgba(34,211,238,.25); }
.task-apps { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.task-item {
  display: flex; align-items: center; gap: 6px; max-width: 180px;
  height: 38px; padding: 0 10px; border: none; border-radius: 8px; cursor: pointer;
  background: rgba(255,255,255,.06); color: #e8eefc; font-size: 12px;
  border-bottom: 2px solid transparent; transition: background .12s;
}
.task-item:hover { background: rgba(255,255,255,.14); }
.task-item.active { background: rgba(255,255,255,.16); border-bottom-color: var(--accent); }
.tray { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.tray-i { font-size: 14px; background: none; border: none; color: #e8eefc; cursor: pointer; padding: 4px; border-radius: 6px; }
.tray-i:hover { background: rgba(255,255,255,.1); }
.clock { font-size: 12px; text-align: right; line-height: 1.1; font-variant-numeric: tabular-nums; }

/* Start menu */
.start-menu {
  position: absolute; bottom: 54px; left: 8px; width: 340px; max-width: calc(100vw - 16px);
  z-index: 101; padding: 14px;
  background: rgba(12, 18, 32, 0.9); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,.12); border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6); animation: slideup .2s ease-out;
}
@keyframes slideup { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.start-user { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), #7c3aed); font-weight: 800; color: #051019;
}
.start-search {
  width: 100%; background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.15);
  color: #dfe9ff; border-radius: 8px; padding: 8px 12px; font-size: 12px; margin-bottom: 12px;
  user-select: text; outline: none;
}
.start-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.start-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px; cursor: pointer; color: #e8eefc; transition: background .12s, transform .12s;
}
.start-tile:hover { background: rgba(34,211,238,.18); transform: translateY(-2px); }
.power-btn {
  width: 100%; margin-top: 12px; padding: 8px; background: rgba(225,29,72,.2);
  border: 1px solid rgba(225,29,72,.4); color: #fecaca; border-radius: 8px; cursor: pointer; font-size: 13px;
}
.power-btn:hover { background: rgba(225,29,72,.35); }

/* Context menu */
.ctx-menu {
  position: absolute; z-index: 200; min-width: 180px; padding: 6px;
  background: rgba(12, 18, 32, 0.92); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.12); border-radius: 10px; box-shadow: 0 14px 40px rgba(0,0,0,.6);
}
.ctx-item {
  display: block; width: 100%; text-align: left; padding: 8px 12px; border: none; background: none;
  color: #e8eefc; font-size: 13px; border-radius: 6px; cursor: pointer;
}
.ctx-item:hover { background: rgba(34,211,238,.2); }

/* Toast */
.toast {
  position: absolute; bottom: 60px; right: 12px; z-index: 150;
  background: rgba(12, 18, 32, 0.92); backdrop-filter: blur(14px);
  border: 1px solid rgba(34,211,238,.4); border-radius: 10px; padding: 12px 16px;
  font-size: 13px; box-shadow: 0 12px 36px rgba(0,0,0,.5); animation: slideup .25s ease-out; max-width: 280px;
}

/* Shutdown */
.shutdown {
  position: absolute; inset: 0; z-index: 999; background: #05070d;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  animation: fadein .4s ease-out;
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.spinner {
  width: 40px; height: 40px; border: 4px solid rgba(255,255,255,.2);
  border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  .icon-col { flex-direction: row; flex-wrap: wrap; width: calc(100% - 24px); }
  .desk-icon { width: 72px; }
  .start-grid { grid-template-columns: repeat(3, 1fr); }
}
</parameter>