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


body.arg-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  color: #00ff96;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  position: relative;
  overflow: hidden; /* keeps overlays clean */
  text-shadow: 0 0 1px rgba(0,255,150,0.25);
}

/* --- The form --- */
.passform {
  position: relative;
  z-index: 2; /* above effects */
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 42px 48px;
  border: 1px solid rgba(0, 255, 150, 0.35);
  background: rgba(0, 0, 0, 0.78);
  box-shadow:
    0 0 28px rgba(0, 255, 150, 0.12),
    inset 0 0 18px rgba(0, 255, 150, 0.08);
  backdrop-filter: blur(1px);
  text-align: center;
  transform: translateZ(0);
  width: min(92vw, 520px);
}

.passform input[type="password"] {
  background: #000;
  border: 1px solid rgba(0, 255, 150, 0.6);
  color: #00ff96;
  padding: 12px 14px;
  font-size: 16px;
  outline: none;
  text-align: center;
  letter-spacing: 3px;
  box-shadow: inset 0 0 10px rgba(0, 255, 150, 0.08);
}

.passform input[type="password"]::placeholder {
  color: rgba(0, 255, 150, 0.4);
}

.passform input[type="submit"] {
  background: transparent;
  color: #00ff96;
  border: 1px solid rgba(0, 255, 150, 0.6);
  padding: 10px 14px;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.2s ease, box-shadow 0.2s ease;
  letter-spacing: 2px;
}

.passform input[type="submit"]:hover {
  background: rgba(0, 255, 150, 0.08);
  box-shadow: 0 0 12px rgba(0, 255, 150, 0.25);
}

.passform input[type="submit"]:active {
  transform: translateY(1px);
}

.passform input[type="password"] {
  background: radial-gradient(
    ellipse at center,
    rgba(0, 255, 150, 0.06) 0%,
    rgba(0, 0, 0, 0.95) 60%
  );
  border: 1px solid rgba(0, 255, 150, 0.55);
  color: #00ff96;

  padding: 14px 16px;
  font-size: 18px;
  font-family: inherit;
  text-align: center;
  letter-spacing: 4px;

  box-shadow:
    inset 0 0 18px rgba(0, 255, 150, 0.12),
    0 0 14px rgba(0, 255, 150, 0.18);

  outline: none;
  caret-color: #00ff96;

  transition:
    box-shadow 0.15s ease,
    border-color 0.15s ease,
    background 0.2s ease;
}

.passform input[type="password"]:focus {
  border-color: rgba(0, 255, 150, 0.9);
  box-shadow:
    inset 0 0 22px rgba(0, 255, 150, 0.18),
    0 0 22px rgba(0, 255, 150, 0.45);
}

.passform input[type="password"] {
  text-shadow:
    0 0 6px rgba(0, 255, 150, 0.45),
    0 0 12px rgba(0, 255, 150, 0.25);
}

.passform input[type="password"]::placeholder {
  color: rgba(0, 255, 150, 0.35);
  letter-spacing: 3px;
  text-shadow: none;
}

.passform input[type="password"] {
  animation: textDrift 6s infinite alternate ease-in-out;
}

@keyframes textDrift {
  0%   { text-shadow: 0 0 6px rgba(0,255,150,0.45); }
  50%  { text-shadow: 0 0 7px rgba(0,255,150,0.55); }
  100% { text-shadow: 0 0 5px rgba(0,255,150,0.35); }
}

.passform input[type="password"] {
  caret-color: rgba(0, 255, 150, 0.85);
}

/* --- Full-screen CRT overlay layers --- */
body.arg-screen::before,
body.arg-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* Scanlines + faint vertical banding */
body.arg-screen::before {
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.035) 0px,
      rgba(255, 255, 255, 0.035) 1px,
      rgba(0, 0, 0, 0.0) 3px,
      rgba(0, 0, 0, 0.0) 6px
    ),
    repeating-linear-gradient(
      to right,
      rgba(0, 255, 150, 0.02) 0px,
      rgba(0, 255, 150, 0.02) 1px,
      rgba(0, 0, 0, 0) 10px
    );
  opacity: 0.20;
  mix-blend-mode: screen;
}

