/* Windows 98 Design System */
:root {
  --win-teal: #008080;
  --win-silver: #c0c0c0;
  --win-gray: #808080;
  --win-black: #000000;
  --win-white: #ffffff;
  --win-navy: #000080;
  --win-blue-light: #1084d0;
  --win-border-light: #dfdfdf;
  --win-border-dark: #404040;
}

@font-face {
  font-family: 'Pixelated';
  src: url('https://fonts.cdnfonts.com/s/14841/W95FA.woff') format('woff');
  /* Fallback if external font fails */
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--win-teal);
  font-family: 'Pixelated', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  overflow: hidden;
  overflow: hidden;
  /* Desktop feel */
  user-select: none;
  -webkit-font-smoothing: none;
  cursor: url('../cursors/default.cur'), auto;
}

a,
button,
.start-button,
.taskbar-item,
.window-button {
  cursor: url('../cursors/pointer.cur'), pointer;
}

input,
textarea,
.selectable-text {
  cursor: url('../cursors/text.cur'), text;
}

.help-cursor {
  cursor: url('../cursors/help.cur'), help;
}

.wait-cursor {
  cursor: url('../cursors/wait.cur'), wait;
}

.draggable,
.draggable-header,
.window-header {
  cursor: default;
  /* Fallback */
  cursor: url('../cursors/default.cur'), default;
}

/* Utilities for 3D Borders */
.win-border-outset {
  border-top: 2px solid var(--win-white);
  border-left: 2px solid var(--win-white);
  border-right: 2px solid var(--win-black);
  border-bottom: 2px solid var(--win-black);
  box-shadow: 1px 1px 0px var(--win-gray) inset, -1px -1px 0px var(--win-border-light) inset;
  background: var(--win-silver);
}



.win-border-inset {
  border-top: 2px solid var(--win-gray);
  border-left: 2px solid var(--win-gray);
  border-right: 2px solid var(--win-white);
  border-bottom: 2px solid var(--win-white);
  background: var(--win-white);
  box-shadow: inset 1px 1px 0px var(--win-black), inset -1px -1px 0px var(--win-border-light);
}

/* Desktop Icons */
.desktop-icons {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  height: calc(100vh - 40px);
  padding: 10px;
  gap: 20px;
  align-content: flex-start;
}

.desktop-icon {
  width: 75px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  text-decoration: none;
  color: white;
  text-shadow: 1px 1px 0px black;
  margin-bottom: 10px;
}

.desktop-icon:active .icon-img {
  filter: brightness(0.5);
}

.desktop-icon:focus .icon-label,
.desktop-icon:hover .icon-label {
  background-color: var(--win-navy);
  border: 1px dotted var(--win-white);
}

.icon-img {
  width: 32px;
  height: 32px;
  margin-bottom: 5px;
  image-rendering: pixelated;
}

.icon-label {
  font-size: 11px;
  text-align: center;
  padding: 2px;
  border: 1px solid transparent;
}

/* Taskbar */
.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: var(--win-silver);
  border-top: 2px solid var(--win-white);
  display: flex;
  align-items: center;
  padding: 2px;
  z-index: 9999;
}

.start-button {
  display: flex;
  align-items: center;
  padding: 2px 6px;
  height: 22px;
  margin-right: 4px;
  font-weight: bold;
  font-size: 13px;
  cursor: pointer;
}

.start-button:active,
.start-button.active {
  border-top: 2px solid var(--win-black);
  border-left: 2px solid var(--win-black);
  border-right: 2px solid var(--win-white);
  border-bottom: 2px solid var(--win-white);
  background: repeating-conic-gradient(#c0c0c0 0% 25%, #dcdcdc 0% 50%);
  /* Dotted effect simulation */
  box-shadow: none;
  padding-top: 4px;
  /* Simulating press */
  padding-left: 8px;
}

.start-icon {
  width: 16px;
  height: 16px;
  margin-right: 4px;
}

.taskbar-divider {
  width: 2px;
  height: 20px;
  border-left: 1px solid var(--win-gray);
  border-right: 1px solid var(--win-white);
  margin: 0 4px;
}

.taskbar-items {
  flex-grow: 1;
  display: flex;
  gap: 2px;
}

.taskbar-item {
  width: 160px;
  height: 22px;
  display: flex;
  align-items: center;
  padding-left: 5px;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.taskbar-item.active {
  background: #e0e0e0;
  border-top: 2px solid var(--win-black);
  border-left: 2px solid var(--win-black);
  border-right: 2px solid var(--win-white);
  border-bottom: 2px solid var(--win-white);
  box-shadow: none;
  font-weight: bold;
}

.tray {
  padding: 2px 8px;
  height: 22px;
  border-top: 2px solid var(--win-gray);
  border-left: 2px solid var(--win-gray);
  border-right: 2px solid var(--win-white);
  border-bottom: 2px solid var(--win-white);
  background: var(--win-silver);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  margin-left: 4px;
  min-width: 60px;
  box-shadow: inset 1px 1px 0px black;
}

/* Window */
.window {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* Start centered */
  width: 400px;
  display: flex;
  flex-direction: column;
  padding: 3px;
  font-size: 13px;
}

.window-header {
  background: linear-gradient(90deg, var(--win-navy), var(--win-blue-light));
  color: white;
  padding: 2px 3px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  height: 22px;
}

.window-controls {
  display: flex;
  gap: 2px;
}

.window-button {
  width: 16px;
  height: 14px;
  background: var(--win-silver);
  border-top: 1px solid var(--win-white);
  border-left: 1px solid var(--win-white);
  border-right: 1px solid var(--win-black);
  border-bottom: 1px solid var(--win-black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: black;
  cursor: pointer;
  line-height: 1;
  padding-bottom: 2px;
}

.window-button:active {
  border: 1px solid var(--win-black);
  box-shadow: none;
  padding-top: 1px;
  padding-left: 1px;
}

.window-body {
  padding: 10px;
  color: black;
}

.window-body p {
  margin-top: 0;
}

.window-body a {
  color: blue;
}

/* Start Menu */
.start-menu {
  position: fixed;
  bottom: 28px;
  left: 2px;
  width: 200px;
  background: var(--win-silver);
  display: none;
  /* JS toggles this */
  flex-direction: row;
  z-index: 10000;
}

.start-menu.open {
  display: flex;
}

.start-side-strip {
  width: 25px;
  background: linear-gradient(180deg, var(--win-navy) 0%, #000080 100%);
  color: white;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 10px;
  font-weight: bold;
  font-size: 16px;
}

.start-items {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  padding: 2px;
}

.start-item {
  padding: 8px 10px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 13px;
  color: black;
  text-decoration: none;
}

.start-item:hover {
  background: var(--win-navy);
  color: white;
}

.start-item-icon {
  width: 24px;
  height: 24px;
  margin-right: 10px;
  display: inline-block;
  background: gray;
  /* Placeholder */
}

/* Helper for dragging wrapper (simplistic) */
.draggable {
  cursor: grab;
}

.draggable-header {
  cursor: grab;
}