:root {
  --ink: #3b2b2e;
  --paper: #f1ede6;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: var(--mono);
  color: var(--ink);
  /* siva "studijska" pozadina iza 3D stola */
  background: radial-gradient(ellipse 70% 65% at 50% 46%, #e9e9e9 0%, #d2d2d2 55%, #b3b3b3 100%);
}

#css3d, #webgl { position: fixed; inset: 0; }
#css3d { z-index: 0; }
#webgl { z-index: 1; }
#webgl canvas { display: block; }
body.at-monitor #webgl { pointer-events: none; }
body.pointer #webgl { cursor: pointer; }

/* ---------- boot ekran ---------- */
#boot {
  position: fixed; inset: 0; z-index: 10;
  background: #000; color: #e8e8e8;
  font-size: 14px; line-height: 1.55;
  transition: opacity .8s ease;
}
#boot.gone { opacity: 0; pointer-events: none; }
#bios { margin: 0; padding: 28px 32px; white-space: pre-wrap; font: inherit; }
#biosdate { position: absolute; left: 32px; bottom: 24px; }
/* znak u kutu, kao logo proizvođača na starim BIOS ekranima */
#biosmark { position: absolute; right: 32px; top: 28px; width: 96px; filter: brightness(0) invert(.91); }

#startbox {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  border: 4px solid #e8e8e8;
  padding: 18px 26px 20px;
  background: #000;
  text-align: left;
  min-width: 360px;
}
#startbox p { margin: 0 0 14px; }
#start {
  display: block; margin: 0 auto;
  font: inherit; color: #e8e8e8; background: #000;
  border: 2px solid #e8e8e8; padding: 6px 14px; cursor: pointer;
}
#start:hover, #start:focus-visible { background: #e8e8e8; color: #000; outline: none; }

.cursor { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- HUD ---------- */
#hud {
  position: fixed; left: 40px; top: 40px; z-index: 5;
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
}
#hud .row { display: flex; gap: 6px; }
.tag {
  background: var(--ink); color: #f4f4f4;
  font: 500 13px/1 var(--mono);
  padding: 7px 10px;
  border: 0; text-decoration: none;
}
.btn { cursor: pointer; }
.btn:hover, .btn:focus-visible { background: #f4f4f4; color: var(--ink); outline: 2px solid var(--ink); outline-offset: -2px; }
#mute.off { text-decoration: line-through; }

#hint {
  position: fixed; left: 50%; bottom: 44px; z-index: 5;
  transform: translateX(-50%);
  background: var(--ink); color: #f4f4f4;
  font: 500 14px/1 var(--mono); padding: 8px 12px;
  pointer-events: none;
}

body.at-monitor #hud { display: none; }

#back {
  position: fixed; left: 50%; bottom: 14px; z-index: 6;
  transform: translateX(-50%);
  font: 500 13px/1 var(--mono);
  background: var(--ink); color: #f4f4f4; border: 0;
  padding: 9px 12px; cursor: pointer;
}
#back:hover, #back:focus-visible { background: #f4f4f4; color: var(--ink); outline: 2px solid var(--ink); }

[hidden] { display: none !important; }

.noscript { position: fixed; inset: auto 0 0 0; z-index: 20; background: #000; color: #fff; padding: 16px; margin: 0; }
.noscript a { color: #fff; }

/* okvir za stranicu unutar monitora (CSS3D) */
.screen-frame { width: 1280px; height: 960px; background: #000; }
.screen-frame iframe { width: 100%; height: 100%; border: 0; display: block; background: var(--paper); }
