* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Tahoma", "MS Sans Serif", "Segoe UI", Verdana, sans-serif;
  font-size: 12px;
  background-color: var(--desktop-fallback);
  background-image: url('/assets/graphics/pink/backgrounds/default.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text-body);
  min-height: 100vh;
  overflow: hidden;
  cursor: var(--cursor-default-stack, url('/assets/graphics/pink/cursor/default.gif') 2 0, url('/assets/graphics/pink/cursor/default.cur') 2 0, default);
}

body.preboot #desktop {
  visibility: hidden;
}

#boot-screen {
  position: fixed;
  inset: 0;
  z-index: 200000;
  display: block;
  background: #02040a;
  color: #9bc2ff;
}

.bios-console {
  margin: 12px;
  white-space: pre;
  font-family: "Lucida Console", "Consolas", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.25;
  letter-spacing: 0.1px;
  text-shadow: 0 0 5px rgba(90, 150, 255, 0.35);
  user-select: none;
}

.bios-console::after {
  content: "_";
  animation: bios-caret-blink 1s steps(1, end) infinite;
}

@keyframes bios-caret-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

body.ve-invert-colors {
  filter: invert(1) hue-rotate(180deg);
}

body.ve-arg-glitch {
  animation: ve-arg-glitch 120ms steps(2, end) infinite;
}

@keyframes ve-arg-glitch {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-1px, 1px); }
  50% { transform: translate(1px, -1px); }
  75% { transform: translate(-1px, -1px); }
  100% { transform: translate(0, 0); }
}

button:hover,
a:hover,
[role="button"]:hover,
.desktop-icon:hover,
.xp-file-item:hover,
.xp-side-link:hover,
.xp-nav-btn:hover,
.start-item:hover,
.start-footer-btn:hover,
.taskbar-btn:hover,
#start-btn:hover,
#show-desktop-btn:hover,
#reset-layout-btn:hover,
#context-menu .context-menu-item:hover {
  cursor: var(--cursor-link-stack, url('/assets/graphics/pink/cursor/link.gif') 8 3, url('/assets/graphics/pink/cursor/link.cur') 8 3, pointer);
}

body.custom-cursor,
body.custom-cursor * {
  cursor: none !important;
}

#ve-animated-cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  pointer-events: none;
  z-index: 100001;
  display: none;
}

#ve-animated-cursor img {
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}

#ve-animated-cursor .cursor-link,
#ve-animated-cursor .cursor-move {
  display: none;
}

body.cursor-link #ve-animated-cursor .cursor-default,
body.cursor-move #ve-animated-cursor .cursor-default {
  display: none;
}

body.cursor-link #ve-animated-cursor .cursor-link {
  display: block;
}

body.cursor-move #ve-animated-cursor .cursor-link {
  display: none;
}

body.cursor-move #ve-animated-cursor .cursor-move {
  display: block;
}

#desktop {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}

#topbar {
  background: linear-gradient(var(--titlebar-1), var(--titlebar-2));
  color: var(--color-white);
  padding: 5px 8px;
  font-size: 13px;
  border-bottom: 1px solid var(--titlebar-border);
  display: flex;
  align-items: center;
  text-shadow: 0 1px 0 var(--overlay-strong);
}

#topbar-title {
  white-space: nowrap;
  letter-spacing: 0.2px;
}

#reset-layout-btn,
#show-desktop-btn {
  margin-left: 0;
  width: 22px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: linear-gradient(var(--ui-btn-top), var(--ui-btn-bottom));
  color: var(--ui-btn-text);
  border-top: 1px solid var(--surface-raised);
  border-left: 1px solid var(--surface-raised);
  border-right: 1px solid var(--text-secondary);
  border-bottom: 1px solid var(--text-secondary);
  border-radius: 0;
  box-shadow: inset 0 0 0 1px var(--overlay-soft);
  cursor: pointer;
}

#reset-layout-btn > span {
  font-size: 13px;
  line-height: 1;
  transform: translateY(-1px);
}

#reset-layout-btn:hover,
#show-desktop-btn:hover {
  background: linear-gradient(var(--ui-btn-hover-top), var(--ui-btn-hover-bottom));
}

#reset-layout-btn:active,
#show-desktop-btn:active,
#show-desktop-btn.active {
  border-top-color: var(--text-secondary);
  border-left-color: var(--text-secondary);
  border-right-color: var(--surface-raised);
  border-bottom-color: var(--surface-raised);
  background: linear-gradient(var(--ui-btn-active-top), var(--ui-btn-active-bottom));
}

#reset-layout-btn:focus-visible,
#show-desktop-btn:focus-visible {
  outline: 1px dotted var(--color-white);
  outline-offset: -4px;
}

#icons {
  position: relative;
  padding: 16px;
  flex: 1;
  overflow: hidden;
}

.desktop-icon {
  position: absolute;
  width: 112px;
  border: none;
  background: transparent;
  color: var(--color-white);
  text-shadow: 0 1px 2px var(--overlay-deep);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: default;
  padding: 8px 6px;
  border-radius: 4px;
  touch-action: none;
  user-select: none;
}

.desktop-icon:hover {
  background: var(--glass-line-subtle);
}

.desktop-icon.dragging {
  cursor: grabbing;
  background: var(--glass-line-strong);
}

.desktop-icon .emoji {
  font-size: 36px;
  width: 100%;
  text-align: center;
  display: block;
  line-height: 1;
}

.desktop-icon .emoji img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  image-rendering: pixelated;
  -webkit-user-drag: none;
  user-drag: none;
}

.desktop-icon span:last-child {
  font-size: 12px;
  text-align: center;
  width: 100%;
  line-height: 1.25;
}

.desktop-icon.selected {
  background: var(--selection-blue);
  outline: 1px dotted var(--overlay-glass);
}
