@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

body {
    background-color: #1a1a1a;
    background-image: url("background.gif");
    color: #00feff;
    font-family: 'Share Tech Mono', monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    overflow: hidden;
    position: relative;
}

body::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: repeating-linear-gradient(0deg, rgba(0,0,0,0) 0, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0) 100%);
    background-size: 100% 3px;
    opacity: 0.3;
    pointer-events: none;
    animation: scanlines 1s linear infinite;
}

a {
    color: #00feff;
}
.login-container {
    text-align: left;
    border: 2px solid #00feff;
    padding: 40px;
    background-color: #000;
    box-shadow: 0 0 20px rgba(0, 229, 229, 0.2);
    position: relative;
    z-index: 1;
    animation: text-glitch 0.7s infinite;
    max-width: 700px;
    width: 90vw;
}

label {
    display: block;
    margin-bottom: 10px;
    font-size: 1.2em;
    text-align: right;
}

h1.glitch {
    position: relative;
    text-align: center;
    font-size: 2.2em;
    overflow: hidden;
}
h1.glitch::before,
h1.glitch::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    width: 100%;
    clip: rect(0, 900px, 0, 0);
}
h1.glitch::before {
    animation: glitchTop 2.1s infinite linear alternate-reverse;
    color: #ff0000;
}
h1.glitch::after {
    animation: glitchBottom 5.1s infinite linear alternate-reverse;
    color: #0100ff;
}
@keyframes glitchTop {
    0% { clip: rect(0, 9999px, 0, 0); }
    5% { clip: rect(5px, 9999px, 20px, 0); left: -2px; }
    10% { clip: rect(10px, 9999px, 15px, 0); left: 2px; }
    15% { clip: rect(0, 9999px, 10px, 0); left: -1px; }
    20% { clip: rect(0, 9999px, 0, 0); left: 0; }
    100% { clip: rect(0, 9999px, 0, 0); left: 0; }
}
@keyframes glitchBottom {
    0% { clip: rect(0, 9999px, 0, 0); }
    5% { clip: rect(25px, 9999px, 40px, 0); left: 2px; }
    10% { clip: rect(20px, 9999px, 35px, 0); left: -2px; }
    15% { clip: rect(15px, 9999px, 30px, 0); left: 1px; }
    20% { clip: rect(0, 9999px, 0, 0); left: 0; }
    100% { clip: rect(0, 9999px, 0, 0); left: 0; }
}

label.glitch-label {
    position: relative;
    text-align: center;
    font-size: 1.8em;
    overflow: hidden;
}
label.glitch-label::before,
label.glitch-label::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    width: 100%;
    clip: rect(0, 900px, 0, 0);
}
label.glitch-label::before {
    animation: glitch3Top 2.7s infinite linear alternate-reverse;
    color: #ff0000;
}
label.glitch-label::after {
    animation: glitch3Bottom 3.9s infinite linear alternate-reverse;
    color: #0100ff;
}
@keyframes glitch3Top {
    0% { clip: rect(0, 9999px, 0, 0); }
    5% { clip: rect(5px, 9999px, 20px, 0); left: -2px; }
    10% { clip: rect(10px, 9999px, 15px, 0); left: 2px; }
    15% { clip: rect(0, 9999px, 10px, 0); left: -1px; }
    20% { clip: rect(0, 9999px, 0, 0); left: 0; }
    100% { clip: rect(0, 9999px, 0, 0); left: 0; }
}
@keyframes glitch3Bottom {
    0% { clip: rect(0, 9999px, 0, 0); }
    5% { clip: rect(25px, 9999px, 40px, 0); left: 2px; }
    10% { clip: rect(20px, 9999px, 35px, 0); left: -2px; }
    15% { clip: rect(15px, 9999px, 30px, 0); left: 1px; }
    20% { clip: rect(0, 9999px, 0, 0); left: 0; }
    100% { clip: rect(0, 9999px, 0, 0); left: 0; }
}

.logo {
    margin: 0 0 20px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#login-form {
    display: flex;
    flex-direction: column;
}

.pin-input-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-bottom: 20px;
}

.pin-input {
    width: 40px;
    height: 40px;
    margin: 5px 0;
    background: transparent;
    border: 2px solid #00feff;
    color: #00feff;
    font-size: 1.5em;
    text-align: center;
}

.pin-input:focus {
    outline: none;
    box-shadow: 0 0 10px #00feff;
}

.buttons {
    display: flex;
    flex-direction: column; /* stack vertically */
    align-items: flex-end;  /* align buttons to the end on the horizontal axis */
}

button {
    margin: 5px 0; /* add vertical spacing between buttons */
    background: transparent;
    border: 2px solid #00feff;
    color: #00feff;
    padding: 10px 20px;
    margin: 0 10px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s ease;
}

button:hover, button:focus {
    background: #00feff;
    color: #1a1a1a;
    box-shadow: 0 0 15px #00feff;
}

.message {
    margin-top: 15px;
    height: 20px;
    color: #ff3b3b;
}

.login-flex {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.login-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.login-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
}

.login-left h1 {
    text-align: left;
    margin-left: 0;
}


@media (max-width: 500px) {
  .login-container {
    max-width: 350px;
  }
    .login-left {
    flex-direction: row; /* arrange children logo and h1 horizontally */
    justify-content: center;
    align-items: center;
    width: 325px;
  }

  .login-left .logo {
    width: 40%;
    margin-right: 10px; /* spacing between logo and text */
  }
  .login-left img {
    width: 90%;
  }

  .login-left h1 {
    margin-left: 0;
    text-align: left;
    margin-left: 0;
    font-size: 1.8em; /* adjust font size if needed */
  }
}

@media (max-width: 500px) {
  .login-flex {
    flex-direction: column;
    align-items: center; /* center horizontally */
  }

  .login-left {
    align-items: center; /* center the logo and headings */
    margin-bottom: 10px; /* spacing below the logo/heading */
  }

  .title {
    display: flex;
    flex-direction: column;
  }

  .login-right {
    align-items: center;
  }
}