/* DewItDigital — Win98-style desktop on top of 98.css */

html {
  box-sizing: border-box;
}
*,
*::before,
*::after {
  box-sizing: inherit;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden; /* the desktop manages its own space */
  background: #008080; /* classic teal */
  font-size: 14px; /* a touch larger than 98.css default for readability */
  /* Scale the whole UI up for older users (windows, icons, chrome) */
  zoom: 1.2;
  -webkit-user-select: none;
  user-select: none;
}

/* Keep form controls and buttons in step with the larger base size */
button,
input,
textarea,
select,
.window,
.title-bar-text {
  font-size: 14px;
}

/* Desktop fills the viewport above the taskbar */
.desktop {
  position: fixed;
  inset: 0 0 32px 0;
  overflow: hidden;
}

/* ---------- Desktop icons ---------- */
.desktop-icons {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 1;
}

.desktop-icon {
  width: 104px;
  min-height: 0;
  padding: 8px 4px;
  background: transparent;
  border: 1px dotted transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: #fff;
}
.desktop-icon:active,
.desktop-icon:focus {
  outline: none;
}
.desktop-icon .icon-art {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
}
.desktop-icon .icon-art img,
.desktop-icon .icon-art svg {
  width: 50px;
  height: 50px;
  image-rendering: pixelated;
}
.desktop-icon .icon-label {
  font-size: 13px;
  line-height: 1.2;
  text-align: center;
  padding: 1px 3px;
  text-shadow: 1px 1px 0 #000;
}
.desktop-icon.selected {
  border: 1px dotted #fff;
}
.desktop-icon.selected .icon-label {
  background: #000080;
  text-shadow: none;
}

/* ---------- Windows ---------- */
.app-window {
  position: absolute;
  top: 40px;
  left: 40px;
  width: min(460px, calc(100vw - 24px));
  z-index: 10;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
}
.app-window .title-bar {
  cursor: grab;
}
.app-window.dragging .title-bar {
  cursor: grabbing;
}
/* Inactive windows get a greyed title bar */
.app-window:not(.active) .title-bar {
  background: linear-gradient(90deg, #808080, #b5b5b5);
}
.app-window.minimized {
  display: none;
}

.title-icon,
.start-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: 4px;
  image-rendering: pixelated;
}
svg.title-icon {
  filter: drop-shadow(0 0 0 #fff);
}

/* ---------- Hero / home ---------- */
.hero-body {
  text-align: center;
  padding: 20px 16px;
}
.hero-logo {
  width: 88px;
  height: 88px;
  image-rendering: pixelated;
  margin-bottom: 6px;
}
.hero-body h1 {
  margin: 4px 0;
  font-size: 26px;
}
.motto {
  font-size: 16px;
  line-height: 1.6;
  margin: 8px 0 16px;
}
.hint {
  font-size: 13px;
  color: #555;
  margin: 16px 0 0;
}
.hero-actions,
.contact-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.contact-actions {
  justify-content: flex-start;
  margin-top: 8px;
}

/* ---------- Services (Notepad) ---------- */
.notepad .window-body {
  padding: 0;
}
.np-menu {
  display: flex;
  gap: 2px;
  padding: 2px 4px;
  background: silver;
  border-bottom: 1px solid #808080;
  box-shadow: inset 0 -1px 0 #fff;
  font-size: 14px;
}
.np-menu span {
  padding: 2px 8px;
  cursor: default;
}
.np-menu span:hover {
  background: #000080;
  color: #fff;
}
.np-text {
  display: block;
  width: 100%;
  height: auto; /* let `rows` size it so all the text shows on load */
  border: none;
  resize: none;
  overflow: hidden;
  background: #fff;
  color: #000;
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: 15px;
  line-height: 1.55;
  padding: 8px 10px;
  box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.35);
  -webkit-user-select: text;
  user-select: text;
}
.np-text:focus {
  outline: none;
}

