/*
 * funexch.online — the Funin Exchange signup page.
 *
 * Ported from funinexch.cc/signUp (gemexch-ai-next, brand `fun`): the gold
 * shell over the site background photo, white fields with the #FFF0CA focus
 * wash, and dark gradient buttons with #FFB80C type.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

html,
body {
  min-height: 100%;
}

body {
  background: #0d0b0a url("assets/auth-bg.webp") center / cover no-repeat fixed;
  color: #000;
  font-family: "Averta Std Semibold", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid #a1802d;
  outline-offset: 2px;
}

/*
 * Mobile is a full-bleed gold column. The desktop stage below reproduces the
 * reference's `.left_view` / `.right_view` split: the signup column pinned
 * left like a phone frame, with the SEO panel filling the space beside it.
 */
.fx-shell {
  width: 100%;
  min-height: 100vh;
  background: #ffb80c;
}

.desktop-seo-panel {
  display: none;
}

@media (min-width: 768px) {
  .desktop-stage {
    position: relative;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }

  /* `.desktop-phone-frame` — the app column, 35vw capped at 550px. */
  .fx-shell {
    position: relative;
    z-index: 2;
    display: inline-block;
    width: 35vw;
    max-width: 550px;
    height: calc(100vh - 40px);
    min-height: 0;
    margin: 20px 0 0 20px;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 16px;
    box-shadow: 0 0 20px 5px rgba(0, 0, 0, 0.5);
    scrollbar-width: none;
  }

  .fx-shell::-webkit-scrollbar {
    display: none;
  }

  /* `.desktop-seo-panel` (funinstar `.right_view`) — logo above a dark card. */
  .desktop-seo-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: calc(100% - min(35vw, 550px) - 20px);
    min-width: 0;
    padding: 20px 16px;
    box-sizing: border-box;
    color: #fff;
    pointer-events: none;
  }

  .desktop-seo-panel-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 760px;
    max-height: calc(100vh - 40px);
    pointer-events: auto;
  }

  .desktop-seo-logo {
    width: 100%;
    max-width: 340px;
    margin: 0 auto 14px;
    flex-shrink: 0;
  }

  .desktop-seo-logo-img {
    width: 100%;
    max-width: 340px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
  }

  .desktop-seo-copy {
    width: 700px;
    max-width: 100%;
    max-height: 350px;
    padding: 18px 22px;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 10px;
    background-color: rgba(0, 0, 0, 0.55);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    text-align: left;
    scrollbar-width: none;
  }

  .desktop-seo-copy::-webkit-scrollbar {
    display: none;
  }

  .desktop-seo-section {
    margin-top: 2px;
  }

  .desktop-seo-title {
    margin: 10px 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    color: #fff;
  }

  .desktop-seo-title:first-child {
    margin-top: 0;
  }

  .desktop-seo-paragraph {
    margin: 5px 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    color: #fff;
  }

  .desktop-seo-paragraph:last-child {
    margin-bottom: 0;
  }
}

/* --------------------------------------------- signup card (funinexch.cc) */

/*
 * Ported from the funinexch.cc/signUp form: gold panel, white inputs with the
 * #FFF0CA focus wash, and the dark gradient button with gold type. The
 * reference is a mobile-first vw layout; the sizes here are its vw values
 * resolved at its own design width so the card reads the same on desktop.
 */
@font-face {
  font-family: "Averta Std Semibold";
  src: url("assets/fonts/AvertaStd-Semibold.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

.fx-shell {
  --fx-accent: #ffb80c;
  --fx-black: #000000;
  --fx-ink: #1e1e1e;
  --fx-edge: #666666;
  --fx-focus: #fff0ca;
  --fx-link: #2789ce;

  color: var(--fx-black);
  text-align: center;
}

/*
 * Auth hero: the promo banner carries its own curved gold edge, and the
 * wordmark is overlaid on it. The percentages are the reference's vw values
 * (top 34.67/74.67, width 65.87/100, height 28/74.67) resolved against the
 * banner box so the lockup lands in the same spot at any card width.
 */
.fx-banner {
  position: relative;
  width: 100%;
  line-height: 0;
}

.fx-banner-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.fx-banner-logo {
  position: absolute;
  top: 46.4%;
  left: 50%;
  width: 65.9%;
  height: 37.5%;
  margin-left: -30%;
  object-fit: contain;
}

.fx-body {
  padding: 1.4rem 1.25rem 2rem;
}

/* `.policy-link.nwcls_policy` — the wrapped row of policy links. */
.fx-policy ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.75rem;
  margin-top: 0.4rem;
  list-style: none;
}

.fx-policy a {
  color: var(--fx-black);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: underline;
}

.fx-policy a:hover {
  text-decoration: none;
}

.fx-form {
  display: block;
}

.fx-form[hidden] {
  display: none;
}

/* Shared field chrome — `.login_inputs.nw_pg_inputs` in the reference. */
.fx-field {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.75rem 0;
  padding: 0.7rem 0.7rem;
  border: 1px solid var(--fx-edge);
  border-radius: 6px;
  background: #fff;
  box-shadow: inset 0 2px 0 0 rgba(0, 0, 0, 0.1);
  transition: background 0.15s, box-shadow 0.15s;
}

.fx-field:focus-within {
  background: var(--fx-focus);
  box-shadow: inset 0 1px 5px rgba(161, 128, 45, 0.6);
}

.fx-cc {
  flex-shrink: 0;
  padding-left: 0.2rem;
  color: var(--fx-ink);
  font-size: 0.95rem;
  font-weight: 700;
}

.fx-sep-v {
  width: 1px;
  height: 1.35rem;
  flex-shrink: 0;
  background: #d5d5d5;
}

.fx-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--fx-ink);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
}