/* Static grain + vignette */
body.arg-screen::after {
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0) 35%, rgba(0,0,0,0.55) 100%),
    repeating-radial-gradient(circle at 30% 20%,
      rgba(255,255,255,0.018) 0px,
      rgba(255,255,255,0.018) 1px,
      rgba(0,0,0,0) 2px,
      rgba(0,0,0,0) 6px
    );
  opacity: 0.55;
  animation: grain 1.2s steps(2) infinite;
}

@keyframes grain {
  0%   { transform: translate(0, 0); }
  10%  { transform: translate(-1%, -2%); }
  20%  { transform: translate(-3%, 1%); }
  30%  { transform: translate(2%, 3%); }
  40%  { transform: translate(1%, -1%); }
  50%  { transform: translate(-2%, 2%); }
  60%  { transform: translate(3%, 0%); }
  70%  { transform: translate(0%, 3%); }
  80%  { transform: translate(-3%, 0%); }
  90%  { transform: translate(2%, -2%); }
  100% { transform: translate(0, 0); }
}

.passform.shake {
  animation: errorShake 0.25s;
}

@keyframes errorShake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  50% { transform: translateX(3px); }
  75% { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}

body.arg-screen::after {
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0) 40%, rgba(0,0,0,0.6) 100%),
    repeating-radial-gradient(circle at center,
      rgba(255,255,255,0.015) 0px,
      rgba(255,255,255,0.015) 1px,
      rgba(0,0,0,0) 2px,
      rgba(0,0,0,0) 5px
    );
}

/* --- Random flicker pulse toggled by JS --- */
html.flicker body.arg-screen::before {
  opacity: 0;
  color:black;
}

html.flicker body.arg-screen::after {
  opacity: 1;
  color:black;
}

html.flicker body.arg-screen {
  filter: brightness(1.18) contrast(1.06) saturate(1.06);
}

/* Optional: tiny jitter on the form during flicker */
html.flicker .passform {
  transform: translate3d(0,0,0) skewX(-0.15deg);
}


.static-overlay{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.28;
  mix-blend-mode: screen;
  will-change: background-position;

  background:
    linear-gradient(
      to bottom,
      rgba(0,0,0,0.0) 0%,
      rgba(0,255,150,0.06) 45%,
      rgba(0,255,150,0.18) 50%,
      rgba(0,255,150,0.06) 55%,
      rgba(0,0,0,0.0) 100%
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(255,255,255,0.03) 0px,
      rgba(0,0,0,0.0) 3px,
      rgba(0,0,0,0.0) 7px
    );

  background-repeat: repeat;
  background-size: 100% 120vh, 100% 10px;

  animation: roll 15s linear infinite;
  z-index: 100; 
}

@keyframes roll {
  from { background-position: 0 -120vh, 0 0; }
  to   { background-position: 0 120vh, 0 120px; }
}

.msg {
  width: 100%;
  max-width: 100%;          /* don’t exceed form width */
  box-sizing: border-box;

  margin-top: 10px;
  padding: 0 6px;

  text-align: center;
  line-height: 1.35;
  white-space: normal;      /* allow wrapping */
  word-break: break-word;   /* prevent overflow */
  overflow-wrap: anywhere;  /* modern wrapping */

  font-size: 14px;
  letter-spacing: 1px;

  color: rgba(0,255,150,0.75);
  text-shadow: 0 0 8px rgba(0,255,150,0.25);

  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.msg.show {
  opacity: 1;
  transform: translateY(0);
}


.msg.error{
  color: rgba(211, 52, 4, 0.9);
}

.msg.ok{
  color: rgba(0,255,150,0.95);
  font-size: 13.5px;
  letter-spacing: 1.2px;
  opacity: 0.95;
}

.passform.locked .terminal-input {
  opacity: 0.55;
  filter: blur(0.3px);
  pointer-events: none;
  
}

.passform.locked input[type="submit"] {
  opacity: 0.5;
  pointer-events: none;
}
