    :root {
      color-scheme: dark;

      --plastic: #292a30;
      --screen-black: #020604;
      --power-green: #72e6a0;
      --activity-amber: #bd8a53;

      --frame-padding: clamp(12px, 3.5vw, 75px);
      --footer-height: clamp(45px, 5vh, 65px);
      --screen-radius: clamp(18px, 3vw, 25px);
    }

    *,
    *::before,
    *::after {
      box-sizing: border-box;
    }

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

    body {
      overflow: hidden;
      background: #101116;
    }

    label, h1, p{
        user-select: none;
    }

    /* Monitor housing */

    .monitor {
      position: relative;
      display: grid;
      grid-template-rows: minmax(0, 1fr) var(--footer-height);
      width: 100%;
      width: 100vw;
      height: 100%;
      height: 100dvh;
      padding: var(--frame-padding);
      overflow: hidden;

      background: linear-gradient(
        145deg,
        #41424a 0%,
        #303139 18%,
        #24252c 55%,
        #17181d 100%
      );

      box-shadow:
        inset 0 0 0 2px rgb(255 255 255 / 8%),
        inset 0 0 45px rgb(0 0 0 / 35%);

      animation: monitor-flicker 9s linear infinite;
    }

    /* CRT glass */

    .glass {
      position: relative;
      min-width: 0;
      min-height: 0;
      overflow: hidden;
      isolation: isolate;
      border-radius: var(--screen-radius);
      background: var(--screen-black);

      box-shadow:
        inset 0 0 0 2px #10120f,
        inset 0 5px 12px rgb(0 0 0 / 95%),
        inset 0 0 55px 12px rgb(0 0 0 / 95%),
        0 0 2px rgb(255 255 255 / 8%);
    }

    /* Phosphor glow */

    .screen {
      position: absolute;
      inset: 0;

      background: radial-gradient(
        ellipse at 50% 45%,
        rgb(30 100 72 / 20%) 0%,
        rgb(9 30 21 / 35%) 48%,
        #010302 100%
      );

      animation: phosphor 7s ease-in-out infinite alternate;
    }

    /* Glass shading and reflections */

    .glass::before,
    .glass::after,
    .reflection {
      position: absolute;
      inset: 0;
      pointer-events: none;
    }

    .glass::before {
      z-index: 2;
      content: "";

      background:
        radial-gradient(
          ellipse at center,
          transparent 35%,
          rgb(0 0 0 / 15%) 58%,
          rgb(0 0 0 / 55%) 82%,
          #000 110%
        ),
        linear-gradient(
          120deg,
          rgb(255 255 255 / 4.5%),
          transparent 22%,
          transparent 80%,
          rgb(255 255 255 / 1.5%)
        );
    }

    /* Scanlines and RGB phosphor texture */

    .glass::after {
      z-index: 3;
      content: "";

      background:
        repeating-linear-gradient(
          to bottom,
          rgb(0 0 0 / 28%) 0,
          rgb(0 0 0 / 28%) 1px,
          transparent 2px,
          transparent 4px
        ),
        repeating-linear-gradient(
          to right,
          rgb(255 40 70 / 2.5%) 0,
          rgb(255 40 70 / 2.5%) 1px,
          rgb(50 255 160 / 2.5%) 1px,
          rgb(50 255 160 / 2.5%) 2px,
          rgb(70 100 255 / 2.5%) 2px,
          rgb(70 100 255 / 2.5%) 3px
        );

      opacity: 0.85;
    }

    /* Monitor footer */

    .monitor-footer {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      min-width: 0;

      padding-top:50px;
    }

    .monitor-title {
      margin: 0;
      padding: 0 70px;
      overflow: hidden;

      color: #a4a5ad;
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.28em;
      line-height: 1.4;
      text-align: center;
      text-overflow: ellipsis;
      text-transform: uppercase;
      white-space: nowrap;

      text-shadow:
        0 1px 1px rgb(0 0 0 / 90%),
        0 -1px 0 rgb(255 255 255 / 6%);
    }

    /* Status indicators */

    .indicators {
      position: absolute;
      right: clamp(8px, 1.5vw, 24px);
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .led {
      display: block;
      flex: 0 0 9px;
      width: 9px;
      height: 9px;
      border: 1px solid rgb(0 0 0 / 80%);
      border-radius: 50%;
      background: #17181d;

      box-shadow:
        0 0 0 2px rgb(0 0 0 / 22%),
        inset 0 1px 2px rgb(0 0 0 / 80%);
    }

    .led--power {
      border-color: #397e53;

      background: radial-gradient(
        circle at 35% 30%,
        #e0ffeb 0%,
        #72e6a0 28%,
        #239c5a 68%,
        #10552f 100%
      );

      box-shadow:
        0 0 0 2px rgb(0 0 0 / 25%),
        inset 0 1px 1px rgb(255 255 255 / 70%),
        0 0 5px rgb(80 255 140 / 65%),
        0 0 11px rgb(80 255 140 / 30%);

      animation: power-glow 4s ease-in-out infinite;
    }

    .led--activity {
      border-color: #80603e;

      background: radial-gradient(
        circle at 35% 30%,
        #f7d6a5 0%,
        #bd8a53 32%,
        #79502c 72%,
        #392719 100%
      );

      box-shadow:
        0 0 0 2px rgb(0 0 0 / 25%),
        inset 0 1px 1px rgb(255 255 255 / 50%),
        0 0 6px rgb(255 160 70 / 25%);
    }

    /* CRT animation */

    @keyframes phosphor {
      from { filter: brightness(0.92); }
      to   { filter: brightness(1.08); }
    }

    @keyframes monitor-flicker {
      0%, 96%, 100% { opacity: 1; }
      96.2% { opacity: 0.97; }
      96.4% { opacity: 1; }
      98.1% { opacity: 0.985; }
      98.3% { opacity: 1; }
    }

    @keyframes power-glow {
      0%, 100% { filter: brightness(0.85); }
      50%      { filter: brightness(1.2); }
    }

    /* Small screens */

    @media (max-width: 480px) {
      :root {
        --frame-padding: 12px;
        --footer-height: 48px;
      }

      .monitor-title {
        padding-inline: 42px;
        font-size: 10px;
        letter-spacing: 0.18em;
      }

      .indicators {
        right: 6px;
        gap: 7px;
      }
    }

    /* Accessibility */

    @media (prefers-reduced-motion: reduce) {
      .monitor,
      .screen,
      .led--power {
        animation: none;
      }
    }



/* ========================================
   CRT TERMINAL — PASSWORD GENERATOR
   Append this to the end of your CSS
   ======================================== */

/* Terminal content */

.glass > div {
  position: relative;
  z-index: 1;
  width: min(100%, 760px);
  height: 100%;
  margin-inline: auto;
  padding: clamp(20px, 5vw, 64px);

  overflow-x: hidden;
  overflow-y: auto;

  color: #72e6a0;
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  line-height: 1.7;

  text-shadow:
    0 0 3px rgb(114 230 160 / 45%),
    0 0 9px rgb(114 230 160 / 12%);

  scrollbar-color: #315c43 #020604;
  scrollbar-width: thin;
}

/* Terminal heading */

.glass h1 {
  margin: 0 0 30px;
  padding-bottom: 16px;

  color: #a3ffc1;
  border-bottom: 1px solid rgb(114 230 160 / 35%);

  font-family: inherit;
  font-size: clamp(19px, 3vw, 28px);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;

  text-shadow:
    0 0 5px rgb(114 230 160 / 60%),
    0 0 18px rgb(114 230 160 / 18%);
}

.glass h1::before {
  content: "> ";
  color: #bd8a53;
}

/* Labels */

.glass label {
  color: #83c99c;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.035em;
}

.glass label:first-of-type {
  display: inline-block;
  margin-right: 12px;
  margin-bottom: 14px;
}

/* All text and number fields */

.glass input[type="number"],
.glass input[type="text"] {
  max-width: 100%;
  padding: 10px 12px;

  color: #a3ffc1;
  background: rgb(2 12 7 / 85%);
  border: 1px solid #315c43;
  border-radius: 2px;
  outline: none;

  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0.06em;

  box-shadow:
    inset 0 0 12px rgb(0 0 0 / 55%),
    0 0 5px rgb(114 230 160 / 4%);

  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.glass input[type="number"] {
  width: 82px;
}

.glass input[type="text"] {
  display: inline-block;
  width: min(100%, 440px);
  margin-right: 8px;

  font-size: 16px;
}

/* Keyboard focus */

.glass input[type="number"]:focus-visible,
.glass input[type="text"]:focus-visible,
.glass button:focus-visible {
  border-color: #72e6a0;
  box-shadow:
    0 0 0 2px rgb(114 230 160 / 15%),
    0 0 12px rgb(114 230 160 / 15%);
}

/* Checkbox controls */

.glass input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0 9px 0 0;
  vertical-align: -2px;

  accent-color: #72e6a0;
  cursor: pointer;
}

.glass label:has(input[type="checkbox"]) {
  display: inline-block;
  padding: 5px 0;
  cursor: pointer;
  transition: color 160ms ease;
}

.glass label:has(input[type="checkbox"]:checked) {
  color: #a3ffc1;
}

.glass label:has(input[type="checkbox"]):hover {
  color: #d0ffdf;
}

/* Terminal buttons */

.glass button {
  padding: 10px 16px;

  color: #72e6a0;
  background: rgb(15 38 24 / 55%);
  border: 1px solid #477c58;
  border-radius: 2px;

  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;

  text-shadow: 0 0 5px rgb(114 230 160 / 35%);
  cursor: pointer;

  box-shadow:
    inset 0 0 12px rgb(114 230 160 / 3%),
    0 0 5px rgb(114 230 160 / 5%);

  transition:
    background 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    box-shadow 150ms ease;
}

.glass button:hover {
  color: #e0ffeb;
  background: rgb(35 100 58 / 35%);
  border-color: #72e6a0;

  box-shadow:
    inset 0 0 12px rgb(114 230 160 / 8%),
    0 0 12px rgb(114 230 160 / 12%);
}

.glass button:active {
  background: rgb(114 230 160 / 18%);
}

/* Generate button gets the amber command prompt accent */

.glass button:first-of-type {
  border-color: #80603e;
  color: #e2b77f;
  background: rgb(45 30 16 / 40%);
}

.glass button:first-of-type:hover {
  color: #ffe1b4;
  border-color: #bd8a53;
  background: rgb(100 65 30 / 30%);

  box-shadow: 0 0 12px rgb(189 138 83 / 15%);
}

/* Password output */

.glass #password {
  border-color: rgb(114 230 160 / 45%);
  background: rgb(1 8 4 / 95%);

  box-shadow:
    inset 0 0 15px rgb(0 0 0 / 65%),
    0 0 8px rgb(114 230 160 / 7%);
}

