body.background {
  margin: 0;
  background: #000;
  display: grid;
  place-items: center;
  height: var(--app-h, 100dvh);   
  overflow: hidden;
  overscroll-behavior: none;
  perspective: 1400px;
}

.monitor {
  width: 100vw;
  height: var(--app-h, 100dvh);
  box-sizing: border-box;
  padding: 2.5vmin;              
  border-radius: 0;
  container-type: inline-size;    
  background: linear-gradient(145deg, #4a4f4a, #2a2d2a 50%, #1a1c1a);
  box-shadow:
    inset 0 0 0 2px #5c615c,             
    inset 0 0 30px rgba(0, 0, 0, .6),   
    0 20px 60px rgba(0, 0, 0, .8);     
}

/* the glass: tube shape and depth */
.crt {
  position: relative;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 6% / 10%;
  background: radial-gradient(ellipse at center, #0a2a0a 0%, #031203 70%, #000 100%);
  box-shadow:
    inset 0 0 8cqw rgba(0, 0, 0, .9),
    inset 0 0 1.5cqw #000,
    0 0 0 .6cqw #111,
    0 0 0 .8cqw #3a3e3a;
}

/* the picture: this layer gets warped */
.screen {
  position: absolute;
  inset: -3%;                     
  box-sizing: border-box;
  padding: 3cqw 0;
  filter: url(#dome);
  animation: flicker 6s infinite;

  color: #33ff55;
  font-family: "Courier New", monospace;
  font-size: clamp(24px, 3.5vw, 48px);
  text-align: center;
  text-shadow:
    0 0 2px #33ff55,
    0 0 8px rgba(51, 255, 85, .7),
    0 0 20px rgba(51, 255, 85, .35);

  display: flex;
  flex-direction: column;
  align-items: center;
}

.screen p {
  margin: 0;
  width: 100%;
  text-align: justify;
}

/* vignette + scanlines, drawn over the warped picture */
.crt::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .65) 100%),
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, .28) 0 1px, transparent 1px 3px);
  background-size: 100% 100%, 100% 3px;
  animation: scanlines 6s linear infinite;
}

/* soft glass reflection */
.crt::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse 60% 40% at 30% 15%, rgba(255, 255, 255, .10), transparent 70%);
}

@keyframes scanlines {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 0 0, 0 3px; }
}
@keyframes flicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: .85; }
  95% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .crt::after, .screen { animation: none; }
}

/* ---------- terminal ---------- */
.terminal {
  position: relative;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 2cqw;
  overflow: hidden;            
  text-align: left;
  cursor: text;
  font-size: max(14px, 2cqw);  
  line-height: 1.3;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;   
}

.terminalECC{
  position: relative;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 2cqw;
  overflow: hidden;            
  text-align: left;
  cursor: text;
  font-size: max(14px, 1.5cqw);  
  line-height: 1.3;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;   
}


.history { }               
.history div { white-space: pre-wrap; overflow-wrap: anywhere; }

.prompt {
  display: flex;
  align-items: center;
  white-space: pre;
}
.ps { margin-right: .6ch; }

.cursor {
  display: inline-block;
  width: .6ch;
  height: 1.1em;
  margin-left: 1px;
  vertical-align: -0.15em;
  background: currentColor;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* the real input: invisible, but it still receives the keystrokes */
.capture {
  position: absolute;
  left: 0;
  top: 0;                
  width: 1px;
  height: 1px;
  opacity: 0;
  border: 0;
  padding: 0;
  font-size: 16px;      
}

.history .art {
  white-space: pre;     
  font-size: 1.1cqw;    
  line-height: 1.15;
  overflow: hidden;
}
.art-small { display: none; }  

.tlink {
  font: inherit;
  color: inherit;
  text-shadow: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}
.tlink:focus-visible {
  background: #33ff55;
  color: #000;
  text-shadow: none;
  outline: none;
}
/* the box around real links, */
 /* a.tlink { border: 2px solid currentColor; padding: .1em .6em; margin-top: .5rem; display: inline-block; }
*/

@font-face {
    font-family: eight_segment;
    src: url(Seven_segment.ttf);
}

.clock{
  font-family: eight_segment;
  font-size: 5vw;     
}
.clock2{
  font-family: eight_segment;
  font-size: 18vw;  
  display: flex;
  justify-content: center; 
  align-items: center;     
  text-align: center;   
  
}
.seg {
  display: inline-flex;
  align-items: center;
  white-space: pre;
}
.cell { display: inline-grid; }        /* ghost and live character share one cell */
.cell > span {
  grid-area: 1 / 1;
  justify-self: end;                   /* right-aligned, like a real display: a lit 1 uses the right-hand segments */
}
.cell .g { opacity: .1; text-shadow: none; }   /* the faint unlit segments */
.gap { display: inline-block; width: .5em; }    /* the space before AM/PM */


.image { 
    filter: url(#bloom); 
  max-width: 100%;
  max-height: calc(var(--app-h, 100dvh) * .55);
  width: auto;
  height: auto;
}

/* startup animation */
.flash {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: #d8ffe0;
  opacity: 0;
}

.flash.go { animation: flash .5s ease-out; }
@keyframes flash {
  0%   { opacity: 0; }
  10%  { opacity: .95; }
  100% { opacity: 0; }
}

/* flicker like a heating coil; steps(1) makes each change a hard jump, not a fade */
.terminal.warmup { animation: warmup 1.8s steps(1, end) 1; }
@keyframes warmup {
  0%   { opacity: .15; }
  6%   { opacity: 1; }
  9%   { opacity: .2; }
  13%  { opacity: .9; }
  16%  { opacity: .3; }
  20%  { opacity: 1; }
  26%  { opacity: .55; }
  29%  { opacity: 1; }
  38%  { opacity: .7; }
  40%  { opacity: 1; }
  52%  { opacity: .85; }
  54%  { opacity: 1; }
  100% { opacity: 1; }
}




@media (hover: hover) {
  .tlink:hover {
    background: #33ff55;
    color: #000;
    text-shadow: none;
  }
}


@media (max-width: 700px), (pointer: coarse) {
  .screen {
    filter: none;      
    inset: 0;           
    text-shadow: 0 0 2px #33ff55, 0 0 8px rgba(51, 255, 85, .6);   
  }
  .crt::after { animation: none; }  
  .crt { border-radius: 5vmin; }     

  /* let long commands wrap instead of running off the edge */
  .prompt { display: block; white-space: normal; }
  .typed { white-space: pre-wrap; overflow-wrap: anywhere; }
}

@media (max-width: 600px) {
  .history .art { display: none; }
.history .art-small {
  display: block;
  font-family: ui-monospace, Menlo, Consolas, "DejaVu Sans Mono", "Liberation Mono", monospace;
  font-size: 2.5vw;                  /* fallback for browsers without cqw */
  font-size: calc(150cqw / 59);      /* 59 = columns in the banner */
  line-height: 1;
  letter-spacing: 0;
  font-weight: normal;
  white-space: pre;
  overflow: hidden;
  text-shadow: 0 0 2px #33ff55;      /* tight glow so the block shapes stay readable */
}
.history .art-small div { white-space: pre; overflow-wrap: normal; height: 1em; }
.art-small span { display: inline-block; width: 1ch; }
}




