/* VyseXD login. Tokens, sky and controls mirror VyseXD_Site_V3's exhibit.css:
   violet-black void, painted nebula sky, wide italic Saira display type,
   plasma gradients and gradient-bordered panels. */
@font-face {
  font-family: "Saira";
  src: url("assets/fonts/saira-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 900;
  font-stretch: 75% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Saira";
  src: url("assets/fonts/saira-italic-latin.woff2") format("woff2");
  font-style: italic;
  font-weight: 300 900;
  font-stretch: 75% 125%;
  font-display: swap;
}

:root {
  --void: #06031a;
  --hull: #110b1d;
  --plasma: #c83ee8;
  --ultraviolet: #7b4dff;
  --signal: #87d9d0;
  --starlight: #f3eefb;
  --haze: #a197b8;
  --danger: #ff7a9c;
  --ex-line-strong: #b67cff40;
  --display: "Saira", Arial, sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
  letter-spacing: 0 !important;
}
[hidden] { display: none !important; }
html,
body {
  min-height: 100%;
}
body {
  margin: 0;
  background: var(--void);
  color: var(--starlight);
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button,
input {
  font: inherit;
  color: inherit;
}
::selection {
  background: var(--plasma);
  color: var(--void);
}
:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 4px;
}

/* ---------- Sky ---------- */
.site-sky {
  position: fixed;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 50%, #12073a 0%, transparent 70%),
    linear-gradient(180deg, #080426, var(--void) 60%, #0a0530);
}
.site-sky-nebula {
  position: absolute;
  inset: -10%;
  background: url("assets/sky/sky-nebula.webp") center / cover no-repeat;
  opacity: 0.75;
  will-change: transform;
  animation: nebula-drift 40s ease-in-out infinite alternate;
}
.site-sky-stars {
  position: absolute;
  inset: -50%;
  background: url("assets/sky/stars-near.png") 0 0 / 900px 900px;
  opacity: 0.75;
  will-change: translate, opacity;
  animation:
    star-drift 120s linear infinite,
    twinkle 5s ease-in-out infinite alternate;
}
.site-sky-stars.far {
  background-image: url("assets/sky/stars-far.png");
  background-size: 600px 600px;
  opacity: 0.55;
  animation:
    star-drift-far 200s linear infinite,
    twinkle 7s 2s ease-in-out infinite alternate;
}
.site-sky-meteor {
  position: absolute;
  width: 140px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, #7fb4ff99 60%, #e6f4ff);
  box-shadow: 0 0 10px #7fb4ff;
  rotate: 28deg;
  opacity: 0;
  animation: meteor 9s ease-in infinite;
}
.site-sky-meteor:nth-of-type(1) {
  top: 12%;
  left: 8%;
}
.site-sky-meteor:nth-of-type(2) {
  top: 46%;
  left: 52%;
  animation-delay: 3.4s;
  animation-duration: 11s;
}
.site-sky-meteor:nth-of-type(3) {
  top: 70%;
  left: 18%;
  animation-delay: 6.8s;
  animation-duration: 10s;
}

/* ---------- Layout ---------- */
.login {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 48px 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}
.brand img {
  width: 52px;
  height: auto;
  filter: drop-shadow(0 0 12px #b549ff99);
}
.brand-xd {
  color: var(--plasma);
}

/* Gradient-bordered panel, same construction as the site's feature tiles. */
.panel {
  position: relative;
  width: min(420px, 100%);
  padding: 1px;
  border-radius: 18px;
  background: linear-gradient(160deg, #e08bff, #6a3bb8 45%, #3b2266 70%, #a964ff);
  box-shadow:
    0 30px 70px #000a,
    0 0 60px #b44cff33;
  animation: panel-enter 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.panel-inner {
  padding: 38px 34px 34px;
  border-radius: 17px;
  background:
    radial-gradient(90% 60% at 50% 0%, #3a1a6299 0%, transparent 70%),
    linear-gradient(180deg, #170e26f2, #0d0817f2);
}

.display {
  margin: 0;
  font-family: var(--display);
  font-size: 40px;
  font-style: italic;
  font-weight: 800;
  font-stretch: 125%;
  font-variation-settings: "wdth" 125;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.plasma {
  padding-right: 0.08em;
  background: linear-gradient(90deg, #8f5cff, #d653ff 55%, #ff9ff0);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 14px #c83ee899);
}
.lede {
  margin: 12px 0 0;
  color: var(--haze);
  font-size: 15px;
}

/* ---------- Form ---------- */
.form {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}
.field {
  display: grid;
  gap: 7px;
}
.field label {
  font-size: 12px;
  font-weight: 600;
  font-stretch: 112%;
  font-variation-settings: "wdth" 112;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #d6cbe8;
}
.field input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--ex-line-strong);
  border-radius: 10px;
  background: #0d0817;
  font-size: 16px;
  transition:
    border-color 0.25s,
    box-shadow 0.25s;
}
.field input:hover {
  border-color: #b67cff70;
}
.field input:focus {
  outline: none;
  border-color: var(--plasma);
  box-shadow: 0 0 0 3px #c83ee833, 0 0 22px #c83ee833;
}
.field input[aria-invalid="true"] {
  border-color: var(--danger);
}
.field-error {
  min-height: 0;
  margin: 0;
  color: var(--danger);
  font-size: 13px;
}
.field-error:empty {
  display: none;
}

.password-wrap {
  position: relative;
}
.password-wrap input {
  padding-right: 76px;
}
.reveal {
  position: absolute;
  top: 50%;
  right: 6px;
  translate: 0 -50%;
  min-height: 36px;
  padding: 6px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #b9aed0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    color 0.25s,
    background 0.25s;
}
.reveal:hover {
  color: #fff;
  background: #ffffff0f;
}

/* ---------- Button ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  margin-top: 6px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  font-stretch: 112%;
  font-variation-settings: "wdth" 112;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  cursor: pointer;
  transition:
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s,
    opacity 0.3s;
}
.button-primary {
  background: linear-gradient(90deg, var(--ultraviolet), var(--plasma));
  box-shadow: 0 0 30px #c83ee866;
}
.button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 46px #d057ffb3;
}
.button svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal { width: 38px; height: 38px; padding: 9px; display: grid; place-items: center; }
.reveal svg { width: 20px; height: 20px; }
.button { text-decoration: none; }
.button:disabled, .icon-button:disabled { opacity: 0.5; cursor: default; transform: none; }
.full-width { width: 100%; }
.account-content { width: min(500px, 100%); min-width: 0; }
.account-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; color: var(--haze); }
#account-name { overflow-wrap: anywhere; min-width: 0; }
.account-content .display { font-size: 32px; line-height: 1.2; overflow-wrap: anywhere; }
.icon-button { width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center; border: 1px solid var(--ex-line-strong); border-radius: 6px; background: #ffffff08; cursor: pointer; }
.icon-button svg { width: 18px; height: 18px; }
.icon-button:hover { background: #ffffff15; }
.release-details { display: flex; gap: 18px; align-items: center; margin: 28px 0; padding: 24px 0; border-top: 1px solid var(--ex-line-strong); border-bottom: 1px solid var(--ex-line-strong); }
.release-icon { width: 32px; height: 32px; color: var(--signal); flex-shrink: 0; }
.release-copy { min-width: 0; }
.release-name { margin: 0; font-weight: 600; font-size: 18px; overflow-wrap: anywhere; }
.release-meta { margin: 4px 0 0; color: var(--haze); font-size: 14px; overflow-wrap: anywhere; }
.account-content .form-status { margin-top: 18px; }
dialog { width: min(440px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 26px; color: var(--starlight); background: #170e26; border: 1px solid #b67cff70; border-radius: 8px; box-shadow: 0 24px 70px #000a; }
dialog::backdrop { background: #030109c9; backdrop-filter: blur(6px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dialog-heading h2 { margin: 0; font-size: 24px; line-height: 1.3; }
dialog .button { margin-top: 24px; }
dialog .form-status { margin-top: 16px; overflow-wrap: anywhere; }
progress { display: block; width: 100%; height: 8px; margin-top: 20px; accent-color: var(--signal); }
.button-secondary { background: transparent; border-color: var(--ex-line-strong); }
.button:hover svg {
  transform: translateX(3px);
}
.button[aria-busy="true"] {
  cursor: progress;
  opacity: 0.7;
  transform: none;
}

.form-status {
  margin: 0;
  font-size: 14px;
  text-align: center;
  color: var(--haze);
}
.form-status:empty {
  display: none;
}
.form-status.is-error {
  color: var(--danger);
}

/* ---------- Motion ---------- */
@keyframes panel-enter {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
}
@keyframes twinkle {
  to {
    opacity: 0.4;
  }
}
@keyframes nebula-drift {
  to {
    transform: translate(4%, -3%) rotate(3deg) scale(1.05);
  }
}
@keyframes meteor {
  0%,
  86% {
    opacity: 0;
    transform: translateX(0);
  }
  88% {
    opacity: 1;
  }
  96%,
  100% {
    opacity: 0;
    transform: translateX(420px);
  }
}
/* Drift by exactly one tile so the loop is seamless. */
@keyframes star-drift {
  to {
    translate: 900px 900px;
  }
}
@keyframes star-drift-far {
  to {
    translate: -600px 600px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .site-sky-meteor {
    display: none;
  }
}

@media (max-width: 480px) {
  .login {
    justify-content: flex-start;
    padding-top: 40px;
  }
  .panel-inner {
    padding: 30px 22px 26px;
  }
  .display {
    font-size: 34px;
  }
}
