* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --accent: #007AFF;
  --accent-hover: #0056CC;
}

html, body, #root {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Inter', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

@keyframes bootGlow {
  0% { opacity: 0; filter: brightness(0.5); }
  50% { opacity: 1; filter: brightness(1.2); }
  100% { opacity: 1; filter: brightness(1); }
}

@keyframes bootProgress {
  0% { width: 0%; }
  100% { width: 100%; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes windowOpen {
  from { opacity: 0; transform: scale(0.88); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes windowClose {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.88); }
}

@keyframes windowMinimize {
  from { opacity: 1; transform: scale(1) translateY(0); }
  to { opacity: 0; transform: scale(0.4) translateY(300px); }
}

@keyframes bounceIn {
  0% { transform: translateY(0); }
  30% { transform: translateY(-20px); }
  50% { transform: translateY(0); }
  70% { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}

@keyframes spotlightIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes slideOutRight {
  from { transform: translateX(0); }
  to { transform: translateX(100%); }
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.boot-logo {
  animation: bootGlow 2s ease-in-out;
}

.boot-progress-inner {
  animation: bootProgress 2.5s ease-in-out forwards;
}

.fade-in {
  animation: fadeIn 0.8s ease-out;
}

.fade-out {
  animation: fadeOut 0.8s ease-out forwards;
}

.window-opening {
  animation: windowOpen 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.window-closing {
  animation: windowClose 0.2s ease-in forwards;
}

.window-minimizing {
  animation: windowMinimize 0.4s ease-in forwards;
}

.dock-bounce {
  animation: bounceIn 0.6s ease;
}

.spotlight-anim {
  animation: spotlightIn 0.2s ease-out;
}

.slide-in-right {
  animation: slideInRight 0.3s ease-out;
}

.slide-out-right {
  animation: slideOutRight 0.3s ease-out forwards;
}

.glass {
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
}

.glass-dark {
  background: rgba(30,30,30,0.78);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
}

.glass-menu {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(50px) saturate(200%);
  -webkit-backdrop-filter: blur(50px) saturate(200%);
}

.glass-menu-dark {
  background: rgba(40,40,40,0.88);
  backdrop-filter: blur(50px) saturate(200%);
  -webkit-backdrop-filter: blur(50px) saturate(200%);
}

.glass-dock {
  background: rgba(255,255,255,0.45);
  backdrop-filter: blur(30px) saturate(170%);
  -webkit-backdrop-filter: blur(30px) saturate(170%);
  border: 1px solid rgba(255,255,255,0.4);
}

.glass-dock-dark {
  background: rgba(50,50,50,0.55);
  backdrop-filter: blur(30px) saturate(170%);
  -webkit-backdrop-filter: blur(30px) saturate(170%);
  border: 1px solid rgba(255,255,255,0.12);
}

.traffic-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 8px;
  color: transparent;
  transition: all 0.15s;
}

.traffic-btn:hover {
  color: rgba(0,0,0,0.6);
}

.traffic-close { background: #FF5F56; border: 1px solid #E0443E; }
.traffic-minimize { background: #FFBD2E; border: 1px solid #DEA123; }
.traffic-fullscreen { background: #27C93F; border: 1px solid #1DAD2B; }

.window-shadow {
  box-shadow: 0 22px 70px 4px rgba(0,0,0,0.28), 0 0 0 1px rgba(0,0,0,0.08);
}

.window-shadow-dark {
  box-shadow: 0 22px 70px 4px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06);
}

.terminal-cursor {
  animation: cursorBlink 1s step-end infinite;
}

.dock-icon-wrap {
  transition: transform 0.15s ease-out, margin 0.15s ease-out;
  transform-origin: bottom center;
}

input:focus, textarea:focus {
  outline: none;
}

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(128,128,128,0.35);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(128,128,128,0.55);
}

.context-menu-item:hover {
  background: var(--accent);
  color: white;
  border-radius: 4px;
}

.resize-handle-r { cursor: e-resize; position: absolute; right: -3px; top: 0; width: 6px; height: 100%; }
.resize-handle-b { cursor: s-resize; position: absolute; bottom: -3px; left: 0; width: 100%; height: 6px; }
.resize-handle-rb { cursor: se-resize; position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; }