.glass #password::selection {
  color: #020604;
  background: #72e6a0;
}

/* CRT terminal cursor accent */

.glass h1::after {
  content: " _";
  color: #72e6a0;
  animation: terminal-cursor 1.1s steps(2, start) infinite;
}

@keyframes terminal-cursor {
  to {
    visibility: hidden;
  }
}

/* Responsive terminal layout */

@media (max-width: 600px) {
  .glass > div {
    padding: 22px 18px;
    font-size: 13px;
  }

  .glass h1 {
    margin-bottom: 24px;
    font-size: 19px;
  }

  .glass input[type="text"] {
    width: 100%;
    margin: 0 0 10px;
  }

  .glass button {
    padding: 10px 12px;
  }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
  .glass h1::after {
    animation: none;
  }

  .glass input,
  .glass button,
  .glass label {
    transition: none;
  }
}


/* ========================================
   CRT TERMINAL - NOTIFICATION
   ======================================== */

.crt-notification {
  position: fixed;
  left: 50%;
  bottom: 35px;
  z-index: 9999;

  display: flex;
  align-items: center;
  gap: 8px;

  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 14px 20px;

  color: #a3ffc1;
  background: rgb(2 12 7 / 96%);
  border: 1px solid #477c58;

  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.07em;
  line-height: 1.6;
  overflow-wrap: anywhere;

  text-shadow:
    0 0 5px rgb(114 230 160 / 65%),
    0 0 12px rgb(114 230 160 / 20%);

  box-shadow:
    inset 0 0 18px rgb(114 230 160 / 5%),
    0 0 8px rgb(114 230 160 / 12%),
    0 0 24px rgb(114 230 160 / 8%);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transform: translate(-50%, 12px);
  transition:
    opacity 300ms ease,
    transform 300ms ease,
    visibility 300ms;
}