.fx-input::placeholder {
  color: #999;
  font-weight: 600;
}

.fx-input:focus {
  outline: none;
}

.fx-input:disabled {
  color: #8a8a8a;
  cursor: not-allowed;
}

.fx-label {
  margin: 0.9rem 0 0.45rem;
  color: var(--fx-black);
  font-size: 0.9rem;
  font-weight: 700;
}

/* `Send OTP via` picker — selected uses the dark gradient, like the button. */
.fx-channels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.fx-chan {
  padding: 0.7rem 0.6rem;
  border: 1px solid var(--fx-edge);
  border-radius: 6px;
  background: #fff;
  color: var(--fx-black);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.fx-chan:hover:not(:disabled) {
  background: var(--fx-focus);
}

.fx-chan.is-on {
  border-color: var(--fx-black);
  background: linear-gradient(-180deg, #464646 15%, #121212 100%);
  color: var(--fx-accent);
}

.fx-chan:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.fx-btn {
  display: block;
  width: 100%;
  margin: 0.85rem 0 0;
  padding: 0.75rem 0;
  border: 1px solid var(--fx-black);
  border-radius: 6px;
  background: linear-gradient(-180deg, #464646 15%, #121212 100%);
  color: var(--fx-accent);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease-out;
}

.fx-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.fx-btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.fx-alt {
  margin-top: 0.85rem;
  color: var(--fx-black);
  font-size: 0.86rem;
  font-weight: 600;
}

.fx-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--fx-black);
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.fx-link:hover {
  text-decoration: underline;
}

.fx-link--blue {
  color: var(--fx-link);
}

.fx-link:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  text-decoration: none;
}

/* `.seperator` — a rule with a circled "or" sitting on it. */
.fx-or {
  position: relative;
  margin-top: 1.35rem;
  border-top: 1px solid rgba(0, 0, 0, 0.25);
}

.fx-or span {
  position: relative;
  top: -0.8rem;
  display: inline-block;
  width: 1.65rem;
  height: 1.65rem;
  border: 1px solid #e0e0e0;
  border-radius: 50%;
  background: #fff;
  color: var(--fx-black);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.6rem;
}

.fx-legal {
  margin-top: 0.15rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.fx-legal a {
  color: var(--fx-black);
  text-decoration: underline;
}

/* ------------------------------------------------------------- OTP step */

.fx-otp-title {
  color: var(--fx-black);
  font-size: 1rem;
  font-weight: 700;
}

.fx-otp-sub {
  margin-top: 0.4rem;
  color: var(--fx-black);
  font-size: 0.86rem;
  font-weight: 600;
}

.fx-otp-num {
  margin-top: 0.4rem;
  border: 0;
  background: transparent;
  color: var(--fx-black);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.fx-otp-num:hover {
  text-decoration: underline;
}

.fx-pencil {
  margin-left: 0.35rem;
}

.fx-otp-boxes {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin: 1.1rem 0 0.2rem;
}

.fx-otp-box {
  width: 3.1rem;
  height: 3.1rem;
  border: 1px solid var(--fx-edge);
  border-radius: 6px;
  background: #fff;
  color: var(--fx-ink);
  font-family: inherit;
  font-size: 1.35rem;
  font-weight: 700;
  text-align: center;
  box-shadow: inset 0 2px 0 0 rgba(0, 0, 0, 0.1);
  outline: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.fx-otp-box:focus {
  border-color: #a1802d;
  background: var(--fx-focus);
  box-shadow: inset 0 1px 5px rgba(161, 128, 45, 0.6);
}

.fx-otp-box.is-filled {
  border-color: #a1802d;
  background: var(--fx-focus);
}

.fx-otp-box.is-invalid {
  border-color: #e80505;
  background: #fff5f5;
  color: #e80505;
}

.fx-otp-boxes.shake {
  animation: fxShake 0.35s ease-in-out;
}

@keyframes fxShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.fx-msg {
  min-height: 1rem;
  margin-top: 0.6rem;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
}

.fx-msg--ok {
  color: #0b6b2e;
}

.fx-msg--err {
  color: #b31212;
}

.fx-form--busy {
  pointer-events: none;
}

@media (max-width: 24rem) {
  .fx-body {
    padding: 0.95rem 0.95rem 1.05rem;
  }

  .fx-otp-box {
    width: 2.7rem;
    height: 2.7rem;
  }
}
