/* ================================================= */
/* 🌌 NEXUS LOGIN – RESPONSIVE STARFIELD UI          */
/* ================================================= */

:root {
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --deep: #05010f;
}

/* ---------- RESET ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", system-ui, sans-serif;
}

/* ================================================= */
/* 🌌 BODY + STARFIELD                               */
/* ================================================= */

body {
  min-height: 100svh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at top, #0b0324, #05010f 70%);
  color: #fff;
  overflow: hidden;
  position: relative;
  padding: 16px;
}

/* ⭐ STARFIELD */
body::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1px 1px at 10% 20%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 30% 40%, #c4b5fd, transparent),
    radial-gradient(1px 1px at 50% 70%, #fff, transparent),
    radial-gradient(2px 2px at 80% 30%, #a5f3fc, transparent),
    radial-gradient(1px 1px at 70% 80%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 90% 60%, #c4b5fd, transparent);
  background-size: 280px 280px;
  animation: starsMove 80s linear infinite;
  opacity: 0.85;
  z-index: 0;
}

/* ✨ CONSTELLATION */
body::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(139,92,246,0.18), transparent 70%),
    linear-gradient(240deg, rgba(34,211,238,0.18), transparent 70%);
  animation: linesFloat 35s ease-in-out infinite alternate;
  opacity: 0.55;
  z-index: 1;
}

@keyframes starsMove {
  to { background-position: 1400px 900px; }
}

@keyframes linesFloat {
  to { transform: translate(-6%, -8%); }
}

/* ================================================= */
/* 💠 LOGIN CONTAINER                                */
/* ================================================= */

.container {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 380px;
  padding: clamp(22px, 4vw, 36px);
  border-radius: 22px;
  background: rgba(15, 10, 40, 0.65);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(139,92,246,0.45);
  box-shadow:
    0 0 40px rgba(139,92,246,0.35),
    inset 0 0 20px rgba(34,211,238,0.15);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.container.hide {
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
}

/* ---------- TITLE ---------- */
.neon-text {
  text-align: center;
  font-size: clamp(22px, 5vw, 28px);
  margin-bottom: 18px;
  color: #e9d5ff;
  text-shadow:
    0 0 10px var(--violet),
    0 0 20px var(--cyan);
}

/* ---------- SWITCH ---------- */
.switch-btns {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.switch-btns button {
  flex: 1;
  padding: 10px;
  font-size: 14px;
  background: transparent;
  border-radius: 10px;
  border: 1px solid rgba(139,92,246,0.4);
  color: #c4b5fd;
  cursor: pointer;
}

/* ---------- FORMS ---------- */
form {
  display: none;
  flex-direction: column;
  gap: 14px;
}

form.active {
  display: flex;
}

/* ---------- INPUTS ---------- */
input {
  padding: 12px;
  font-size: 14px;
  border-radius: 12px;
  border: 1px solid rgba(139,92,246,0.4);
  background: rgba(5, 1, 15, 0.7);
  color: #fff;
}

input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}

/* ---------- BUTTON ---------- */
form button {
  padding: 12px;
  font-size: 15px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  font-weight: bold;
  cursor: pointer;
  color: #05010f;
}

/* ================================================= */
/* 🔄 LOGIN TRANSITION OVERLAY                       */
/* ================================================= */

#loginTransition {
  position: fixed;
  inset: 0;
  background: rgba(5, 1, 15, 0.6);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  z-index: 10;
}

#loginTransition.show {
  opacity: 1;
  pointer-events: all;
}

.transition-box {
  width: min(90%, 360px);
  background: rgba(15, 10, 40, 0.75);
  border-radius: 22px;
  padding: clamp(26px, 6vw, 40px);
  text-align: center;
  border: 1px solid rgba(139,92,246,0.45);
  box-shadow: 0 0 40px rgba(139,92,246,0.35);
}

.transition-box h3 {
  margin: 16px 0 6px;
  font-size: clamp(18px, 4vw, 20px);
}

.transition-box p {
  font-size: clamp(13px, 3.5vw, 14px);
  color: #c4b5fd;
}

/* ---------- SPINNER ---------- */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(139,92,246,0.3);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ================================================= */
/* 📱 EXTRA SMALL DEVICES                            */
/* ================================================= */
@media (max-width: 360px) {
  .switch-btns {
    flex-direction: column;
  }
}
