/* Asterion Auth — refined premium portal (ONLY #boot.is-auth) */
@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500&family=Outfit:wght@400;500;600;700&display=swap");

#boot.is-auth {
  --lx-ink: #04060b;
  --lx-text: #f8f6f2;
  --lx-mute: #a8a59e;
  --lx-line: rgba(248, 246, 242, 0.14);
  --lx-gold: #ecd3a4;
  --lx-gold-soft: rgba(236, 211, 164, 0.35);
  --lx-green: #3dff8a;
  --lx-serif: "Cormorant Garamond", Georgia, serif;
  --lx-ui: "Outfit", system-ui, sans-serif;
  grid-template-rows: 1fr;
  overflow: hidden;
  background: var(--lx-ink);
}

#boot.is-auth .station-top { display: none !important; }

#boot.is-auth .station-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 100%;
  width: 100%;
  padding: clamp(20px, 4vh, 40px) 18px;
  overflow: auto;
  position: relative;
  z-index: 2;
  box-sizing: border-box;
}

#boot.is-lobby .station-shell { display: block; }

#boot.is-auth .station-bg {
  background:
    radial-gradient(ellipse 70% 55% at 50% 35%, rgba(70, 110, 170, 0.18), transparent 60%),
    linear-gradient(180deg, rgba(4, 6, 11, 0.35) 0%, rgba(4, 6, 11, 0.55) 50%, rgba(4, 6, 11, 0.82) 100%),
    url("/assets/ui/asterion-luxe-v2.jpg") center/cover no-repeat;
  transform: scale(1.04);
  filter: saturate(1.05) contrast(1.04) brightness(0.9);
  animation: lxDrift 65s ease-in-out infinite alternate;
}

#boot.is-auth .station-stars { opacity: 0.15; }
#boot.is-auth .station-flare { display: none !important; }

#boot.is-auth .station-vignette {
  background: radial-gradient(ellipse 75% 70% at 50% 42%, transparent 0%, rgba(4, 6, 11, 0.4) 65%, rgba(4, 6, 11, 0.9) 100%);
  z-index: 1;
}

#boot.is-lobby .auth-stage { display: none !important; }

@keyframes lxDrift {
  from { transform: scale(1.03) translate3d(0, 0, 0); }
  to { transform: scale(1.07) translate3d(0, -0.7%, 0); }
}
@keyframes lxIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}
@keyframes lxGlow {
  from { box-shadow: 0 0 0 1px rgba(236, 211, 164, 0.15), 0 0 28px rgba(236, 211, 164, 0.12); }
  to { box-shadow: 0 0 0 1px rgba(236, 211, 164, 0.28), 0 0 42px rgba(236, 211, 164, 0.22); }
}

/* Single beautiful panel */
#boot.is-auth .auth-stage {
  width: min(440px, 100%);
  margin: 0 auto;
  padding: 0;
  display: block;
  animation: lxIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

#boot.is-auth .auth-stage__brand { display: none !important; }
#boot.is-auth .auth-stage__form { width: 100%; }

#boot.is-auth .auth-portal {
  width: 100%;
  max-width: none;
  margin: 0;
  animation: none;
}
#boot.is-auth .auth-portal__orb { display: none !important; }

#boot.is-auth .auth-portal__card {
  position: relative;
  padding: 40px 36px 34px;
  text-align: center;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.09) 0%, transparent 38%),
    rgba(10, 13, 22, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  box-shadow:
    0 50px 100px rgba(0, 0, 0, 0.55),
    0 0 80px rgba(236, 211, 164, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(28px) saturate(1.2);
  -webkit-backdrop-filter: blur(28px) saturate(1.2);
  overflow: hidden;
  clip-path: none;
}

#boot.is-auth .auth-portal__card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(236, 211, 164, 0.65), transparent);
  pointer-events: none;
  padding: 0;
  border-radius: 0;
  -webkit-mask: none;
  mask: none;
}

#boot.is-auth .auth-portal__card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.35), transparent 40%, transparent 70%, rgba(236, 211, 164, 0.25));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

#boot.is-auth .auth-portal__brand {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

#boot.is-auth .auth-portal__logo {
  display: grid !important;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 6px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, rgba(236, 211, 164, 0.35), transparent 55%),
    rgba(6, 9, 16, 0.9);
  border: 1px solid rgba(236, 211, 164, 0.35);
  animation: lxGlow 4.5s ease-in-out infinite alternate;
}

#boot.is-auth .auth-portal__logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(236, 211, 164, 0.45));
}

#boot.is-auth .auth-portal__brand h1 {
  margin: 0;
  font-family: var(--lx-serif);
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--lx-text);
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  line-height: 1.05;
}

#boot.is-auth .auth-portal__tagline {
  display: block !important;
  margin: 0;
  font-family: var(--lx-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--lx-gold);
}

#boot.is-auth .auth-portal .tabs {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0 0 24px;
  padding: 5px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--lx-line);
  border-radius: 14px;
}

