html, body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  overflow: hidden;
  background: #050302;
  color-scheme: dark;
}

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #050302 url("assets/accretion.jpg") center / cover no-repeat;
}

.scene video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

@media (max-aspect-ratio: 3/4) {
  .scene {
    background-image: url("assets/accretion-mobile.jpg");
  }
}

@media (max-aspect-ratio: 9/20) {
  .scene video {
    object-fit: contain;
    background-color: #050302;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scene video {
    display: none;
  }
}


.auth {
  position: fixed;
  top: clamp(22px, 9vh, 100px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  padding: 4px;
  border: 1px solid #34506b;
  border-radius: 30px;
  background: #060e17ed;
}
.auth button {
  position: relative;
  width: 98px;
  height: 44px;
  border: 0;
  border-radius: 24px;
  background: transparent;
  color: #d9eaff;
  cursor: pointer;
  font: 550 14px system-ui,sans-serif;
}
.auth button:hover, .auth button[aria-expanded="true"] { background: #172c40; color: white; }
.auth button:focus-visible { outline: 2px solid #a9d0f5; }
.auth::after {
  position: absolute;
  content: "";
  pointer-events: none;
  left: 37px;
  bottom: 4px;
  width: 32px;
  height: 2px;
  background: linear-gradient(90deg,transparent,#aae2ff,transparent);
  transform: translateX(49px);
  transition: transform 220ms ease-out;
}
.auth:has(button:first-child:is(:hover,:focus-visible,[aria-expanded="true"]))::after { transform: translateX(0); }
.auth:has(button:last-child:is(:hover,:focus-visible,[aria-expanded="true"]))::after { transform: translateX(98px); }
.account-panel {
  box-sizing: border-box;
  position: fixed;
  z-index: 1;
  top: clamp(22px,9vh,100px);
  width: min(284px,calc(100vw - 32px));
  max-height: 80dvh;
  overflow: auto;
  padding: 20px;
  border: 1px solid #31475c;
  border-radius: 16px;
  background: #08111deb;
}
.signup-panel { right: calc(50% + 120px); }
.login-panel { left: calc(50% + 120px); }
.providers { margin:0; padding:0 0 14px; min-width:0; border:0; border-bottom:1px solid #28394a; }
.providers legend { padding:0 0 8px; color:#c8def2; font:500 12px system-ui,sans-serif; }
.providers div { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; }
.providers button { display:grid; justify-items:center; padding:5px; border:1px solid #30475c; border-radius:9px; background:#091421; color:#d7edff; font:12px system-ui,sans-serif; cursor:pointer; }
.providers svg { width:42px; height:32px; }
.providers button:hover { border-color:#87b6df; }
.recovery { display:flex; flex-wrap:wrap; justify-content:space-between; gap:4px; }
.recovery button { border:0; background:none; color:#b2d6f5; font:12px system-ui,sans-serif; padding:6px 0; cursor:pointer; }
.recovery button:hover { text-decoration:underline; }
@media(max-width:850px) {
  .account-panel { inset-inline: 0; margin-inline:auto; top:calc(clamp(22px,9vh,100px) + 64px); max-height:calc(90dvh - 85px); }
}
@media(prefers-reduced-motion:no-preference) {
  .account-panel:not([hidden]) { animation: reveal 180ms ease-out; }
  @keyframes reveal { from { transform:translateY(-5px); opacity:0; } }
}
@media(prefers-reduced-motion:reduce) { .auth::after { transition:none; } }
.account-form output { color:#bdd5ed; font:13px/1.5 system-ui,sans-serif; }
.account-form output:empty { display:none; }
.account-form {
  display: grid;
  gap: 12px;
}

.account-form > label:not(.check-option) {
  display: grid;
  gap: 5px;
  color: rgba(216, 236, 255, 0.78);
  font: 500 10px/1.2 system-ui, sans-serif;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.account-form input:not([type="checkbox"]) {
  width: 100%;
  min-width: 0;
  height: 38px;
  box-sizing: border-box;
  border: 1px solid rgba(122, 178, 234, 0.36);
  border-radius: 7px;
  outline: none;
  background: rgba(0, 5, 10, 0.46);
  color: #eaf6ff;
  padding: 0 11px;
  font: 400 16px/1 system-ui, sans-serif;
  caret-color: #a9d0f5;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.account-form input:not([type="checkbox"]):focus {
  border-color: #7ab2ea;
  background: rgba(2, 13, 23, 0.62);
  box-shadow: 0 0 0 3px rgba(79, 147, 219, 0.12);
}

.form-submit {
  min-height: 38px;
  border: 1px solid rgba(122, 178, 234, 0.62);
  border-radius: 7px;
  background: linear-gradient(120deg, rgba(18, 58, 122, 0.62), rgba(47, 116, 198, 0.42));
  color: #edf8ff;
  font: 600 11px/1 system-ui, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.form-submit:hover { border-color: #a9d0f5; background-color: rgba(47, 116, 198, 0.42); }
.form-submit:active { transform: translateY(1px); }
.form-submit:focus-visible,
.text-action:focus-visible { outline: 1px solid #a9d0f5; outline-offset: 3px; }
