* { margin:0; padding:0; box-sizing:border-box; }
html, body, #root { width:100%; height:100%; overflow:hidden; font-family:'Noto Sans','Segoe UI',sans-serif; }

.win-desktop {
  width:100%; height:100%;
  background: linear-gradient(135deg, #001a3a 0%, #003366 20%, #004d80 35%, #0068a8 50%, #1a8ccc 65%, #40b0d0 78%, #003366 100%);
  position:relative; overflow:hidden; user-select:none;
}
.win-desktop::before {
  content:''; position:absolute; top:-20%; left:30%; width:70%; height:120%;
  background: radial-gradient(ellipse at 40% 50%, rgba(0,180,220,0.25) 0%, transparent 60%),
              radial-gradient(ellipse at 60% 30%, rgba(60,200,240,0.15) 0%, transparent 50%),
              radial-gradient(ellipse at 30% 70%, rgba(0,100,200,0.2) 0%, transparent 55%);
  pointer-events:none;
}
.win-desktop::after {
  content:''; position:absolute; bottom:-10%; right:-5%; width:60%; height:60%;
  background: radial-gradient(ellipse at 50% 50%, rgba(0,140,200,0.2) 0%, transparent 65%);
  pointer-events:none;
}

.acrylic {
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
}
.acrylic-dark {
  background: rgba(32,32,32,0.85);
  backdrop-filter: blur(40px) saturate(150%);
  -webkit-backdrop-filter: blur(40px) saturate(150%);
}
.acrylic-taskbar {
  background: rgba(243,243,243,0.7);
  backdrop-filter: blur(60px) saturate(200%);
  -webkit-backdrop-filter: blur(60px) saturate(200%);
}

.win-shadow { box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.08); }
.win-shadow-lg { box-shadow: 0 16px 64px rgba(0,0,0,0.22), 0 4px 16px rgba(0,0,0,0.12); }

.window-enter { animation: windowOpen 0.25s cubic-bezier(0.16,1,0.3,1) forwards; }
.window-exit { animation: windowClose 0.15s ease-in forwards; }

@keyframes windowOpen {
  from { opacity:0; transform:scale(0.92) translateY(12px); }
  to { opacity:1; transform:scale(1) translateY(0); }
}
@keyframes windowClose {
  from { opacity:1; transform:scale(1); }
  to { opacity:0; transform:scale(0.95) translateY(8px); }
}

.startmenu-enter { animation: startOpen 0.25s cubic-bezier(0.16,1,0.3,1) forwards; }
.startmenu-exit { animation: startClose 0.15s ease-in forwards; }

@keyframes startOpen {
  from { opacity:0; transform:translateY(20px) scale(0.96); }
  to { opacity:1; transform:translateY(0) scale(1); }
}
@keyframes startClose {
  from { opacity:1; transform:translateY(0); }
  to { opacity:0; transform:translateY(20px) scale(0.96); }
}

.ctx-enter { animation: ctxOpen 0.12s ease-out forwards; }
@keyframes ctxOpen {
  from { opacity:0; transform:scale(0.95); }
  to { opacity:1; transform:scale(1); }
}

.boot-screen {
  position:fixed; inset:0; z-index:99999;
  background:#000; display:flex; flex-direction:column;
  align-items:center; justify-content:center;
  transition: opacity 0.8s ease;
}
.boot-dots { display:flex; gap:6px; margin-top:40px; }
.boot-dot {
  width:6px; height:6px; border-radius:50%; background:white;
  animation: bootSpin 1.4s ease-in-out infinite;
}
.boot-dot:nth-child(2) { animation-delay:0.2s; }
.boot-dot:nth-child(3) { animation-delay:0.4s; }
.boot-dot:nth-child(4) { animation-delay:0.6s; }
.boot-dot:nth-child(5) { animation-delay:0.8s; }

@keyframes bootSpin {
  0%,80%,100% { opacity:0.15; transform:scale(0.8); }
  40% { opacity:1; transform:scale(1.2); }
}

.taskbar-icon:hover .taskbar-tooltip {
  opacity:1; transform:translateY(-4px);
}
.taskbar-tooltip {
  opacity:0; transform:translateY(4px);
  transition: all 0.15s ease;
}

.desktop-icon:hover { background:rgba(255,255,255,0.1); }
.desktop-icon:active { background:rgba(255,255,255,0.18); }
.desktop-icon.selected { background:rgba(255,255,255,0.15); outline:1px solid rgba(255,255,255,0.3); }

.titlebar-btn:hover { background:rgba(0,0,0,0.06); }
.titlebar-close:hover { background:#c42b1c !important; color:white !important; }

.calc-btn { transition: background 0.1s; }
.calc-btn:hover { background:rgba(0,0,0,0.04); }
.calc-btn:active { background:rgba(0,0,0,0.08); transform:scale(0.97); }

.terminal-input:focus { outline:none; }
.cursor-blink { animation: blink 1s step-end infinite; }
@keyframes blink { 0%,100%{opacity:1;} 50%{opacity:0;} }

::-webkit-scrollbar { width:6px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:rgba(0,0,0,0.15); border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background:rgba(0,0,0,0.25); }

.bsod {
  position:fixed; inset:0; z-index:999999;
  background:#0078d7; display:flex; flex-direction:column;
  align-items:center; justify-content:center; color:white; padding:40px;
  font-family:'Noto Sans','Segoe UI',sans-serif;
}

.context-item:hover { background:rgba(0,120,212,0.08); }