#boot.is-auth .auth-portal .tab {
  border: 0;
  border-radius: 10px;
  padding: 12px 8px;
  background: transparent;
  color: rgba(248, 246, 242, 0.42);
  font-family: var(--lx-ui);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  box-shadow: none;
  border-bottom: 0;
  margin-bottom: 0;
  transition: color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

#boot.is-auth .auth-portal .tab + .tab { border-left: 0; }

#boot.is-auth .auth-portal .tab:hover {
  color: var(--lx-text);
  background: rgba(255, 255, 255, 0.04);
}

#boot.is-auth .auth-portal .tab.active {
  color: #1a1510;
  background: linear-gradient(180deg, #f5e4c0, var(--lx-gold));
  border-bottom-color: transparent;
  box-shadow: 0 8px 20px rgba(236, 211, 164, 0.28);
}

#boot.is-auth .auth-portal form {
  position: relative;
  z-index: 1;
  gap: 16px;
  text-align: left;
}

#boot.is-auth .auth-portal__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

#boot.is-auth .auth-portal .field {
  text-align: left;
  gap: 8px;
}

#boot.is-auth .auth-portal .field > span {
  font-family: var(--lx-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(248, 246, 242, 0.5);
}

#boot.is-auth .auth-portal .field > span em {
  font-style: normal;
  opacity: 0.75;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

#boot.is-auth .auth-portal input {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 14px 14px;
  font: 500 1.02rem var(--lx-ui);
  color: var(--lx-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

#boot.is-auth .auth-portal input:hover {
  border-color: rgba(236, 211, 164, 0.35);
  background: rgba(0, 0, 0, 0.34);
}

#boot.is-auth .auth-portal input:focus {
  outline: none;
  border-color: rgba(236, 211, 164, 0.65);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 3px rgba(236, 211, 164, 0.12);
}

#boot.is-auth .auth-portal input::placeholder {
  color: rgba(248, 246, 242, 0.28);
}

#boot.is-auth .auth-portal .btn-enter {
  margin-top: 8px;
  border: 0;
  border-radius: 12px;
  padding: 16px 18px;
  color: #1a1510;
  background: linear-gradient(135deg, #f7e8c4 0%, var(--lx-gold) 50%, #d4b07a 100%);
  font-family: var(--lx-ui);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: none;
  box-shadow: 0 14px 36px rgba(236, 211, 164, 0.28);
  clip-path: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

#boot.is-auth .auth-portal .btn-enter:hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
  color: #1a1510;
  background: linear-gradient(135deg, #fff0d0 0%, #f0d9ae 50%, #e0c08a 100%);
  border-color: transparent;
  box-shadow: 0 18px 42px rgba(236, 211, 164, 0.36);
}

#boot.is-auth .auth-portal .faction-pick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  border: 0;
}

#boot.is-auth .auth-portal .faction-pick legend {
  font-family: var(--lx-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(248, 246, 242, 0.5);
  margin-bottom: 8px;
}

#boot.is-auth .auth-portal .faction-opt {
  padding: 10px 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  box-shadow: none;
  font-family: var(--lx-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(248, 246, 242, 0.6);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

#boot.is-auth .auth-portal .faction-opt .faction-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 50%;
  margin-bottom: 6px;
  pointer-events: none;
}

#boot.is-auth .auth-portal .faction-opt:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

#boot.is-auth .auth-portal .faction-opt:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.28);
}

#boot.is-auth .auth-portal .faction-opt::before { display: none !important; }

#boot.is-auth .auth-portal .faction-opt:not(.is-selected):not(:has(input:checked)) {
  color: rgba(248, 246, 242, 0.6) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  background: rgba(0, 0, 0, 0.22) !important;
  box-shadow: none !important;
}

#boot.is-auth .auth-portal .faction-opt:has(input:checked),
#boot.is-auth .auth-portal .faction-opt.is-selected {
  border-color: var(--lx-green) !important;
  background: rgba(61, 255, 138, 0.16) !important;
  color: var(--lx-green) !important;
  box-shadow: 0 0 18px rgba(61, 255, 138, 0.28) !important;
}

#boot.is-auth .auth-portal #auth-error {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 130, 130, 0.3);
  background: rgba(255, 70, 80, 0.1);
  font-family: var(--lx-ui);
  font-size: 0.88rem;
  text-align: center;
  color: #ffb4b4;
  box-shadow: none;
}

#boot.is-auth .auth-portal #auth-error:empty {
  display: none;
  padding: 0;
  border: 0;
}

@media (max-width: 520px) {
  #boot.is-auth .auth-portal__card {
    padding: 30px 22px 26px;
    border-radius: 22px;
  }
  #boot.is-auth .auth-portal__row {
    grid-template-columns: 1fr;
  }
  #boot.is-auth .auth-portal__brand h1 {
    font-size: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  #boot.is-auth .station-bg,
  #boot.is-auth .auth-stage,
  #boot.is-auth .auth-portal__logo {
    animation: none;
  }
  #boot.is-auth .auth-portal .btn-enter:hover {
    transform: none;
  }
}
