@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&display=swap');

/* ── Reset & Base ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Quicksand', sans-serif;
}

/* ── Body ── */
body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #000;
}

/* ── Background Grid Section ── */
section {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  overflow: hidden;
}

section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(#000, #0f0, #000);
  animation: scanline 5s linear infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes scanline {
  from { transform: translateY(-100%); }
  to   { transform: translateY(100%); }
}

/* ── Grid Spans ── */
section span {
  position: relative;
  display: block;
  width: calc(6.25vw - 2px);
  height: calc(6.25vw - 2px);
  background: #181818;
  z-index: 2;
  transition: background 1.5s;
}

section span:hover {
  background: #0f0;
  transition: background 0s;
}

/* ── Sign-in Card ── */
.signin {
  position: absolute;
  width: min(400px, 90vw);
  background: #222;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  border-radius: 4px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.9);
}

.signin .content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.signin .content h2 {
  font-size: 2em;
  color: #0f0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Form ── */
.form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

/* ── Input Box ── */
.inputBox {
  position: relative;
  width: 100%;
}

.inputBox input {
  width: 100%;
  background: #333;
  border: none;
  outline: none;
  padding: 25px 10px 7.5px;
  border-radius: 4px;
  color: #fff;
  font-weight: 500;
  font-size: 1em;
  transition: background 0.3s;
}

.inputBox i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-style: normal;
  color: #aaa;
  transition: transform 0.3s, font-size 0.3s, color 0.3s;
  pointer-events: none;
}

.inputBox input:focus ~ i,
.inputBox input:valid ~ i {
  transform: translateY(-14px);
  font-size: 0.8em;
  color: #fff;
}

/* ── Links ── */
.form .links {
  width: 100%;
  display: flex;
  justify-content: space-between;
}

.form .links a {
  color: #fff;
  text-decoration: none;
}

.form .links a:last-child {
  color: #0f0;
  font-weight: 600;
}

/* ── Submit Button ── */
.inputBox input[type="submit"] {
  padding: 10px;
  background: #0f0;
  color: #000;
  font-weight: 600;
  font-size: 1.35em;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: opacity 0.2s;
}

.inputBox input[type="submit"]:active {
  opacity: 0.6;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  section span {
    width: calc(10vw - 2px);
    height: calc(10vw - 2px);
  }
}

@media (max-width: 600px) {
  section span {
    width: calc(20vw - 2px);
    height: calc(20vw - 2px);
  }

  .signin {
    padding: 30px 24px;
  }

  .signin .content h2 {
    font-size: 1.5em;
  }
}