/* Visible notification */

.crt-notification.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* Terminal prompt */

.notification-prefix {
  color: #bd8a53;
}

/* Blinking cursor */

.notification-cursor {
  color: #72e6a0;
  animation: notification-blink 800ms steps(2, start) infinite;
}

@keyframes notification-blink {
  to {
    visibility: hidden;
  }
}

/* Mobile positioning */

@media (max-width: 480px) {
  .crt-notification {
    bottom: 20px;
    padding: 12px 14px;
    font-size: 10px;
    letter-spacing: 0.04em;
  }
}

/* Accessibility */

@media (prefers-reduced-motion: reduce) {
  .crt-notification {
    transition: none;
  }

  .notification-cursor {
    animation: none;
  }
}



/* ========================================
   REALISTIC CRT STATUS LIGHTS
   ======================================== */

.led {
  position: relative;
  overflow: visible;
  isolation: isolate;
  transition: filter 100ms ease;
}

/* Tiny reflective highlight on each LED lens */
.led::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 2px;
  width: 3px;
  height: 2px;
  border-radius: 50%;
  background: rgb(255 255 255 / 75%);
  filter: blur(0.4px);
  pointer-events: none;
}

/* Green power LED: subtle, steady breathing glow */
.led--power {
  animation: power-glow 5s ease-in-out infinite;
}

