* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  font-family: Tahoma, "MS Sans Serif", Geneva, sans-serif;
  font-size: 13px;
  color: #000;
  background: #008080; /* the teal */
}

body {
  overflow: hidden;
}

button, input, select {
  font-family: inherit;
  font-size: inherit;
}

.hidden { display: none !important; }

/* --- bevels, the load-bearing texture of 1998 --- */
.bevel-out {
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  box-shadow: inset -1px -1px 0 #000, inset 1px 1px 0 #dfdfdf;
}
.bevel-in {
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  box-shadow: inset -1px -1px 0 #dfdfdf, inset 1px 1px 0 #000;
}

/* --- boot / dial-up screen --- */
#boot {
  position: fixed;
  inset: 0;
  background: #000;
  color: #00ff66;
  font-family: "Courier New", monospace;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  z-index: 50;
  text-align: center;
  padding: 20px;
}
#boot h1 {
  font-size: 22px;
  letter-spacing: 2px;
  margin: 0;
  text-shadow: 0 0 6px #00ff66;
}
#boot .sub { opacity: 0.8; }
#boot-log {
  width: min(520px, 90vw);
  min-height: 110px;
  white-space: pre-wrap;
  text-align: left;
  font-size: 12px;
  line-height: 1.5;
}
#boot .bar-outer {
  width: min(420px, 80vw);
  height: 18px;
  border: 1px solid #00ff66;
  padding: 2px;
}
#boot .bar-inner {
  height: 100%;
  width: 0%;
  background: repeating-linear-gradient(45deg, #00ff66, #00ff66 6px, #003d1a 6px, #003d1a 12px);
  transition: width 0.25s linear;
}
#connect-btn {
  background: #00ff66;
  color: #000;
  border: none;
  padding: 10px 24px;
  font-weight: bold;
  cursor: pointer;
  font-size: 14px;
  letter-spacing: 1px;
}
#connect-btn:active { transform: translateY(1px); }
#boot .blink { animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* --- desktop --- */
#desktop {
  height: 100%;
  width: 100%;
  position: relative;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.06), transparent 40%),
    #008080;
}

/* the marquee-ish top banner */
#banner {
  background: #000;
  color: #ffcc00;
  font-family: "Courier New", monospace;
  font-weight: bold;
  font-size: 13px;
  padding: 3px 0;
  white-space: nowrap;
  overflow: hidden;
  border-bottom: 2px solid #808080;
}
#banner span {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 22s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* the app window */
#win {
  position: absolute;
  top: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: min(920px, 96vw);
  height: min(600px, 82vh);
  background: #c0c0c0;
  display: flex;
  flex-direction: column;
}

#titlebar {
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff;
  font-weight: bold;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
#titlebar .title { display: flex; align-items: center; gap: 6px; }
#titlebar .buttons { display: flex; gap: 3px; }
#titlebar .buttons button {
  width: 18px;
  height: 16px;
  background: #c0c0c0;
  color: #000;
  border: 1px solid #000;
  box-shadow: inset -1px -1px 0 #808080, inset 1px 1px 0 #fff;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

#menubar {
  background: #c0c0c0;
  border-bottom: 1px solid #808080;
  padding: 2px 6px;
  display: flex;
  gap: 14px;
  font-size: 12px;
}
#menubar span { cursor: default; }
#menubar span:hover { background: #000080; color: #fff; padding: 0 2px; }

#body {
  flex: 1;
  display: flex;
  min-height: 0;
  padding: 8px;
  gap: 8px;
}

#tools {
  width: 190px;
  background: #fff;
  padding: 4px;
  overflow-y: auto;
}
#tools .tool-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: #c0c0c0;
  margin-bottom: 4px;
  padding: 6px 8px;
  cursor: pointer;
}
#tools .tool-btn.active {
  background: #000080;
  color: #fff;
}
#tools .tool-btn .ico { margin-right: 6px; }

#panel {
  flex: 1;
  background: #fff;
  padding: 12px;
  overflow-y: auto;
  min-width: 0;
}
#panel h2 {
  margin-top: 0;
  font-size: 15px;
  border-bottom: 2px solid #000080;
  padding-bottom: 4px;
}
#panel .field {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 8px 0;
  flex-wrap: wrap;
}
#panel input[type=text], #panel input[type=range] {
  padding: 4px;
}
#panel input[type=text] {
  flex: 1;
  min-width: 160px;
}
#panel button.action {
  background: #c0c0c0;
  padding: 6px 14px;
  cursor: pointer;
  font-weight: bold;
}
#panel button.action:active { box-shadow: inset 1px 1px 0 #808080; }

.console {
  background: #000;
  color: #00ff66;
  font-family: "Courier New", monospace;
  font-size: 12px;
  padding: 8px;
  height: 190px;
  overflow-y: auto;
  white-space: pre-wrap;
  margin-top: 10px;
}

.disclaimer {
  font-style: italic;
  color: #444;
  font-size: 11px;
  margin-top: 6px;
}

/* chat room */
#chat-log {
  height: 220px;
  overflow-y: auto;
  background: #fff;
  border: none;
  padding: 4px;
  font-size: 12px;
  margin-bottom: 6px;
}
#chat-log p { margin: 2px 0; }
#chat-log .sys { color: #808080; font-style: italic; }
#chat-log .me { color: #000080; font-weight: bold; }

/* profile card */
#profile-card {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
#profile-card img {
  width: 64px;
  height: 64px;
  background: #ddd;
}
#profile-card .stats { font-size: 12px; color: #444; }

/* keygen */
#keygen-out {
  font-family: "Courier New", monospace;
  font-size: 16px;
  background: #000;
  color: #ffcc00;
  padding: 10px;
  margin-top: 10px;
  letter-spacing: 2px;
  text-align: center;
}

#statusbar {
  background: #c0c0c0;
  border-top: 1px solid #808080;
  font-size: 11px;
  padding: 3px 8px;
  display: flex;
  justify-content: space-between;
}
