/* ============================================================
   WOFTR — shared terminal styling
   index + project pages + games
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

:root {
  --cyan: #00BFFF;
  --cyan-hot: #00FFFF;
  --cyan-dim: rgba(0,191,255,0.42);
  --bg: #000;
  --amber: #ffcc33;
  --red: #ff3322;
}

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

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--cyan);
  font-family: 'VT323', 'Courier New', monospace;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.55;
  text-transform: uppercase;
  overflow-x: hidden;
}

body {
  text-shadow: 0 0 6px var(--cyan), 0 0 14px var(--cyan-dim);
  animation: phosphor-jitter 8s steps(2, end) infinite;
}

@keyframes phosphor-jitter {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(0.3px); }
}

/* scanlines */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 3px,
    rgba(0,191,255,0.035) 3px, rgba(0,191,255,0.035) 4px
  );
  pointer-events: none;
  z-index: 9997;
}

/* vignette */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 48%, rgba(0,0,0,0.78) 100%);
  pointer-events: none;
  z-index: 9998;
}

.console {
  width: min(820px, 92vw);
  margin: 0 auto;
  padding: clamp(24px, 6vh, 72px) 0 max(40px, env(safe-area-inset-bottom));
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.console.top {
  justify-content: flex-start;
  padding-top: clamp(36px, 8vh, 80px);
}

.line { margin-bottom: 2px; letter-spacing: 0.03em; word-break: break-word; }
.line.muted { color: var(--cyan-dim); text-shadow: none; }
.line.bold {
  letter-spacing: 0.08em;
  text-shadow: 0 0 8px var(--cyan), 0 0 22px var(--cyan-dim), 0 0 40px rgba(0,191,255,0.12);
}
.line.ok { color: var(--cyan-hot); }
.line.amber { color: var(--amber); text-shadow: 0 0 8px rgba(255,204,51,0.5); }
.line.red   { color: var(--red);   text-shadow: 0 0 8px rgba(255,51,34,0.6); }
.spacer { height: 1.2em; }

hr.divider {
  border: none;
  border-top: 1px solid rgba(0,191,255,0.25);
  margin: 1em 0;
}

.input-row { display: flex; align-items: center; gap: 8px; margin-top: 1.4em; }
.prompt { flex-shrink: 0; color: var(--cyan); }
.input-wrap { position: relative; display: flex; align-items: center; min-width: 0; flex: 1; }

input[type="text"] {
  background: transparent;
  border: none;
  color: var(--cyan);
  font-family: 'VT323', monospace;
  font-size: inherit;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  outline: none;
  width: 1ch;
  min-width: 1ch;
  max-width: 100%;
  caret-color: transparent;
  text-shadow: 0 0 6px var(--cyan), 0 0 14px var(--cyan-dim);
}

.cursor {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan), 0 0 16px var(--cyan-dim);
  vertical-align: middle;
  margin-left: 2px;
  flex-shrink: 0;
  animation: blink 1.1s step-end infinite;
}
@keyframes blink { 0%,49%{opacity:1} 50%,100%{opacity:0} }

.menu-item {
  opacity: 0;
  transition: opacity 0.28s ease;
  padding: 4px 0;
  letter-spacing: 0.05em;
  min-height: 1.4em;
}
.menu-item.visible { opacity: 1; }
.menu-item.clickable { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.menu-item.clickable:hover,
.menu-item.clickable:focus {
  color: #fff;
  text-shadow: 0 0 8px #fff, 0 0 20px var(--cyan);
  outline: none;
}
.menu-item.accent {
  text-shadow: 0 0 10px var(--cyan), 0 0 24px var(--cyan-dim);
  letter-spacing: 0.1em;
}

.response-line {
  min-height: 2.4em;
  margin-top: 0.8em;
  color: var(--cyan-dim);
  font-size: 0.92em;
  text-shadow: none;
  max-width: 100%;
}

.hint {
  font-size: 0.75em;
  color: rgba(0,191,255,0.32);
  margin-top: 1.6em;
  text-shadow: none;
  letter-spacing: 0.06em;
}

.hidden { display: none !important; }

@keyframes dotflash {
  0%,100%{ opacity:1; } 50%{ opacity:0.15; }
}
.dot { animation: dotflash 0.45s step-end infinite; }
.dot:nth-child(2){ animation-delay:0.15s; }
.dot:nth-child(3){ animation-delay:0.30s; }

.boot-log .line { color: var(--cyan-dim); text-shadow:none; font-size:0.9em; }
.boot-log .line.ok { color: var(--cyan); text-shadow: 0 0 6px var(--cyan-dim); }

/* project dossier */
.dossier-block {
  margin: 1em 0;
  padding: 0.8em 0;
  border-top: 1px solid rgba(0,191,255,0.15);
}
.dossier-block:first-of-type { border-top: none; }
.status-pill {
  display: inline-block;
  border: 1px solid rgba(0,191,255,0.35);
  padding: 0 0.45em;
  margin-left: 0.35em;
  font-size: 0.85em;
  color: var(--cyan-hot);
}

.nav {
  margin-top: 2em;
  font-size: 0.8em;
  color: var(--cyan-dim);
  text-shadow: none;
  letter-spacing: 0.05em;
}
.nav a { color: var(--cyan); text-decoration: none; text-shadow: 0 0 6px var(--cyan-dim); }
.nav a:hover { color: #fff; text-shadow: 0 0 8px #fff, 0 0 18px var(--cyan); }

.nav-fixed {
  position: fixed;
  bottom: max(14px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8em;
  color: var(--cyan-dim);
  z-index: 9999;
  text-shadow: none;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.nav-fixed a { color: var(--cyan); text-decoration: none; text-shadow: 0 0 6px var(--cyan-dim); }
.nav-fixed a:hover { color: #fff; }

.title {
  letter-spacing: 0.12em;
  text-shadow: 0 0 10px var(--cyan), 0 0 26px var(--cyan-dim), 0 0 48px rgba(0,191,255,0.12);
  margin-bottom: 0.2em;
}

.btn, .action-btn {
  display: inline-block;
  background: transparent;
  border: 1px solid var(--cyan-dim);
  color: var(--cyan);
  font-family: 'VT323', monospace;
  font-size: inherit;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 16px;
  margin: 8px 10px 4px 0;
  cursor: pointer;
  text-decoration: none;
  text-shadow: 0 0 6px var(--cyan-dim);
  transition: all 0.15s;
}
.btn:hover, .action-btn:hover {
  color: #000;
  background: var(--cyan);
  border-color: var(--cyan);
  text-shadow: none;
}
.btn:disabled { opacity: 0.3; cursor: not-allowed; }

#sound-note {
  position: fixed;
  bottom: max(12px, env(safe-area-inset-bottom));
  right: 14px;
  font-size: 0.65em;
  color: rgba(0,191,255,0.32);
  text-shadow: none;
  z-index: 9999;
  letter-spacing: 0.05em;
  pointer-events: none;
}

.agent {
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,191,255,0.18);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.agent:hover, .agent:focus {
  color: #fff;
  text-shadow: 0 0 8px #fff, 0 0 20px var(--cyan);
  outline: none;
}
.agent.selected {
  color: #fff;
  text-shadow: 0 0 10px var(--cyan), 0 0 24px var(--cyan-dim);
}
#detail {
  margin-top: 28px;
  padding: 18px;
  border: 1px solid rgba(0,191,255,0.3);
  min-height: 160px;
  display: none;
}

@media (max-width: 520px) {
  html, body { font-size: clamp(18px, 5.2vw, 22px); }
  .menu-item { padding: 6px 0; }
}
