@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@500;600;700;800;900&display=swap");

:root {
  color-scheme: dark;
  --night: #140831;
  --panel: #241052;
  --white: #fff9ff;
  --muted: #a99bc9;
  --cyan: #20d9f7;
  --pink: #ff3ca8;
  --lime: #8dec28;
  --yellow: #ffd42b;
  --violet: #914fff;
  --line: rgb(199 173 255 / 19%);
  --danger: #ff7295;
  --success: #8bec6a;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--night); color: var(--white); font-family: "Nunito", ui-rounded, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
a { color: inherit; }

.auth-shell { min-height: 100dvh; display: grid; grid-template-columns: minmax(430px, .95fr) minmax(520px, 1.05fr); }
.auth-scene { position: relative; min-height: 100dvh; overflow: hidden; isolation: isolate; background: radial-gradient(circle at 50% 44%, #3a1682, #1b0a43 58%, #110628); }
.auth-scene::before { content: ""; position: absolute; z-index: 2; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgb(10 2 35 / 10%), transparent 44%, rgb(12 3 38 / 88%)); }
.auth-scene::after { content: ""; position: absolute; z-index: 1; inset: 0; opacity: .25; background-image: radial-gradient(circle, #fff 1px, transparent 1.5px); background-size: 38px 38px; mask-image: linear-gradient(#000, transparent 82%); }
.auth-brand { position: absolute; z-index: 6; top: 26px; left: 32px; display: inline-flex; text-decoration: none; }
.auth-brand img { width: 206px; height: auto; display: block; filter: drop-shadow(0 12px 25px rgb(5 0 27 / 45%)); }

.auth-mascot { position: absolute; z-index: 4; inset: 12% 0 auto; height: 50%; display: grid; place-items: center; }
.auth-mascot span { position: absolute; width: min(28vw, 390px); aspect-ratio: 1; border: 1px solid rgb(77 229 250 / 34%); border-radius: 50%; background: radial-gradient(circle, rgb(31 215 246 / 24%), transparent 63%); box-shadow: 0 0 120px rgb(36 209 244 / 18%), inset 0 0 70px rgb(124 73 255 / 20%); }
.auth-mascot img { position: relative; z-index: 1; width: min(25vw, 330px); height: auto; filter: drop-shadow(0 26px 36px rgb(3 0 24 / 45%)); animation: axo-float 4s ease-in-out infinite; }
.auth-bubbles { position: absolute; z-index: 3; inset: 0; pointer-events: none; }
.auth-bubble { position: absolute; display: block; border: 2px solid rgb(255 255 255 / 40%); border-radius: 50%; box-shadow: inset -13px -16px 23px rgb(39 8 85 / 30%), inset 8px 9px 14px rgb(255 255 255 / 38%), 0 17px 25px rgb(4 0 26 / 25%); animation: bubble-float 5s ease-in-out infinite; }
.auth-bubble::after { content: ""; position: absolute; width: 24%; height: 14%; left: 22%; top: 16%; border-radius: 50%; background: rgb(255 255 255 / 78%); transform: rotate(-25deg); }
.auth-bubble--cyan { width: 92px; height: 92px; left: 7%; top: 27%; background: linear-gradient(145deg, #90f8ff, #18d7f4 45%, #087be6); }
.auth-bubble--pink { width: 66px; height: 66px; right: 11%; top: 20%; background: linear-gradient(145deg, #ffb6e0, #ff3da9 45%, #c71080); animation-delay: -.9s; }
.auth-bubble--lime { width: 48px; height: 48px; left: 18%; top: 60%; background: linear-gradient(145deg, #e7ffa2, #8dec27 45%, #42b717); animation-delay: -2s; }
.auth-bubble--yellow { width: 78px; height: 78px; right: 7%; top: 54%; background: linear-gradient(145deg, #fff6ad, #ffd52b 45%, #e98d12); animation-delay: -1.4s; }
.auth-bubble--violet { width: 41px; height: 41px; left: 8%; top: 14%; background: linear-gradient(145deg, #d3b5ff, #914dff 45%, #4f1cc1); animation-delay: -2.8s; }

.auth-scene__copy { position: absolute; z-index: 6; left: 40px; right: 40px; bottom: 106px; max-width: 570px; }
.auth-scene__copy > p { margin: 0 0 13px; display: flex; align-items: center; gap: 9px; color: #6fe9fc; font-size: 10px; font-weight: 950; letter-spacing: .16em; }
.auth-scene__copy > p i { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 13px var(--lime); }
.auth-scene__copy h1 { margin: 0; font-size: clamp(3.4rem, 5.8vw, 6rem); line-height: .98; letter-spacing: -.05em; font-weight: 950; text-shadow: 0 14px 38px rgb(4 0 25 / 40%); }
.auth-scene__copy h1 em { color: transparent; background: linear-gradient(90deg, var(--cyan), var(--lime) 44%, var(--yellow) 70%, var(--pink)); -webkit-background-clip: text; background-clip: text; font-style: normal; }
.auth-scene__copy > span { display: block; max-width: 470px; margin-top: 20px; color: #d3c9e9; font-size: 16px; line-height: 1.55; }
.auth-scene__metric { position: absolute; z-index: 7; right: 25px; bottom: 25px; padding: 12px 15px; border: 1px solid rgb(255 255 255 / 17%); border-radius: 16px; background: rgb(27 8 69 / 69%); backdrop-filter: blur(13px); }
.auth-scene__metric small, .auth-scene__metric strong { display: block; }
.auth-scene__metric small { color: #8d75bf; font-size: 7px; font-weight: 950; letter-spacing: .14em; }
.auth-scene__metric strong { margin-top: 3px; font-size: 11px; }

.auth-panel { position: relative; min-height: 100dvh; padding: 40px clamp(28px, 7vw, 100px); display: grid; align-items: center; overflow: hidden; background: radial-gradient(circle at 100% 0, rgb(255 57 168 / 12%), transparent 31rem), radial-gradient(circle at 0 100%, rgb(29 216 247 / 10%), transparent 28rem), var(--night); }
.auth-panel::before { content: ""; position: absolute; inset: 0; opacity: .24; pointer-events: none; background-image: linear-gradient(rgb(185 154 255 / 5%) 1px, transparent 1px), linear-gradient(90deg, rgb(185 154 255 / 5%) 1px, transparent 1px); background-size: 40px 40px; mask-image: linear-gradient(90deg, transparent, #000); }
.auth-back { position: absolute; z-index: 2; top: 30px; right: 38px; display: inline-flex; align-items: center; gap: 8px; color: #a79ac4; font-size: 13px; font-weight: 800; text-decoration: none; }
.auth-back span { color: var(--cyan); font-size: 19px; }
.auth-panel__inner { position: relative; z-index: 1; width: min(100%, 510px); margin: 45px auto 20px; }
.auth-panel__inner--register { width: min(100%, 650px); }
.auth-kicker { margin: 0 0 11px; color: var(--cyan); font-size: 10px; font-weight: 950; letter-spacing: .17em; }
.auth-panel h2 { margin: 0; font-size: clamp(2.2rem, 4vw, 3.65rem); line-height: .96; letter-spacing: -.05em; font-weight: 950; }
.auth-lead { margin: 13px 0 29px; color: var(--muted); font-size: 15px; }

.auth-form { display: grid; gap: 17px; }
.auth-form--register { grid-template-columns: 1fr 1fr; align-items: start; column-gap: 13px; }
.auth-field { display: grid; gap: 7px; }
.auth-field--wide { grid-column: 1 / -1; }
.auth-field label { color: #d9d0ed; font-size: 12px; font-weight: 850; }
.auth-field label span { color: #78669f; }
.auth-label-row { display: flex; justify-content: space-between; gap: 12px; }
.auth-label-row span { color: #77699a; font-size: 10px; }
.auth-input { position: relative; min-height: 57px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 17px; background: rgb(48 23 103 / 55%); box-shadow: inset 0 1px rgb(255 255 255 / 4%); transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.auth-input:focus-within { border-color: rgb(33 217 246 / 72%); background: rgb(54 25 113 / 74%); box-shadow: 0 0 0 4px rgb(32 216 247 / 9%); }
.auth-input > svg { width: 20px; height: 20px; flex: 0 0 auto; margin-left: 16px; fill: none; stroke: #8d79bb; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.auth-input input { width: 100%; min-width: 0; height: 55px; padding: 0 14px; border: 0; outline: 0; background: transparent; color: #fff; font-size: 14px; }
.auth-input input::placeholder { color: #6e5c96; }
.auth-input button { width: 48px; height: 48px; flex: 0 0 auto; margin-right: 4px; display: grid; place-items: center; border: 0; background: transparent; color: #8773ae; cursor: pointer; }
.auth-input button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.auth-field > small { color: var(--danger); font-size: 10px; line-height: 1.35; }
.auth-field.is-invalid .auth-input { border-color: rgb(255 114 149 / 76%); box-shadow: 0 0 0 4px rgb(255 114 149 / 7%); }
.auth-check { display: flex; align-items: flex-start; gap: 10px; color: #a598bf; font-size: 11px; line-height: 1.5; cursor: pointer; }
.auth-check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--pink); }
.auth-submit { width: 100%; min-height: 59px; padding: 0 21px; display: flex; align-items: center; justify-content: space-between; border: 1px solid rgb(255 255 255 / 30%); border-radius: 17px; background: linear-gradient(135deg, var(--yellow), #ffad25 45%, #ff744f); color: #33125f; box-shadow: 0 17px 35px rgb(255 145 35 / 20%), inset 0 2px rgb(255 255 255 / 52%); font-weight: 950; cursor: pointer; transition: transform .18s ease, opacity .18s ease; }
.auth-submit:hover { transform: translateY(-2px); }
.auth-submit:disabled { opacity: .58; cursor: wait; transform: none; }
.auth-submit svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.auth-submit.is-loading svg { animation: auth-spin .8s linear infinite; }
.auth-message { padding: 13px 15px; border: 1px solid rgb(255 114 149 / 28%); border-radius: 13px; background: rgb(255 114 149 / 8%); color: #ffacc2; font-size: 12px; line-height: 1.45; }
.auth-message.is-success { border-color: rgb(139 236 106 / 30%); background: rgb(139 236 106 / 8%); color: #aaf38f; }
.auth-switch { margin: 24px 0 0; color: #8f80af; font-size: 12px; text-align: center; }
.auth-switch a { color: #6eeafb; font-weight: 900; text-decoration: none; }
.auth-security { margin: 28px 0 0; padding-top: 21px; display: flex; align-items: center; justify-content: center; gap: 8px; border-top: 1px solid var(--line); color: #75669a; font-size: 10px; text-align: center; }
.auth-security svg { width: 17px; height: 17px; fill: none; stroke: var(--lime); stroke-width: 1.8; }
.password-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.password-meter i { height: 3px; border-radius: 999px; background: #3a216d; }
.password-meter span { grid-column: 1 / -1; color: #77659d; font-size: 9px; }
.password-meter[data-strength="1"] i:nth-child(-n+1) { background: var(--danger); }
.password-meter[data-strength="2"] i:nth-child(-n+2) { background: var(--yellow); }
.password-meter[data-strength="3"] i:nth-child(-n+3) { background: var(--cyan); }
.password-meter[data-strength="4"] i { background: var(--lime); }
.auth-inline-link { padding: 0; border: 0; background: transparent; color: #50e3fa; font: inherit; font-weight: 900; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

.auth-terms-backdrop { position: fixed; z-index: 5000; inset: 0; padding: 22px; display: grid; place-items: center; background: rgb(8 1 28 / 80%); backdrop-filter: blur(12px); }
.auth-terms-dialog { width: min(680px, 100%); max-height: min(760px, calc(100dvh - 44px)); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; border: 1px solid var(--line); border-radius: 26px; background: #241052; color: #fff; box-shadow: 0 34px 90px rgb(4 0 20 / 55%); }
.auth-terms-dialog header { padding: 22px 24px 16px; display: flex; align-items: start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.auth-terms-dialog header small { color: var(--cyan); font-size: 9px; font-weight: 950; letter-spacing: .13em; }
.auth-terms-dialog header h2 { margin: 4px 0 0; font-size: clamp(1.45rem, 4vw, 2rem); }
.auth-terms-dialog header button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 13px; background: rgb(255 255 255 / 6%); color: #fff; font-size: 22px; cursor: pointer; }
.auth-terms-dialog [data-terms-copy] { padding: 22px 24px; overflow: auto; color: #c6bae0; font-size: 13px; line-height: 1.75; white-space: pre-wrap; }
.auth-terms-dialog footer { padding: 16px 24px 22px; border-top: 1px solid var(--line); }
.auth-terms-dialog footer .auth-submit { min-height: 48px; }

@keyframes axo-float { 50% { transform: translateY(-13px) rotate(2deg); } }
@keyframes bubble-float { 50% { transform: translateY(-14px) scale(1.05); } }
@keyframes auth-spin { to { transform: rotate(360deg); } }

@media (max-width: 1020px) {
  .auth-shell { grid-template-columns: minmax(340px, .76fr) minmax(500px, 1.24fr); }
  .auth-scene__copy h1 { font-size: 4.25rem; }
  .auth-scene__metric { display: none; }
}
@media (max-width: 820px) {
  .auth-shell { display: block; }
  .auth-scene { min-height: 330px; height: 40dvh; }
  .auth-brand { top: 13px; left: 17px; }
  .auth-brand img { width: 164px; }
  .auth-mascot { inset: 1% 0 auto; height: 72%; }
  .auth-mascot span { width: 230px; }
  .auth-mascot img { width: 210px; }
  .auth-scene__copy { left: 23px; right: 23px; bottom: 25px; }
  .auth-scene__copy > p { margin-bottom: 8px; font-size: 8px; }
  .auth-scene__copy h1 { font-size: clamp(2.7rem, 13vw, 4.1rem); }
  .auth-scene__copy > span { display: none; }
  .auth-bubble--cyan { width: 60px; height: 60px; }
  .auth-bubble--yellow { width: 54px; height: 54px; }
  .auth-panel { min-height: 60dvh; padding: 67px 23px 34px; align-items: start; }
  .auth-back { top: 21px; right: 23px; }
  .auth-panel__inner { margin: 0 auto; }
}
@media (max-width: 620px) {
  body { overflow-x: hidden; }
  .auth-shell, .auth-scene, .auth-panel, .auth-panel__inner { width: 100%; min-width: 0; max-width: 100%; }
  .auth-scene { min-height: 285px; height: 36dvh; }
  .auth-panel { min-height: 64dvh; padding-inline: 17px; }
  .auth-panel h2 { font-size: 2.35rem; }
  .auth-lead { margin-bottom: 23px; font-size: 13px; }
  .auth-form--register { grid-template-columns: 1fr; }
  .auth-field--wide { grid-column: auto; }
  .auth-input, .auth-input input, .auth-submit { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
