body {
  background-color: #222;
}

::selection {
  background-color: color-mix(in srgb, currentColor 20%, transparent);
}

::-moz-selection {
  background-color: color-mix(in srgb, currentColor 20%, transparent);
}

main {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100vw;
  position: relative;
  perspective: 30px; /* Enable 3D transforms */
}

#webgl-canvas {
  width: min(100vw, 100vh);
  height: min(100vw, 100vh);
  image-rendering: pixelated;
}

#screen-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  transform-style: preserve-3d;
  mix-blend-mode: screen;
}

#screen-container form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#message-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
}

#message-container h1 {
  color: #00ff00;
  font-size: 5rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
}

#message-container h1.invalid {
  color: #ff0000;
}

#screen-saver {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  width: max(min(35vw, 35vh), 10rem);
  height: max(min(35vw, 35vh), 10rem);
  mix-blend-mode: screen;
}

.input-group {
  position: relative;
}

input {
  background: rgba(0, 0, 0, 0.8);
  border: 3px solid #00ff00;
  color: #00ff00;
  font-size: 18px;
  padding: 12px 16px;
  height: 3rem;
  width: max(min(30vw, 30vh), 10rem);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;

  /* Phosphorescent glow effect */
  box-shadow:
    0 0 3px #00ff00,
    0 0 6px #00ff00,
    0 0 9px #00ff00,
    inset 0 0 3px rgba(0, 255, 0, 0.1);

  transition: box-shadow 0.3s ease;
}

input:focus {
  outline: none;
  border-color: #00ff00;
  box-shadow:
    0 0 3px #00ff00,
    0 0 6px #00ff00,
    0 0 9px #00ff00,
    0 0 12px #00ff00,
    inset 0 0 3px rgba(0, 255, 0, 0.2);

  /* Intensify glow on focus */
  text-shadow: 0 0 5px #00ff00;
}

input::placeholder {
  color: rgba(0, 255, 0, 0.6);
  text-shadow: 0 0 3px rgba(0, 255, 0, 0.3);
}

input.invalid {
  border-color: #ff0000;
  box-shadow:
    0 0 3px #ff0000,
    0 0 6px #ff0000,
    0 0 9px #ff0000,
    inset 0 0 3px rgba(255, 0, 0, 0.2);
  text-shadow: 0 0 5px #ff0000;
  color: #ff0000;
}

input.invalid::placeholder {
  color: rgba(255, 0, 0, 0.6);
  text-shadow: 0 0 3px rgba(255, 0, 0, 0.3);
}

#login-button {
  background: rgba(0, 0, 0, 0.8);
  border: 3px solid #00ff00;
  color: #00ff00;
  font-size: 18px;
  padding: 8px 8px;
  height: 3rem;
  width: max(min(30vw, 30vh), 10rem);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;

  /* Phosphorescent glow effect */
  box-shadow:
    0 0 3px #00ff00,
    0 0 6px #00ff00,
    0 0 9px #00ff00,
    inset 0 0 3px rgba(0, 255, 0, 0.1);

  transition: box-shadow 0.3s ease;
}

#login-button:focus {
  outline: none;
  border-color: #00ff00;
  box-shadow:
    0 0 3px #00ff00,
    0 0 6px #00ff00,
    0 0 9px #00ff00,
    0 0 12px #00ff00,
    inset 0 0 3px rgba(0, 255, 0, 0.2);

  /* Intensify glow on focus */
  text-shadow: 0 0 5px #00ff00;
}

#login-button:hover {
  border-color: #00ff00;
  box-shadow:
    0 0 3px #00ff00,
    0 0 6px #00ff00,
    0 0 9px #00ff00,
    0 0 12px #00ff00,
    inset 0 0 3px rgba(0, 255, 0, 0.2);

  /* Intensify glow on hover */
  text-shadow: 0 0 5px #00ff00;
}

#login-button:active {
  box-shadow:
    0 0 2px #00ff00,
    0 0 4px #00ff00,
    0 0 6px #00ff00,
    inset 0 0 5px rgba(0, 255, 0, 0.3);
}
