
:root {
  --bg: #030610;
  --cyan: #69f6ff;
  --blue: #5575ff;
  --purple: #bd65ff;
  --text: #eafaff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
}

/* Cosmic background */

.space {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(
      ellipse at 50% 45%,
      #111c43 0%,
      #080d21 36%,
      #030610 72%
    );
}

.space::before,
.space::after {
  content: "";
  position: absolute;
  inset: -50%;
  background: repeating-conic-gradient(
    from 0deg at 50% 50%,
    transparent 0deg 9deg,
    #5575ff09 10deg 10.3deg,
    transparent 11deg 20deg
  );
  animation: rotate 100s linear infinite;
}

.space::after {
  background: radial-gradient(
    ellipse at center,
    transparent 20%,
    #030610 72%
  );
  animation: none;
}

@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}

/* Stars */

#stars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Portal */

.portal-wrap {
  position: relative;
  width: min(92vw, 390px);
  z-index: 2;
  text-align: center;
  animation: appear 1.4s ease both;
}

@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.portal {
  position: relative;
  width: 230px;
  height: 230px;
  margin: 0 auto 30px;
  display: grid;
  place-items: center;
}

.ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid #69f6ff65;
  box-shadow:
    0 0 18px #287dff30,
    inset 0 0 24px #287dff20;
  animation: breathe 4s ease-in-out infinite;
}

.ring:nth-child(2) {
  inset: 12px;
  border-color: #bd65ff80;
  border-style: dashed;
  animation: spin 35s linear infinite;
}

.ring:nth-child(3) {
  inset: 26px;
  border-color: #69f6ff70;
  border-width: 2px;
  border-top-color: transparent;
  border-bottom-color: transparent;
  animation: spin 12s linear infinite reverse;
}

.ring:nth-child(4) {
  inset: 42px;
  border-color: #5575ff80;
  box-shadow: 0 0 35px #5575ff20;
}

.core {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 30%,
    #ffffff,
    #69f6ff 8%,
    #4166ff 30%,
    #6b32cc 55%,
    #080d21 75%
  );
  box-shadow:
    0 0 20px #69f6ff80,
    0 0 60px #5575ff70,
    0 0 110px #8c45ff35;
  animation: corePulse 4s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes breathe {
  50% {
    transform: scale(1.035);
    opacity: .6;
  }
}

@keyframes corePulse {
  50% {
    transform: scale(1.06);
    filter: hue-rotate(20deg);
  }
}

/* Typography */

.brand {
  font-size: 12px;
  letter-spacing: 8px;
  color: var(--cyan);
  margin-left: 8px;
  text-shadow: 0 0 16px #69f6ff80;
}

h1 {
  font-size: clamp(30px, 8vw, 42px);
  font-weight: 200;
  letter-spacing: 8px;
  margin: 12px 0;
}

.subtitle {
  font-size: 10px;
  letter-spacing: 3px;
  color: #9caed1;
  margin-bottom: 30px;
}

/* Login panel */

.login {
  padding: 25px;
  border: 1px solid #7b9dff28;
  border-radius: 3px;
  background: #09102280;
  box-shadow: 0 15px 60px #0005;
}

.field {
  display: block;
  width: 100%;
  margin-bottom: 12px;
  padding: 14px 15px;
  border: 1px solid #7996c52d;
  border-radius: 2px;
  outline: none;
  background: #030713b8;
  color: white;
  font-size: 12px;
  letter-spacing: 1px;
  transition: border-color .25s;
}

.field:focus {
  border-color: var(--cyan);
}

.field::placeholder {
  color: #7484a3;
  letter-spacing: 2px;
}

button {
  position: relative;
  width: 100%;
  padding: 15px;
  border: 1px solid #69f6ff8c;
  border-radius: 2px;
  background: linear-gradient(
    100deg,
    #173a67,
    #29205b,
    #173a67
  );
  background-size: 200% 100%;
  color: white;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 4px;
  cursor: pointer;
  transition: .3s;
}

button:hover {
  background-position: 100% 0;
  box-shadow: 0 0 25px #5575ff30;
  border-color: var(--cyan);
}

.status {
  min-height: 18px;
  margin-top: 16px;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--cyan);
}

.footer {
  margin-top: 22px;
  color: #63718e;
  font-size: 9px;
  letter-spacing: 2px;
}

.coordinates {
  position: fixed;
  bottom: 20px;
  left: 22px;
  color: #7e91b3;
  font: 9px monospace;
  line-height: 1.8;
  opacity: .65;
}

.signal {
  position: fixed;
  top: 22px;
  right: 22px;
  font: 10px monospace;
  letter-spacing: 2px;
  color: #69f6ff;
}

.signal::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: #69f6ff;
  box-shadow: 0 0 10px #69f6ff;
}

/* Responsive */

@media (max-height: 700px) {
  .portal {
    width: 150px;
    height: 150px;
    margin-bottom: 20px;
  }

  .core {
    width: 76px;
    height: 76px;
  }

  .subtitle {
    margin-bottom: 18px;
  }

  .login {
    padding: 16px;
  }

  .field {
    padding: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
