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

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}
body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #1f293a;
}
.container {
  position: relative;
  width: 256px;
  height: 256px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.container span {
  position: absolute;
  left: 0;
  width: 32px;
  height: 6px;
  background: #2c4766;
  border-radius: 8px;
  transform-origin: 128px;
  transform: scale(2.2) rotate(calc(var(--i) * (360deg / 50)));
  animation: animateBlink 3s linear infinite;
  animation-delay: calc(var(--i) * (3s / 50));
}

.login-box {
  position: absolute;
  width: 400px;
}
.login-box form {
  width: 100%;
  padding: 0 50px;
}
h2 {
  font-size: 2em;
  color: #0ef;
  text-align: center;
}
.input-box {
  position: relative;
  margin: 25px 0;
}
.input-box input {
  width: 100%;
  height: 50px;
  background: transparent;
  border: 2px solid #2c4766;
  outline: none;
  border-radius: 40px;
  font-size: 1em;
  color: #fff;
  padding: 0 20px;
  transition: 0.5s ease;
}
.input-box input:focus,
.input-box input:valid {
  border-color: #0ef;
}
.input-box label {
  position: absolute;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  font-size: 1em;
  color: #fff;
  pointer-events: none;
  transition: 0.5s ease;
}
.input-box input:focus ~ label,
.input-box input:valid ~ label {
  top: 1px;
  font-size: 0.8em;
  background: #1f293a;
  padding: 0 6px;
  color: #0ef;
}
.forgot-pass {
  margin: -15px 0 10px;
  text-align: center;
}
.forgot-pass a {
  font-size: 0.85em;
  color: #fff;
  text-decoration: none;
}
.forgot-pass a:hover {
  text-decoration: underline;
}
.btn {
  width: 100%;
  height: 45px;
  background: #0ef;
  border: none;
  outline: none;
  border-radius: 40px;
  cursor: pointer;
  font-size: 1em;
  color: #1f293a;
  font-weight: 600;
}
.signup-link {
  margin: 20px 0 10px;
  text-align: center;
}
.signup-link a {
  font-size: 1em;
  color: #0ef;
  text-decoration: none;
  font-weight: 600;
}
.signup-link a:hover {
  text-decoration: underline;
}

@keyframes animateBlink {
  0% {
    background: #0ef;
  }
  25% {
    background: #2c4766;
  }
}

/* Scale the original 564px composition uniformly; never stretch the ring. */
:root { --auth-scale:1; }
body { padding:8px; min-height:100vh; min-height:100svh; overflow-x:hidden; overflow-y:auto; }
.auth-stage { position:relative; flex-shrink:0; width:calc(564px * var(--auth-scale)); height:calc(564px * var(--auth-scale)); margin:auto; }
.original-login .container { position:absolute; left:50%; top:50%; width:256px; height:256px; transform:translate(-50%,-50%) scale(var(--auth-scale)); }
.container span { pointer-events:none; }
.login-box { z-index:1; }
.input-box input:not(:placeholder-shown) ~ label { top:1px; font-size:.8em; background:#1f293a; padding:0 6px; color:#0ef; }
.form-note { color:#fff; text-align:center; font-size:.8em; margin:10px 0; }
.secondary-actions { display:flex; gap:10px; margin-top:12px; }
.secondary-actions .btn { font-size:.8em; }
.alert { color:#fff; padding:10px; border:1px solid #0ef; border-radius:12px; margin:12px 0; overflow-wrap:anywhere; }
body.signup-page { padding:32px 12px; }
.signup-page .auth-stage { width:440px; max-width:100%; height:auto; }
.signup-page .container { width:100%; height:auto; }
.signup-page .login-box { position:relative; width:100%; }
.signup-page .login-box form { padding:0 32px; }
.signup-page .auth-ring { position:absolute; top:50%; left:50%; width:256px; height:256px; transform:translate(-50%,-50%) scale(var(--auth-scale)); pointer-events:none; }
.signup-page .input-box input,.signup-page .input-box select { background:#1f293a; font-size:16px; }
.input-box select { width:100%; height:50px; border:2px solid #2c4766; border-radius:40px; padding:0 20px; background:#1f293a; color:#fff; font:inherit; }
.select-group label { top:0; font-size:.8em; background:#1f293a; padding:0 6px; color:#0ef; }
@media(prefers-reduced-motion:reduce) { .container span { animation:none; } }