@keyframes power-glow {
  0%, 100% {
    filter: brightness(0.92);
    box-shadow:
      0 0 0 2px rgb(0 0 0 / 25%),
      inset 0 1px 1px rgb(255 255 255 / 70%),
      0 0 4px rgb(80 255 140 / 45%),
      0 0 8px rgb(80 255 140 / 18%);
  }

  50% {
    filter: brightness(1.08);
    box-shadow:
      0 0 0 2px rgb(0 0 0 / 25%),
      inset 0 1px 1px rgb(255 255 255 / 70%),
      0 0 6px rgb(80 255 140 / 65%),
      0 0 12px rgb(80 255 140 / 28%);
  }
}

/* Red activity LED: normally dim */
.led--activity {
  border-color: #803535;

  background: radial-gradient(
    circle at 35% 30%,
    #ffcccc 0%,
    #e53939 32%,
    #a51515 72%,
    #450909 100%
  );

  animation: none;
  filter: brightness(0.65);

  box-shadow:
    0 0 0 2px rgb(0 0 0 / 25%),
    inset 0 1px 1px rgb(255 255 255 / 35%),
    0 0 2px rgb(255 50 50 / 10%);
}

/* Short, realistic red activity flash */
.led--activity.is-flashing {
  animation: activity-flash 180ms ease-out;
}

@keyframes activity-flash {
  0% {
    filter: brightness(0.65);
    box-shadow:
      0 0 0 2px rgb(0 0 0 / 25%),
      inset 0 1px 1px rgb(255 255 255 / 35%),
      0 0 2px rgb(255 50 50 / 10%);
  }

  20% {
    filter: brightness(1.8);
    box-shadow:
      0 0 0 2px rgb(0 0 0 / 25%),
      inset 0 1px 2px rgb(255 255 255 / 85%),
      0 0 7px rgb(255 55 55 / 95%),
      0 0 16px rgb(255 20 20 / 55%);
  }

  45% {
    filter: brightness(1.3);
    box-shadow:
      0 0 0 2px rgb(0 0 0 / 25%),
      inset 0 1px 1px rgb(255 255 255 / 65%),
      0 0 5px rgb(255 55 55 / 65%),
      0 0 10px rgb(255 20 20 / 30%);
  }

  100% {
    filter: brightness(0.65);
    box-shadow:
      0 0 0 2px rgb(0 0 0 / 25%),
      inset 0 1px 1px rgb(255 255 255 / 35%),
      0 0 2px rgb(255 50 50 / 10%);
  }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  .led--power {
    animation: none;
  }

  .led--activity.is-flashing {
    animation: none;
    filter: brightness(1.5);
  }
}