/* 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;
  position: relative;
}

/* TITLE TEXT */
.title-bar span {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* DESKTOP BUTTON */
.title-btn-link {
  /* Force high-contrast visibility */
  color: #000 !important; 
  background: #c0c0c0 !important;
  text-decoration: none;
  
  /* Windows 98 Hard-Edge 3D Border */
  border-top: 1px solid #fff !important;
  border-left: 1px solid #fff !important;
  border-right: 1px solid #000 !important;
  border-bottom: 1px solid #000 !important;
  
  /* Layout and Spacing */
  padding: 1px 6px;
  margin-left: 8px;
  font-size: 11px;
  font-weight: normal;
  display: inline-flex;
  align-items: center;
  height: 16px; /* Keeps it consistent in the bar */
}

/* THE "PRESSED" STATE */
.title-btn-link:active {
  border-top: 1px solid #000 !important;
  border-left: 1px solid #000 !important;
  border-right: 1px solid #fff !important;
  border-bottom: 1px solid #fff !important;
  padding: 2px 5px 0 7px; /* Slight text shift for "press" feel */
}

/* WINDOW BODY */
.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;
}

/* SCROLLABLE TAB CONTENT (WIN98 BEHAVIOR) */
.content {
  background: #fff;
  border: 2px inset #fff;
  padding: 10px;

  flex: 1;
  overflow-y: auto;
}

/* PROMPT BOX */
.prompt-box {
  background: #fff;
  padding: 10px;
  border: 2px inset #808080;
  white-space: pre;
  font-family: monospace;
  font-size: 12px;
  margin-top: 10px;
  overflow-x: auto;
}

/* 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;
}
