/* DEVLAB/TSA – Nachtschicht: Retro-Terminal-Look */

@font-face {
  font-family: "Acme";
  src: url("../fonts/Acme.ttf") format("truetype");
}

@font-face {
  font-family: "Fira Mono";
  src: url("../fonts/FiraMono-Regular.ttf") format("truetype");
  font-weight: 400;
}

@font-face {
  font-family: "Fira Mono";
  src: url("../fonts/FiraMono-Bold.ttf") format("truetype");
  font-weight: 700;
}

:root {
  --bg: #060a06;
  --fg: #3dff6a;
  --fg-dim: #1d7a3a;
  --fg-bright: #baffcc;
  --accent: #ffb347;
  --border: #123d1f;
  --glow: 0 0 8px rgba(61, 255, 106, 0.35);
  --txt: #ffffff;
  --chat: #6ee7ff;
  --npc: #ffd7a0;
  --item: #6ee7ff;
  --head: #ffffff;
  --say: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: "Acme", "Courier New", monospace;
  font-size: 17px;
  overflow: hidden;
}

#screen {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Scanlines */
#screen::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0px,
    rgba(0,0,0,0) 2px,
    rgba(0,0,0,0.22) 3px
  );
  z-index: 99;
}

#topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.6);
  text-shadow: var(--glow);
  letter-spacing: 1px;
}
#topbar .title { color: var(--fg-bright); }
#online { color: var(--fg-dim); font-size: 0.9em; }

#layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#mainrow {
  flex: 1;
  display: flex;
  min-width: 0;
  min-height: 0;
}

#statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.6);
  flex-shrink: 0;
}
#statusbar span { font-size: 0.95em; white-space: nowrap; }
#sbRoom { color: var(--fg-bright); text-shadow: var(--glow); letter-spacing: 1px; text-transform: uppercase; }
#sbPlayer { color: var(--fg); }
#sbPoints { color: var(--accent); }
#sbMoves { color: var(--accent); }

#termwrap {
  flex: 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

#term {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  line-height: 1.35;
  scroll-behavior: smooth;
  min-height: 0;
}

#log .line { white-space: pre-wrap; word-break: break-word; min-height: 1.35em; }
#log .report { margin-bottom: 4px; }
#log .line.sys { color: var(--fg-dim); }
#log .line.txt { color: var(--txt); }
#log .line.art { font-family: "VT323", "Courier New", monospace; }
#log .line.user { color: var(--fg-bright); }
#log .line.err { color: var(--accent); }
#log .line.chat { color: var(--chat); }
#log .line.npc { color: var(--npc); }
#log .line.sep { color: var(--fg-dim); }
#log .line.end { color: var(--fg-bright); text-shadow: var(--glow); }
#log .line.desc { color: var(--txt); }
#log .line.head { color: var(--head); }
#log .line.item { color: var(--item); }
#log .line.exit { color: var(--accent); }
#log .line.say { color: var(--say); }
#log .line.title { color: var(--fg-bright); text-shadow: var(--glow); }
#log .line.beta { color: var(--accent); }
#log .line.sep2 { color: var(--fg-dim); }
#log .line.help { font-family: "Fira Mono", "Courier New", monospace; font-weight: 700; tab-size: 34; }
#log .line.help .hp.cmd { color: var(--head); }
#log .line.help .hp.desc { color: #9d9d9d; }

#inputrow {
  display: flex;
  align-items: center;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.6);
  position: relative;
}
#prompt {
  padding: 10px 0 10px 16px;
  color: var(--accent);
  font-size: 1.45em;
  font-weight: bold;
  line-height: 1;
  text-shadow: var(--glow);
}
#cmd {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg-bright);
  font-family: inherit;
  font-size: inherit;
  padding: 10px 12px;
  caret-color: transparent;
}
#ccursor {
  position: absolute;
  left: 0;
  top: 0;
  height: 1.25em;
  width: auto;
  pointer-events: none;
  image-rendering: pixelated;
  z-index: 5;
  visibility: hidden;
}
#caretMirror {
  position: absolute;
  left: -9999px;
  top: 0;
  visibility: hidden;
  white-space: pre;
}

#playerbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 14px;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.6);
  font-size: 0.92em;
}

#music button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg);
  font-size: 14px;
  padding: 2px 8px;
  margin-right: 6px;
  cursor: pointer;
}
#music button:hover { color: var(--fg-bright); border-color: var(--fg-dim); }
#trackname { margin: 0 8px; color: var(--fg-dim); }
#nowplaying { color: var(--accent); }

#hint { color: var(--fg-dim); }
#hint .hintsep { margin: 0 10px; color: var(--border); }
#hint a { color: var(--fg-dim); text-decoration: none; }
#hint a:hover { color: var(--fg-bright); text-decoration: underline; }

/* Raum-Bild-Panel (rechte Spalte) */
#artwrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--border);
  background: rgba(0,0,0,0.4);
  padding: 10px;
  min-width: 0;
  min-height: 0;
}
#roomimg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 8px rgba(61, 255, 106, 0.25));
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; }

@media (max-width: 800px) {
  #statusbar { flex-wrap: wrap; row-gap: 4px; }
  #hint { display: none; }
  #artwrap { display: none; }
}
