  @font-face {
    font-family: "VT100";
    src: url("../fonts/Glass_TTY_VT220.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
    }

  html, body { width: 100%; height: 100%; margin: 0; padding: 0; }

  body {
    background: radial-gradient( ellipse at center, #252525 0%, #111 55%, #050505 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    font-family: monospace;
  }

/* VT100 / CRT CASE */
  .crt {
    position: relative;
    width: min(90vw, 1100px);
    height: min(82vh, 720px);
    padding: 38px;
    background: linear-gradient( 145deg, #444 0%, #222 15%, #111 60%, #050505 100%);
    border-radius: 35px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .8), inset 0 0 0 3px #555, inset 0 0 25px rgba(0, 0, 0, .9);
    }

/* SCREEN FRAME */
  .screen-frame {
    position: relative;
    width: 100%;
    height: 100%;
    background: #050805;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: inset 0 0 35px rgba(0, 0, 0, .95), 0 0 25px rgba(0, 0, 0, .8);
    }

/* ACTUAL VT100 SCREEN */
  .screen {
    position: absolute;
    inset: 0;
    overflow: hidden;
    padding: 32px;
    box-sizing: border-box;
    color: #8cff8c;
    background: radial-gradient( ellipse at center, #092009 0%, #031003 65%, #010601 100%);
    font-family: "VT100", "Courier New", monospace;
    font-size: clamp(15px, 1.8vw, 24px);
    line-height: 1.35;
    text-shadow: 0 0 4px rgba(100, 255, 100, .8), 0 0 10px rgba(50, 255, 50, .35);
    }

/* TERMINAL CONTENT */
  #terminal {
    position: absolute;
    left: 32px;
    right: 32px;
    top: 32px;
    bottom: 32px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    white-space: pre-wrap;
    word-break: normal;
    font-family: "VT100", "Courier New", monospace;
    }

  #terminal::-webkit-scrollbar { display: none; }

/* TERMINAL OUTPUT */
  #output { white-space: pre-wrap; word-break: normal; }


/* TERMINAL LINE */
  .line {
    display: block;
    min-height: 1.35em;
    line-height: 1.35em;
    white-space: pre-wrap;
    }

/* VT100 CURSOR */
  .cursor {
    display: inline-block;
    width: .62em;
    height: 1.05em;
    margin-left: 1px;
    vertical-align: -.12em;
    background: #8cff8c;
    box-shadow: 0 0 4px rgba(140, 255, 140, .9), 0 0 10px rgba(100, 255, 100, .5);
    animation: vt100Cursor 1s steps(1, end) infinite;
    }
  @keyframes vt100Cursor { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }


/* CRT SCANLINES */
  .scanlines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(255, 255, 255, .035) 0px,
            rgba(255, 255, 255, .035) 1px,
            rgba(0, 0, 0, .12) 2px,
            rgba(0, 0, 0, .12) 4px
        );
    opacity: .65;
    }

/* SCREEN VIGNETTE */
  .vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 11;
    background:
        radial-gradient(
            ellipse at center,
            transparent 55%,
            rgba(0, 0, 0, .15) 72%,
            rgba(0, 0, 0, .65) 100%
        );
    border-radius: 24px;
    }

/* SCREEN GLASS */
  .glass {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 12;
    background:
        linear-gradient(
            115deg,
            rgba(255, 255, 255, .07),
            transparent 18%,
            transparent 80%,
            rgba(255, 255, 255, .025)
        );
    border-radius: 24px;
    }

/* CRT FLICKER (opt) */
  .flicker {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 13;
    background: rgba(120, 255, 120, .015);
    animation: flicker .12s infinite;
    }
  @keyframes flicker {
    0% { opacity: .15; }
    25% { opacity: .05; }
    50% { opacity: .12; }
    75% { opacity: .03; }
    100% { opacity: .10; }
    }

/* POWER LED (opt)*/
  .status {
    position: absolute;
    right: 25px;
    bottom: 12px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #55ff55;
    box-shadow: 0 0 6px #55ff55, 0 0 14px #55ff55;
  }

/* MOBILE */
  @media (max-width: 600px) {
    .crt { width: 92vw; height: 78vh; padding: 18px; border-radius: 20px; }
    .screen { padding: 18px; }
    #terminal { left: 18px; right: 18px; top: 18px; bottom: 18px; }
  }

