/* ==========================================================
   NecroQuery — Win95/CRT Aesthetic Stylesheet
   All assets served from Django staticfiles — no external CDN.
   ========================================================== */

/* Global reset & desktop */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: #008080; /* Win95 teal desktop */
  font-family: "Courier New", monospace;
  height: 100vh;
  overflow: hidden;
  color: #000000;
}

/* Desktop area */
#desktop {
  position: absolute;
  inset: 0 0 36px 0; /* leaves room for taskbar */
  overflow: hidden;
}

/* Win95 window chrome */
.win95-window {
  position: absolute;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  box-shadow: 1px 1px 0 #dfdfdf inset, -1px -1px 0 #404040 inset;
  min-width: 200px;
  min-height: 100px;
}

.win95-title-bar {
  background: linear-gradient(to right, #000080, #1084d0);
  color: #ffffff;
  font-family: "Courier New", monospace;
  font-size: 12px;
  font-weight: bold;
  padding: 3px 4px;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: default;
}

.win95-title-bar .title-text { flex: 1; }

.win95-title-bar .win-btn {
  width: 16px; height: 14px;
  background: #c0c0c0;
  border: 1px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  box-shadow: 0.5px 0.5px 0 #dfdfdf inset;
  font-size: 9px;
  line-height: 12px;
  text-align: center;
  cursor: pointer;
  margin-left: 2px;
  color: #000;
  font-family: "Courier New", monospace;
}
.win95-title-bar .win-btn:active {
  border-color: #808080 #ffffff #ffffff #808080;
  box-shadow: none;
}

.win95-body { padding: 4px; overflow: auto; height: calc(100% - 22px); }

/* Bevelled panel */
.win95-panel {
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  background: #c0c0c0;
  padding: 4px;
}

/* Inset (sunken) panel */
.win95-inset {
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  background: #ffffff;
  padding: 4px;
}

/* Buttons */
.win95-btn {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  box-shadow: 1px 1px 0 #dfdfdf inset;
  font-family: "Courier New", monospace;
  font-size: 11px;
  padding: 3px 10px;
  cursor: pointer;
  min-width: 75px;
}
.win95-btn:active, .win95-btn.pressed {
  border-color: #808080 #ffffff #ffffff #808080;
  box-shadow: -1px -1px 0 #404040 inset;
  padding: 4px 9px 2px 11px;
}
.win95-btn:focus { outline: 1px dotted #000; outline-offset: -4px; }

/* Taskbar */
#taskbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 36px;
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  box-shadow: 0 -1px 0 #808080;
  display: flex;
  align-items: center;
  padding: 2px 4px;
  gap: 4px;
  z-index: 10000;
}

#taskbar-brand {
  font-family: "Courier New", monospace;
  font-size: 12px;
  font-weight: bold;
  padding: 3px 8px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  box-shadow: 1px 1px 0 #dfdfdf inset;
  white-space: nowrap;
  user-select: none;
}

.taskbar-btn {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  box-shadow: 1px 1px 0 #dfdfdf inset;
  font-family: "Courier New", monospace;
  font-size: 11px;
  padding: 2px 8px;
  cursor: pointer;
  height: 28px;
  white-space: nowrap;
}
.taskbar-btn:active, .taskbar-btn.active {
  border-color: #808080 #ffffff #ffffff #808080;
  box-shadow: -1px -1px 0 #404040 inset;
}

#taskbar-buttons { display: flex; gap: 2px; flex: 1; overflow: hidden; }
#taskbar-clock {
  font-family: "Courier New", monospace;
  font-size: 11px;
  padding: 2px 6px;
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  white-space: nowrap;
}

/* Error banner */
.win95-error-banner {
  background: #ffff99;
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  padding: 4px 8px;
  font-size: 11px;
  color: #cc0000;
  margin: 4px 0;
  font-family: "Courier New", monospace;
}

/* Boot screen */
#boot-screen {
  position: fixed;
  inset: 0;
  background: #000000;
  color: #00ff00;
  font-family: "Courier New", monospace;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
}
#boot-screen pre { font-size: clamp(4px, 1vw, 11px); line-height: 1.2; color: #00cc00; }
#boot-screen #boot-status,
#boot-screen .boot-status { margin-top: 20px; font-size: 14px; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Spreadsheet / results table */
.results-table { border-collapse: collapse; width: 100%; font-size: 11px; font-family: "Courier New", monospace; }
.results-table th {
  background: #000080; color: #ffffff;
  border: 1px solid #808080;
  padding: 2px 6px; text-align: left;
  position: sticky; top: 0;
}
.results-table td {
  border: 1px solid #c0c0c0;
  padding: 2px 6px;
  background: #ffffff;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.results-table tr:nth-child(even) td { background: #f0f0f0; }

/* Textarea / input */
.win95-textarea {
  width: 100%;
  background: #ffffff;
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  font-family: "Courier New", monospace;
  font-size: 12px;
  padding: 4px;
  resize: vertical;
  outline: none;
}

/* Status badges */
.badge-green { background: #00aa00; color: #fff; padding: 1px 6px; font-size: 10px; }
.badge-amber { background: #ff9900; color: #000; padding: 1px 6px; font-size: 10px; }
.badge-red   { background: #cc0000; color: #fff; padding: 1px 6px; font-size: 10px; }
