/* =========================
   RESET
   ========================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Tahoma, Verdana, sans-serif;
}

/* =========================
   BODY / DESKTOP BACKGROUND
   ========================= */
body {
  height: 100vh;
  background: url("windows-98-background.jpg") center center / cover no-repeat fixed;
  overflow: hidden;
}

/* =========================
   FOCUS
   ========================= */
:focus {
  outline: 2px solid #000;
  outline-offset: 2px;
}

/* =========================
   OVERLAY + Z-INDEX
   ========================= */
.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#password-overlay { z-index: 100; }
#app { z-index: 50; }

.hidden {
  display: none !important;
}

/* =========================
   WINDOW
   ========================= */
.window {
  background: #c0c0c0;
  border: 2px solid #000;
  box-shadow:
    2px 2px 0 #fff inset,
   -2px -2px 0 #808080 inset,
    4px 4px 0 #000;
  width: min(95vw, 700px);
  display: flex;
  flex-direction: column;
}

/* =========================
   TITLE BAR
   ========================= */
.title-bar {
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff;
  padding: 4px 6px;
  font-size: 12px;
  display: flex;
  align-items: center;
}

/* TITLE TEXT */
.title-bar span {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* DESKTOP BUTTON */
.title-btn-link {
  color: #000 !important;
  background: #c0c0c0 !important;
  text-decoration: none;

  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;

  padding: 1px 6px;
  margin-left: 8px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  height: 16px;
}

.title-btn-link:active {
  border-top: 1px solid #000;
  border-left: 1px solid #000;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  padding: 2px 5px 0 7px;
}

/* =========================
   WINDOW BODY (CRITICAL FIX)
   ========================= */
.window-body {
  padding: 10px;
  font-size: 12px;
  flex: 1;

  display: flex;
  flex-direction: column;
}

/* =========================
   INPUTS
   ========================= */
input {
  width: 100%;
  margin: 6px 0;
  border: 2px inset #fff;
  padding: 2px;
  outline: none;
  background: #fff;
}

/* =========================
   BUTTONS
   ========================= */
button {
  margin-top: 6px;
  padding: 2px 10px;
  border: 2px outset #fff;
  background: #c0c0c0;
  cursor: pointer;
  font-size: 12px;
}

button:active {
  border-style: inset;
}

/* =========================
   ERROR TEXT
   ========================= */
.error {
  color: red;
  font-size: 11px;
}

/* =========================
   TABS
   ========================= */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: -1px;
}

.tab {
  padding: 4px 8px;
  background: #c0c0c0;
  border: 1px solid #000;
  cursor: pointer;
  font-size: 12px;
}

.tab.active {
  background: #fff;
  border-bottom: 1px solid #fff;
}

/* =========================
   CONTENT (SCROLLABLE)
   ========================= */
.content {
  background: #fff;
  border: 2px inset #fff;
  padding: 10px;

  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

/* =========================
   PROMPT BOX (SAFE WRAP)
   ========================= */
.prompt-box {
  background: #fff;
  padding: 10px;
  border: 2px inset #808080;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: monospace;
  font-size: 12px;
  margin-top: 10px;
}

/* =========================
   COPY BUTTON
   ========================= */
.copy-btn {
  margin-bottom: 6px;
  padding: 2px 10px;
  border: 2px outset #fff;
  background: #c0c0c0;
  cursor: pointer;
  font-size: 12px;
}

.copy-btn:active {
  border-style: inset;
}

/* =========================
   DESKTOP (OS-LEVEL)
   ========================= */
.desktop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 80px);
  gap: 24px;
  padding: 20px;
}

.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  text-align: center;
  text-shadow: 1px 1px 1px #000;
}

.desktop-icon img {
  width: 48px;
  height: 48px;
  margin-bottom: 6px;
}
