:root{
  /* monochrome terminal theme — keep palette reference but use only BW */
  --bg: #000000;
  --panel: #0b0b0b;
  --ink: #ffffff;
  --muted: #bdbbae;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  height: 100%;
  /* use a crisp system monospace for clear rendering (avoids blurry pixel font) */
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, 'Courier New', monospace;
  background: radial-gradient(circle at 50% 40%, #101014 0%, #000 100%) fixed;
  color:var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering:geometricPrecision;
  font-size:14px;
  line-height:1.35;
  overflow:auto;
  overflow-y: auto; /* Ensure no unnecessary vertical scrolling */
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="white"><rect width="16" height="16" fill="black"/><path d="M2 2 L14 14 M14 2 L2 14" stroke="white" stroke-width="2"/></svg>') 8 8, auto;
}
.ui{position:relative;z-index:2;display:flex;flex-direction:column;align-items:center;min-height:100vh;padding-top:2vh}

.title-ascii{margin:10px 0 6px 0;line-height:0.9;color:var(--ink);text-align:center;letter-spacing:0}
/* load zpix pixel font (falls back if unavailable) */
@font-face{
  font-family: 'zpix';
  src: url('https://cdn.jsdelivr.net/gh/SolidZORO/zpix-pixel-font@master/ttf/zpix.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
.title-ascii{font-family:'zpix','Press Start 2P', ui-monospace, monospace; font-size:56px}
/* title canvas styles (pixelated rendering) */
#title-canvas{width:520px;height:120px;display:block;margin:0 auto;image-rendering:pixelated}

/* header kept minimal */
.header{padding:0;text-align:center;width:100%;margin-top:-32px}

/* main layout centered and wider */
.main{display:flex;gap:24px;padding:12px 18px;align-items:flex-start;width:100%;max-width:1200px}
.nav{width:280px;flex:0 0 280px}
.menu{list-style:none;padding:10px;margin:0;border:1px solid var(--ink);min-height:260px;display:flex;flex-direction:column;gap:8px;background:transparent}
.menu-item{padding:8px 10px;border:1px dashed var(--ink);cursor:pointer;user-select:none}
.menu-item.active{background:var(--ink);color:#000;border-style:solid}
.nav-hint{font-size:11px;color:var(--muted);margin-top:8px}

.content{flex:1;display:grid;grid-template-columns:repeat(2,1fr);gap:20px;margin-top:-24px}
.block{border:1px solid var(--ink);padding:18px;border-radius:6px;min-height:180px;color:var(--ink);background:transparent !important}
.block-title{margin:0 0 8px 0;color:var(--ink)}
.placeholder{color:var(--muted);white-space:pre-wrap}

/* visible highlight for the active block */
.block.active{background:var(--ink);color:#000;border:3px double var(--ink);outline:2px solid #000 /* Indented black outline */}
.block.active .placeholder{color:#111}

button{display:none}

.footer{text-align:center;padding:6px;color:var(--muted);font-size:10px}

/* subtle decorations removed for pure ASCII feel */
.pixel{display:none}
.glitch{position:relative;display:inline-block}

.flicker{animation:fadein 320ms ease-out 1}
@keyframes fadein{
  from{opacity:0}
  to{opacity:1}
}

/* 3D cube container in bottom-left */
/* place cube in the main layout (between nav and content). larger size */
#cube-container{flex:0 0 180px;display:flex;align-items:center;justify-content:center;perspective:800px}
.cube-3d{width:140px;height:140px;position:relative;transform-style:preserve-3d;animation:spinCube 6s linear infinite}
.cube-3d .face{position:absolute;left:0;top:0;width:140px;height:140px;border:2px solid rgba(255,255,255,0.9);background:repeating-linear-gradient(45deg, #fff 0 2px, #eee 2px 4px);box-shadow:inset 0 0 0 rgba(255,255,255,0.04), 0 0 6px rgba(255,255,255,0.06)}
.cube-3d .front{transform:translateZ(70px)}
.cube-3d .back{transform:rotateY(180deg) translateZ(70px)}
.cube-3d .right{transform:rotateY(90deg) translateZ(70px)}
.cube-3d .left{transform:rotateY(-90deg) translateZ(70px)}
.cube-3d .top{transform:rotateX(90deg) translateZ(70px)}
.cube-3d .bottom{transform:rotateX(-90deg) translateZ(70px)}

@keyframes spinCube{
  from{transform:rotateX(0deg) rotateY(0deg)}
  to{transform:rotateX(360deg) rotateY(360deg)}
}

/* small responsive tweak */
@media (max-width:920px){
  .main{flex-direction:column;align-items:center}
  .nav{width:100%;flex:auto}
  .content{grid-template-columns:1fr;width:100%}
}

/* lower the cube slightly so it's under the selector and not in the way */
#cube-container{transform:translateY(38px);opacity:0.2}
.cube-3d .face{background:#222;border:2px dotted #aaa}
.cube-3d .face {
  background: #111; /* Slightly darker sides */
  border: 2px dotted #fff; /* Brighter white edges */
}

#bg-pixels {
  position: fixed; /* Ensure stars stay fixed in the background */
  top: 0;
  left: 0;
  z-index: -1; /* Push stars behind all other content */
  pointer-events: none;
}

/* Force all text to be pure white */
body, .block, .block-title, .menu-item, .menu-item.active {
  color: #ffffff !important; /* Override any other styles */
}

/* Terminal container styles */
#terminal-container {
  font-family: 'Courier New', monospace;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--ink);
  padding: 18px 18px 10px 18px;
  width: 90%;
  max-width: 600px;
  margin: 32px auto 0 auto;
  border-radius: 8px;
  box-shadow: 0 2px 18px rgba(255,255,255,0.08);
  margin-top: 40px;
  margin-bottom: 0;
  font-size: 12px;
  min-width: 700px;
  max-width: 1400px;
  height: 320px;
  min-height: 320px;
  max-height: 320px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
#terminal-output {
  font-size: 12px;
  min-height: 220px;
  max-height: 220px;
  height: 220px;
  overflow-y: auto;
  padding: 32px 8px 0px 32px; /* Top, right, bottom, left - move text down and right */
  margin: 0;
}
#terminal-input {
  display: flex;
  align-items: center;
  margin-top: 0;
  margin-bottom: 2px;
  padding: 0 8px 2px 8px;
  min-height: 90px;
  position: relative;
  height: 90px;
  width: 100%;
  cursor: text;
}
#terminal-input::before {
  content: '';
  position: absolute;
  left: -24px;
  right: -24px;
  top: -18px;
  bottom: -18px;
  z-index: 1;
  background: transparent;
  pointer-events: auto;
  cursor: text;
}
#terminal-input:before {
  /* For accessibility, ensure the pseudo-element is present */
}
#terminal-input:active #terminal-command,
#terminal-input:focus-within #terminal-command {
  outline: 1.5px solid #7fffd4;
  background: rgba(127,255,212,0.07);
  border-radius: 3px;
}
#terminal-command {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--ink);
  outline: none;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 1px;
  padding: 2px 0 2px 0;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  z-index: 2;
  position: relative;
  height: 60px;
  line-height: 60px;
  vertical-align: middle;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: left;
}
#terminal-input {
  cursor: text;
}
#terminal-input::before {
  pointer-events: auto;
  cursor: text;
}
#terminal-input:active #terminal-command,
#terminal-input:focus-within #terminal-command {
  outline: 1.5px solid #7fffd4;
  background: rgba(127,255,212,0.07);
  border-radius: 3px;
}
#terminal-input:active input,
#terminal-input:focus-within input {
  outline: 1.5px solid #7fffd4;
}
.block-title {
  font-size: 1.2em;
  color: #7fffd4;
  margin-bottom: 8px;
}
.block {
  border: 1.5px solid #7fffd4;
  border-radius: 7px;
  margin-bottom: 18px;
  padding: 18px 20px;
  color: #fff;
  box-shadow: 0 1px 8px rgba(127,255,212,0.08);
}
/* Center the content section and its blocks */
.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 auto;
}
.block {
  margin-left: auto;
  margin-right: auto;
  max-width: 520px;
}
.block a { color: #7fffd4; text-decoration: underline; }
/* Bottom bar styles */
.bottom-bar {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  width: 100%;
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 10;
  padding-left: 6vw;
  /* Shift everything to the right */
}
#cube-container {
  flex: 0 0 180px;
  min-width: 140px;
  max-width: 200px;
  height: 160px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  margin: 10px 45px 60px -30px; /* Move further up and further left */
  /* More right margin */
  position: relative;
  opacity: 1;
  transform: none;
}
#terminal-container {
  flex: 1 1 auto;
  max-width: 1200px;
  min-width: 420px;
  margin: 0 32px 24px 0;
  padding: 28px 48px 22px 48px;
  font-size: 12px;
  border-radius: 14px;
  box-shadow: 0 2px 18px rgba(127,255,212,0.10);
}
#terminal-output {
  min-height: 200px;
  max-height: 400px;
  font-size: 12px;
}
#terminal-command {
  font-size: 12px;
}
@media (max-width: 1200px) {
  #terminal-container {
    max-width: 98vw;
    min-width: 0;
    padding: 18px 8px 12px 8px;
  }
  .bottom-bar {
    padding-left: 0;
  }
}
