:root {
  --blood: #8b0000;
  --amber: #e6a817;
  --dark: #060608;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; background: #000; overflow: hidden; }
body { font-family: 'VT323', monospace; }
.creepy { font-family: 'Special Elite', serif; }

.screen {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  color: #e8d9b5;
}

/* ---------- TITLES ---------- */
.flicker-title {
  font-family: 'Special Elite', serif;
  color: #d92626;
  text-shadow: 0 0 8px rgba(217,38,38,0.7), 0 0 20px rgba(217,38,38,0.4);
  animation: flick 4s infinite;
  letter-spacing: 2px;
}
.title-sub {
  font-family: 'Special Elite', serif;
  color: var(--amber);
  text-shadow: 0 0 10px rgba(230,168,23,0.5);
}
@keyframes flick {
  0%,19%,21%,23%,25%,54%,56%,100% { opacity: 1; }
  20%,24%,55% { opacity: 0.4; }
}
.flicker { animation: flick 1.5s infinite; }

/* ---------- BACKGROUNDS ---------- */
.menu-bg {
  background:
    radial-gradient(circle at 50% 30%, rgba(60,10,10,0.5), transparent 60%),
    repeating-linear-gradient(0deg, #0a0a0c 0px, #0a0a0c 2px, #08080a 4px),
    #060608;
}
.workshop-bg {
  background:
    radial-gradient(circle at 20% 0%, rgba(40,30,10,0.4), transparent 50%),
    #0a0908;
}
.game-bg {
  background:
    radial-gradient(circle at 50% 60%, rgba(30,20,20,0.6), #000 80%),
    #030304;
}
.win-bg { background: radial-gradient(circle at 50% 40%, rgba(10,40,20,0.5), #030604 70%); }
.lose-bg {
  background: radial-gradient(circle at 50% 40%, rgba(60,0,0,0.6), #060000 70%);
  animation: redpulse 2s infinite;
}
@keyframes redpulse { 0%,100%{filter:brightness(1);} 50%{filter:brightness(1.3);} }

/* ---------- BUTTONS ---------- */
.btn-main {
  font-family: 'Special Elite', serif;
  background: linear-gradient(180deg, #3a0d0d, #1a0505);
  color: #f0d9a0; border: 2px solid #7a1a1a;
  padding: 14px 20px; font-size: 1.1rem; letter-spacing: 2px;
  cursor: pointer; border-radius: 4px;
  box-shadow: 0 0 12px rgba(122,26,26,0.4), inset 0 0 12px rgba(0,0,0,0.6);
  transition: all 0.15s;
}
.btn-main:hover:not(:disabled) { background: linear-gradient(180deg,#5a1414,#2a0808); box-shadow: 0 0 20px rgba(180,40,40,0.6); }
.btn-main:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-ghost {
  font-family: 'Special Elite', serif;
  background: transparent; color: var(--amber);
  border: 1px solid #4a3a10; padding: 12px 18px; letter-spacing: 2px;
  cursor: pointer; border-radius: 4px; transition: all 0.15s;
}
.btn-ghost:hover { background: rgba(74,58,16,0.2); }
.btn-tiny {
  font-family: 'VT323', monospace; font-size: 1rem;
  background: #1a1512; color: #e6a817; border: 1px solid #4a3a10;
  padding: 5px 10px; cursor: pointer; border-radius: 3px; transition: all 0.1s;
}
.btn-tiny:hover { background: #2a2015; }
.btn-ai {
  font-family: 'Special Elite', serif;
  background: linear-gradient(180deg, #1a2a3a, #0a1520);
  color: #7ec8ff; border: 1px solid #2a5a8a; padding: 10px 16px;
  cursor: pointer; border-radius: 4px; white-space: nowrap; transition: all 0.15s;
}
.btn-ai:hover:not(:disabled) { box-shadow: 0 0 16px rgba(60,140,220,0.5); }
.btn-ai:disabled { opacity: 0.5; }

/* ---------- WORKSHOP ---------- */
.panel {
  background: rgba(15,12,10,0.85); border: 1px solid #3a2f1a;
  border-radius: 6px; padding: 18px;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}
.lbl { display: block; font-family:'VT323',monospace; color:#b89a5a; font-size: 1rem; margin-bottom: 3px; letter-spacing:1px; }
.inp {
  font-family: 'VT323', monospace; font-size: 1.1rem;
  background: #08080a; color: #e6d9b5; border: 1px solid #3a2f1a;
  padding: 8px 10px; border-radius: 4px; outline: none;
}
.inp:focus { border-color: #7a5a1a; box-shadow: 0 0 8px rgba(122,90,26,0.4); }
.chk { display:flex; align-items:center; gap:6px; font-family:'VT323',monospace; color:#c9b57a; cursor:pointer; font-size:1.05rem; }

.enemy-card {
  display: flex; gap: 10px; align-items: center;
  background: rgba(18,14,10,0.8); border: 1px solid #2a2216;
  border-radius: 6px; padding: 8px;
}
.active-card { border-color: #3a7a3a; box-shadow: 0 0 10px rgba(58,122,58,0.4); }
.enemy-sprite { width: 52px; height: 52px; image-rendering: pixelated; border: 1px solid #2a2216; background:#000; border-radius:3px; }

/* ---------- HUD ---------- */
.hud {
  position: absolute; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 8px 12px; gap: 8px;
  background: linear-gradient(180deg, rgba(0,0,0,0.85), transparent);
}
.hud-item { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 90px; }
.hud-clock {
  font-family:'Special Elite',serif; font-size: 1.4rem; text-align:center;
}
.meter { width: 90px; height: 8px; background: #1a1a1a; border: 1px solid #333; border-radius: 4px; overflow: hidden; }
.meter-fill { height: 100%; transition: width 0.4s; }

.game-msg {
  position: absolute; top: 70px; left: 50%; transform: translateX(-50%);
  z-index: 25; font-family:'Special Elite',serif; color: #ffcf70;
  background: rgba(0,0,0,0.7); padding: 6px 14px; border: 1px solid #5a4a1a;
  border-radius: 4px; font-size: 0.95rem; animation: flick 3s;
}

/* ---------- OFFICE ---------- */
.office-view { position: absolute; inset: 60px 0 90px 0; display: flex; flex-direction: column; }
.view-label {
  text-align: center; color: var(--amber); font-size: 1.2rem;
  padding: 6px; letter-spacing: 3px; text-shadow: 0 0 8px rgba(230,168,23,0.4);
}
.office-scene {
  flex: 1; display: flex; align-items: center; justify-content: center;
  margin: 8px 16px; border: 1px solid #1a1512; border-radius: 6px;
  background: radial-gradient(circle at 50% 60%, rgba(20,18,15,0.6), #000 90%);
  position: relative; overflow: hidden;
}
.door-scene { background: radial-gradient(circle at 50% 50%, rgba(10,8,8,0.9), #000 90%); }
.door-view-inner { display:flex; gap:12px; align-items:center; justify-content:center; }
.door-enemy {
  width: 140px; max-width: 45vw; image-rendering: pixelated;
  filter: brightness(0.85) contrast(1.2);
  animation: lurk 0.6s infinite alternate;
}
@keyframes lurk { from { transform: translateY(0) scale(1); } to { transform: translateY(-4px) scale(1.02); } }

.door-controls { display: flex; gap: 10px; padding: 8px 16px; justify-content: center; }
.ctrl-btn {
  font-family:'Special Elite',serif; flex: 1; max-width: 200px;
  background: #14100c; color: #d9c58a; border: 1px solid #4a3a1a;
  padding: 12px; font-size: 0.95rem; cursor: pointer; border-radius: 5px;
  transition: all 0.1s;
}
.ctrl-btn:hover { background: #221a10; }
.ctrl-on { background: linear-gradient(180deg,#5a1414,#2a0808) !important; color:#ffcf90 !important; border-color:#9a2a2a !important; box-shadow:0 0 12px rgba(180,40,40,0.5); }

/* ---------- CAMERAS ---------- */
.cam-overlay { position: absolute; inset: 60px 0 90px 0; display:flex; flex-direction:column; padding: 8px; z-index: 15; }
.cam-static {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.06; z-index: 2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: staticmove 0.15s steps(2) infinite;
}
@keyframes staticmove { 0%{transform:translate(0,0);} 100%{transform:translate(-3px,2px);} }
.cam-feed {
  flex: 1; position: relative; border: 2px solid #1a3a1a; border-radius: 6px;
  background: radial-gradient(circle at 50% 50%, rgba(10,20,10,0.5), #000 90%);
  overflow: hidden; display:flex; align-items:center; justify-content:center;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.8);
}
.cam-title { position: absolute; top: 6px; left: 10px; color: #6bff6b; font-size: 1rem; z-index: 3; text-shadow: 0 0 6px rgba(60,255,60,0.5); }
.cam-rec { position: absolute; top: 6px; right: 10px; color: #ff4040; font-size: 0.9rem; z-index:3; animation: flick 1.5s infinite; }
.cam-scanlines {
  position: absolute; inset: 0; z-index: 2; pointer-events:none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.3) 0px, rgba(0,0,0,0.3) 1px, transparent 2px, transparent 4px);
}
.cam-content { z-index: 1; display:flex; gap:10px; }
.cam-enemy { width: 130px; max-width: 40vw; image-rendering: pixelated; filter: brightness(0.7) contrast(1.3) hue-rotate(80deg); }
.cam-map { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-top: 8px; }
.cam-map-btn {
  font-family:'VT323',monospace; font-size: 0.85rem;
  background: #0a140a; color: #6bbf6b; border: 1px solid #1a3a1a;
  padding: 6px 2px; cursor: pointer; border-radius: 3px; transition: all 0.1s;
}
.cam-map-active { background: #1a3a1a; color: #aaffaa; box-shadow: 0 0 8px rgba(60,255,60,0.4); }
.cam-danger { border-color: #aa2020 !important; color: #ff6060 !important; animation: flick 1s infinite; }

/* ---------- BOTTOM NAV ---------- */
.bottom-nav {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 20;
  display: flex; gap: 4px; padding: 8px; overflow-x: auto;
  background: linear-gradient(0deg, rgba(0,0,0,0.9), transparent);
}
.nav-btn {
  font-family:'Special Elite',serif; flex: 1; min-width: 70px; white-space:nowrap;
  background: #14100c; color: #d9c58a; border: 1px solid #3a2f1a;
  padding: 12px 8px; font-size: 0.85rem; cursor: pointer; border-radius: 5px;
  transition: all 0.1s;
}
.nav-btn:hover { background: #221a10; }
.nav-btn.quit { flex: 0 0 auto; min-width: 46px; color: #cc5050; }
.cam-toggle { color: #6bbf6b; }

/* ---------- JUMPSCARE ---------- */
.jumpscare-overlay {
  position: absolute; inset: 0; z-index: 100;
  background: #000; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  animation: shake 0.08s infinite;
}
.jumpscare-img {
  width: 90vmin; height: 90vmin; max-width: 600px; max-height: 600px;
  image-rendering: pixelated;
  filter: brightness(1.4) contrast(1.6) saturate(1.4);
  animation: zoomscare 0.4s ease-out;
}
.jump-text {
  position: absolute; bottom: 12%; font-family:'Special Elite',serif;
  color: #ff1a1a; font-size: 2.5rem; text-shadow: 0 0 20px rgba(255,0,0,0.8);
  animation: flick 0.3s infinite;
}
@keyframes shake {
  0%{transform:translate(3px,-2px);} 25%{transform:translate(-4px,3px);}
  50%{transform:translate(2px,4px);} 75%{transform:translate(-3px,-3px);}
  100%{transform:translate(4px,2px);}
}
@keyframes zoomscare { from { transform: scale(0.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- FOOTER ---------- */
.footer-link a { color: #5a4a2a; font-family:'VT323',monospace; font-size: 1rem; text-decoration: none; }
.footer-link a:hover { color: #b89a5a; text-decoration: underline; }

/* scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #3a2f1a; border-radius: 3px; }
::-webkit-scrollbar-track { background: #0a0908; }
</parameter>
</invoke>