/* ---------- Contact (terminal readout) ---------- */
.terminal {
  background: #000;
  color: #2aff2a;
  font-family: "Lucida Console", "Courier New", monospace;
  font-size: 16px;
  line-height: 1.5;
  padding: 14px 16px;
  border: 2px solid #000;
  box-shadow: inset 1px 1px 0 #555, inset -1px -1px 0 #111;
  text-shadow: 0 0 4px rgba(42, 255, 42, 0.5);
  -webkit-user-select: text;
  user-select: text;
}
.terminal p {
  margin: 0;
  white-space: pre-wrap;
}
.terminal .t-prompt {
  color: #7dffff;
}
.terminal a {
  color: #2aff2a;
  text-decoration: underline;
}
.terminal a:hover {
  background: #2aff2a;
  color: #000;
  text-shadow: none;
}
.terminal .t-cursor {
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

/* ---------- Start menu ---------- */
.start-menu {
  position: fixed;
  bottom: 32px;
  left: 4px;
  width: 220px;
  z-index: 200;
  background: silver;
  border: 1px solid #000;
  border-top: 2px solid #dfdfdf;
  border-left: 2px solid #dfdfdf;
  box-shadow: 2px 2px 0 #000, inset 1px 1px 0 #fff;
  display: flex;
}
.start-menu[hidden] {
  display: none;
}
.start-menu-banner {
  width: 28px;
  background: linear-gradient(#000080, #1084d0);
  flex-shrink: 0;
}
.start-menu-banner span {
  display: block;
  transform: rotate(180deg);
  writing-mode: vertical-rl;
  color: #fff;
  font-weight: bold;
  font-size: 14px;
  padding: 8px 4px;
  white-space: nowrap;
  letter-spacing: 1px;
}
.start-menu-items {
  list-style: none;
  margin: 0;
  padding: 2px;
  flex: 1;
}
.start-menu-items > li {
  margin: 0;
}
.start-menu-items button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 7px 8px;
  font-size: 14px;
  min-height: 0;
}
.start-menu-items button:hover,
.start-menu-items button:focus {
  background: #000080;
  color: #fff;
  outline: none;
}
.start-menu-items button img,
.start-menu-items button .mi {
  width: 20px;
  height: 20px;
  image-rendering: pixelated;
}
.start-menu-sep {
  height: 0;
  border-top: 1px solid #808080;
  border-bottom: 1px solid #fff;
  margin: 3px 2px;
}

/* ---------- Taskbar ---------- */
.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: silver;
  border-top: 2px solid #fff;
  box-shadow: inset 0 1px 0 #dfdfdf;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  z-index: 100;
}
.start-button {
  font-weight: bold;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.start-button.active {
  box-shadow: inset -1px -1px 0 #fff, inset 1px 1px 0 #808080,
    inset -2px -2px 0 #dfdfdf, inset 2px 2px 0 #000;
}

.taskbar-windows {
  flex: 1;
  display: flex;
  gap: 3px;
  align-items: center;
  overflow: hidden;
  margin: 0 4px;
}
.task-button {
  flex: 0 1 160px;
  min-width: 0;
  max-width: 160px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  text-align: left;
  overflow: hidden;
  white-space: nowrap;
}
.task-button img,
.task-button svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  image-rendering: pixelated;
}
.task-button.active {
  font-weight: bold;
  box-shadow: inset -1px -1px 0 #fff, inset 1px 1px 0 #808080,
    inset -2px -2px 0 #dfdfdf, inset 2px 2px 0 #000;
  background: #c7c7c7;
}

.taskbar-clock {
  border: 1px inset #fff;
  box-shadow: inset 1px 1px 0 #808080;
  padding: 2px 10px;
  font-size: 13px;
  background: silver;
  flex-shrink: 0;
}

/* ---------- Small screens ---------- */
@media (max-width: 520px) {
  .app-window {
    left: 8px !important;
    top: 8px !important;
    width: calc(100vw - 16px);
  }
  .hero-body h1 {
    font-size: 22px;
  }
  .task-button {
    flex-basis: 44px;
    max-width: 120px;
  }
}
