:root{
  --bg:#0b0702;
  --bg2:#050301;
  --amber:#ffb000;
  --amber2:#ff8a00;
  --dim:rgba(255,176,0,.65);
  --faint:rgba(255,176,0,.25);
  --line:rgba(255,176,0,.12);
}

*{box-sizing:border-box}

html,body{height:100%}

body{
  margin:0;
  background:#000;
  color:var(--amber);
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono","Courier New",monospace;
  overflow:hidden;
  text-shadow:0 0 6px rgba(255,176,0,.25);
}

/* ===============================
   MODE VISIBILITY (CRITICAL)
   =============================== */

/* POWER OFF = ONLY BOOT OVERLAY */
body.power-off .wrap{display:none}
body.power-off #menuShell{display:none}
body.power-off #boot{display:block}

/* TERMINAL MODE */
body.mode-terminal .wrap{display:flex}
body.mode-terminal #menuShell{display:none}
body.mode-terminal #boot{display:none}

/* MENU MODE */
body.mode-menu .wrap{display:none}
body.mode-menu #menuShell{display:block}
body.mode-menu #boot{display:none}

/* ===============================
   BOOT OVERLAY
   =============================== */

#boot{
  position:fixed;
  inset:0;
  background:#000;
  color:var(--amber);
  z-index:9000;
  display:none;
}

/* ===============================
   TERMINAL LAYOUT
   =============================== */

.wrap{
  height:100%;
  display:flex;
  align-items:stretch;
  justify-content:center;
  padding:18px;
}

.term{
  width:min(980px,100%);
  border:1px solid var(--line);
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 18px 70px rgba(0,0,0,.55);
  position:relative;
  transform:perspective(1200px) rotateX(.6deg) rotateY(-.4deg);
  background:
    radial-gradient(900px 600px at 25% 15%, rgba(255,176,0,.07), transparent 55%),
    radial-gradient(900px 650px at 70% 25%, rgba(255,138,0,.05), transparent 55%),
    linear-gradient(180deg,var(--bg),var(--bg2));
}

.header{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px;
  background:linear-gradient(180deg, rgba(255,176,0,.08), rgba(255,176,0,.03));
  border-bottom:1px solid var(--line);
}

.dots{display:flex;gap:7px}

.dot{
  width:10px;
  height:10px;
  border-radius:50%;
  border:1px solid var(--line);
  background:rgba(255,176,0,.08);
}

.title{
  font-size:12px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--dim);
}

.status{
  font-size:12px;
  color:var(--dim);
}

.screen{
  padding:16px 14px 18px;
  height:calc(100% - 42px);
  overflow:auto;
}

.cursor{
  display:inline-block;
  width:9px;
  height:1.1em;
  background:rgba(255,176,0,.7);
  margin-left:6px;
  position:relative;
  top:.15em;
  animation:blink 1s steps(1,end) infinite;
}

@keyframes blink{50%{opacity:0}}

/* ===============================
   BOOT TEXT
   =============================== */

#boot .tl{
  position:absolute;
  top:8px;
  left:16px;
  font-size:14px;
  line-height:1.3;
  white-space:pre;
}

#boot .barWrap{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  width:min(720px,84vw);
}

#boot .barLabel{
  font-size:13px;
  color:var(--dim);
  margin-bottom:10px;
  letter-spacing:.06em;
}

#boot .barOuter{
  height:12px;
  border:1px solid rgba(255,176,0,.45);
  border-radius:2px;
  overflow:hidden;
}

#boot .barFill{
  height:100%;
  width:0%;
  background:rgba(255,176,0,.95);
}

#boot .below{
  margin-top:12px;
  font-size:13px;
  color:var(--dim);
  min-height:46px;
  white-space:pre-wrap;
}

#boot .err{color:var(--amber2)}

@media (max-width:520px){
  .term{transform:none}
}

