:root {
  --bg: #050505;
  --panel: rgba(8, 9, 15, 0.88);
  --panel-strong: rgba(5, 6, 12, 0.97);
  --cyan: #00d8ff;
  --blue: #4777ff;
  --violet: #8b5cff;
  --magenta: #ff35d4;
  --orange: #ff9d1f;
  --green: #70ff76;
  --text: #fff7df;
  --muted: #b9b0c0;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.44), rgba(5, 5, 5, 0.9)),
    linear-gradient(90deg, rgba(5, 5, 5, 0.78), rgba(5, 5, 5, 0.28) 50%, rgba(5, 5, 5, 0.78)),
    linear-gradient(90deg, rgba(0, 216, 255, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(0, 216, 255, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 12% 24%, rgba(0, 216, 255, 0.18), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(139, 92, 255, 0.2), transparent 31%),
    radial-gradient(circle at 70% 88%, rgba(255, 53, 212, 0.17), transparent 29%),
    url("../assets/body-bg.png") center top / cover fixed no-repeat,
    var(--bg);
  background-size: auto, auto, 46px 46px, 46px 46px, auto, auto, auto, cover, auto;
  font-family: "Space Grotesk", Arial, sans-serif;
  overflow: hidden;
}

body.register-page {
  overflow-y: auto;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(115deg, transparent 0 42%, rgba(0, 216, 255, 0.08) 42% 43%, transparent 43% 100%),
    linear-gradient(70deg, transparent 0 60%, rgba(71, 119, 255, 0.07) 60% 61%, transparent 61% 100%),
    linear-gradient(100deg, transparent 0 66%, rgba(255, 53, 212, 0.055) 66% 67%, transparent 67% 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a,
input {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

img {
  max-width: 100%;
}

.login-world {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 12px 16px 34px;
  overflow: hidden;
}

.register-page .login-world {
  padding-bottom: 72px;
  overflow: visible;
}

.login-world::before {
  position: absolute;
  inset: clamp(16px, 4vw, 58px);
  z-index: -1;
  border: 1px solid rgba(0, 216, 255, 0.24);
  clip-path: polygon(0 0, 96% 0, 100% 11%, 100% 100%, 4% 100%, 0 89%);
  content: "";
  opacity: 0.58;
  box-shadow: inset 0 0 44px rgba(0, 216, 255, 0.11), 0 0 44px rgba(139, 92, 255, 0.12);
}

.network-lines {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.62;
}

.network-lines span {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 18px rgba(139, 92, 255, 0.95), 0 0 36px rgba(0, 216, 255, 0.38);
  animation: nodePulse 2.8s ease-in-out infinite, nodeFloat 7s ease-in-out infinite;
}

.network-lines span::before,
.network-lines span::after {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 150px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, rgba(139, 92, 255, 0.66), transparent);
  transform-origin: left center;
  transform: rotate(var(--line-a, 20deg));
  animation: linePulse 3.6s ease-in-out infinite;
}

.network-lines span::after {
  width: 96px;
  background: linear-gradient(90deg, rgba(0, 216, 255, 0.45), transparent);
  transform: rotate(var(--line-b, 68deg));
  animation-delay: 1.15s;
}

.network-lines span:nth-child(1) { left: 7%; top: 18%; --line-a: 19deg; --line-b: 68deg; animation-delay: 0s; }
.network-lines span:nth-child(2) { left: 14%; top: 62%; --line-a: -33deg; --line-b: 22deg; animation-delay: 0.45s; }
.network-lines span:nth-child(3) { right: 15%; top: 19%; --line-a: 146deg; --line-b: 86deg; animation-delay: 0.9s; }
.network-lines span:nth-child(4) { right: 9%; top: 38%; --line-a: -158deg; --line-b: -102deg; animation-delay: 1.25s; }
.network-lines span:nth-child(5) { right: 17%; bottom: 21%; --line-a: 202deg; --line-b: 128deg; animation-delay: 1.6s; }
.network-lines span:nth-child(6) { left: 22%; bottom: 16%; --line-a: -14deg; --line-b: -58deg; animation-delay: 2s; }

.login-panel {
  position: relative;
  width: min(100%, 470px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  padding: clamp(16px, 2.2vw, 24px);
  overflow: hidden;
  background: rgba(8, 10, 18, 0.48);
  backdrop-filter: blur(28px) saturate(1.1);
  -webkit-backdrop-filter: blur(28px) saturate(1.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 0 28px rgba(255, 255, 255, 0.03),
    0 30px 80px rgba(0, 0, 0, 0.58),
    0 0 38px rgba(0, 0, 0, 0.34);
  text-align: center;
  animation: panelRise 700ms ease both;
}

.register-panel {
  width: min(100%, 500px);
}

.login-panel::before {
  position: absolute;
  inset: 1px;
  z-index: -1;
  content: "";
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.04);
}

.login-panel::after {
  position: absolute;
  inset: 10px;
  pointer-events: none;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 13px;
}

.brand-symbol {
  position: relative;
  z-index: 1;
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  margin: 0 auto 10px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}

.brand-symbol::before {
  display: none;
  content: "";
}

.brand-symbol img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
}

.divider {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 24px 1fr;
  align-items: center;
  gap: 7px;
  margin: 10px 0 10px;
  color: var(--violet);
}

.divider span {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 255, 0.78), transparent);
}

.divider i {
  font-size: 1rem;
  text-shadow: 0 0 18px rgba(139, 92, 255, 0.78);
}

h1,
h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #ffffff;
  font-family: "Rajdhani", Arial, sans-serif;
  font-weight: 700;
}

h1 {
  font-size: clamp(1.28rem, 3vw, 1.55rem);
  line-height: 1;
}

.login-subtitle {
  position: relative;
  z-index: 1;
  margin: 5px 0 9px;
  color: rgba(255, 247, 223, 0.76);
  font-size: 0.74rem;
}

.login-tabs {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 2px;
  background: rgba(0, 0, 0, 0.32);
}

.login-tab {
  display: inline-flex;
  min-width: 0;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 999px;
  color: rgba(255, 247, 223, 0.72);
  background: transparent;
  font-size: 0.72rem;
  font-weight: 700;
}

.login-tab.active,
.login-tab:hover {
  color: #ffffff;
  background: linear-gradient(180deg, rgba(139, 92, 255, 0.34), rgba(0, 216, 255, 0.12));
  box-shadow: inset 0 0 0 1px rgba(139, 92, 255, 0.78), 0 0 22px rgba(139, 92, 255, 0.28);
}

.login-tab:disabled {
  cursor: default;
}

.login-tab:disabled:hover {
  color: rgba(255, 247, 223, 0.72);
  background: transparent;
  box-shadow: none;
}

.wallet-box {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 11px;
  padding: 9px;
  background: linear-gradient(180deg, rgba(18, 20, 34, 0.74), rgba(6, 8, 18, 0.72));
  text-align: left;
  box-shadow: inset 0 0 22px rgba(0, 216, 255, 0.04);
}

.wallet-box h2 {
  font-size: 0.92rem;
  line-height: 1.2;
}

.wallet-box p {
  margin: 3px 0 8px;
  color: rgba(255, 247, 223, 0.72);
  font-size: 0.68rem;
}

.wallet-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.wallet-option {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 6px 7px;
  color: #ffffff;
  background: rgba(6, 8, 18, 0.62);
  text-align: left;
}

.wallet-option:hover,
.wallet-option:focus-visible,
.wallet-option.is-active {
  border-color: rgba(139, 92, 255, 0.86);
  background: rgba(139, 92, 255, 0.12);
  transform: translateY(-1px);
  outline: none;
  box-shadow: 0 0 24px rgba(139, 92, 255, 0.22);
}

.wallet-mark {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  overflow: hidden;
  color: #ffffff;
  font-family: "Rajdhani", Arial, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(0, 216, 255, 0.12);
}

.wallet-mark img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: contain;
}

.wallet-mark.metamask { background: linear-gradient(135deg, #ff9d1f, #d94900); }
.wallet-mark.trust { background: linear-gradient(135deg, #1488ff, #0052d4); }
.wallet-mark.tokenpocket { background: linear-gradient(135deg, #00d8ff, #246bff); }
.wallet-mark.safepal { background: linear-gradient(135deg, #ff35d4, #6e35ff); }
.wallet-mark.other { background: linear-gradient(135deg, #70ff76, #00a6a6); }

.wallet-option strong,
.wallet-option small {
  display: block;
}

.wallet-option strong {
  font-size: 0.72rem;
}

.wallet-option small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.58rem;
}

.wallet-option > i {
  display: none;
  color: var(--violet);
  font-size: 1.05rem;
}

.wallet-field {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  margin: 8px 0 7px;
  text-align: left;
}

.wallet-field span {
  color: var(--cyan);
  font-family: "Rajdhani", Arial, sans-serif;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
}

.wallet-field input {
  width: 100%;
  min-height: 32px;
  border: 1px solid rgba(0, 216, 255, 0.34);
  border-radius: 8px;
  padding: 6px 8px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.36);
  font-size: 0.68rem;
  outline: none;
}

.register-form-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  margin: 8px 0 10px;
}

.register-form-grid .wallet-field {
  margin: 0;
}

.placement-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.placement-options label {
  margin: 0;
}

.placement-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.placement-options span {
  display: inline-flex;
  width: 100%;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(0, 216, 255, 0.24);
  border-radius: 10px;
  color: rgba(255, 247, 223, 0.72);
  background: rgba(0, 0, 0, 0.28);
  font-size: 0.72rem;
  font-weight: 700;
}

.placement-options input:checked + span {
  border-color: rgba(139, 92, 255, 0.8);
  color: #ffffff;
  background: linear-gradient(180deg, rgba(139, 92, 255, 0.36), rgba(0, 216, 255, 0.12));
  box-shadow: 0 0 18px rgba(139, 92, 255, 0.22);
}

.auth-switch {
  position: relative;
  z-index: 1;
  margin: 9px 0 0;
  color: rgba(255, 247, 223, 0.68);
  font-size: 0.72rem;
  text-align: center;
}

.auth-switch a {
  color: var(--cyan);
  font-weight: 700;
}

.auth-switch a:hover {
  color: #ffffff;
}

.wallet-field input:focus {
  border-color: rgba(255, 53, 212, 0.72);
  box-shadow: 0 0 0 0.18rem rgba(255, 53, 212, 0.12), 0 0 24px rgba(0, 216, 255, 0.12);
}

.wallet-field input[readonly] {
  cursor: default;
}

.wallet-field input[data-referral-locked="true"] {
  border-color: rgba(139, 92, 255, 0.48);
  background: rgba(139, 92, 255, 0.12);
}

.placement-options.is-locked span,
.placement-options input:disabled + span {
  cursor: default;
  opacity: 0.86;
}

.btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 700;
}

.btn-login {
  border: 1px solid rgba(139, 92, 255, 0.88);
  background: linear-gradient(180deg, #9d65ff, #7338ff);
  box-shadow: 0 0 26px rgba(139, 92, 255, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.btn-login:not(:disabled):hover {
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 0 34px rgba(139, 92, 255, 0.52), 0 0 24px rgba(0, 216, 255, 0.22);
}

.btn-login:disabled {
  border-color: rgba(185, 176, 192, 0.26);
  color: rgba(255, 247, 223, 0.42);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
  cursor: not-allowed;
}

.secure-strip {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.secure-strip span {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  column-gap: 5px;
  align-items: center;
}

.secure-strip i {
  grid-row: span 2;
  color: var(--violet);
  font-size: 0.92rem;
}

.secure-strip strong {
  color: #ffffff;
  font-family: "Rajdhani", Arial, sans-serif;
  font-size: 0.66rem;
  text-transform: uppercase;
}

.secure-strip small {
  color: var(--muted);
  font-size: 0.52rem;
}

.nft-float {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  width: min(13vw, 130px);
  min-width: 88px;
  pointer-events: none;
}

.nft-float-left {
  left: clamp(12px, 3vw, 36px);
  align-items: center;
  justify-content: flex-start;
}

.nft-float-right {
  right: clamp(12px, 4vw, 48px);
  flex-direction: column;
  justify-content: center;
  gap: clamp(24px, 5vh, 50px);
}

.mini-nft-card {
  width: 102px;
  border: 1px solid rgba(139, 92, 255, 0.82);
  border-radius: 11px;
  padding: 6px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(23, 22, 52, 0.82), rgba(5, 6, 14, 0.94)),
    rgba(10, 8, 20, 0.9);
  box-shadow: 0 0 24px rgba(139, 92, 255, 0.2), 0 16px 34px rgba(0, 0, 0, 0.38);
}

.mini-nft-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 9px;
  object-fit: cover;
  filter: saturate(1.12) contrast(1.06);
}

.mini-nft-top,
.mini-nft-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #ffffff;
  font-size: 0.54rem;
  font-weight: 700;
}

.mini-nft-top {
  margin-bottom: 6px;
}

.mini-nft-bottom {
  margin-top: 7px;
}

.mini-nft-bottom i {
  color: var(--magenta);
  text-shadow: 0 0 14px rgba(255, 53, 212, 0.9);
}

.tilted-left {
  transform: rotate(7deg);
}

.tilted-right {
  align-self: flex-end;
  transform: rotate(-8deg);
}

.tilted-small {
  align-self: center;
  width: 92px;
  transform: rotate(4deg);
}

.chain-crystal {
  position: absolute;
  left: 20%;
  bottom: 10%;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(0, 216, 255, 0.34);
  border-radius: 50%;
  color: var(--magenta);
  background: radial-gradient(circle, rgba(139, 92, 255, 0.36), rgba(0, 0, 0, 0.08) 58%, transparent 70%);
  box-shadow: 0 0 34px rgba(255, 53, 212, 0.36), 0 0 46px rgba(0, 216, 255, 0.18);
  font-size: 1.45rem;
}

.login-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 8px;
  z-index: 2;
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 0 12px;
  color: rgba(255, 247, 223, 0.58);
  text-align: center;
}

.login-footer p {
  margin: 0;
  font-size: 0.68rem;
}

.login-footer i {
  color: var(--violet);
  margin-right: 8px;
}

.login-footer div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  font-size: 0.62rem;
}

.login-footer a:hover {
  color: var(--cyan);
}

.app-toast {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 999;
  width: min(calc(100% - 42px), 360px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 10px 14px;
  color: #ffffff;
  background: rgba(22, 22, 22, 0.92);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.42), 0 0 28px rgba(0, 216, 255, 0.18);
  font-size: 0.82rem;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.96);
  transition: opacity 180ms ease, transform 180ms ease;
}

.app-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

@keyframes nodePulse {
  0%,
  100% {
    opacity: 0.55;
    box-shadow: 0 0 14px rgba(139, 92, 255, 0.65), 0 0 24px rgba(0, 216, 255, 0.28);
  }

  50% {
    opacity: 1;
    box-shadow: 0 0 22px rgba(139, 92, 255, 1), 0 0 46px rgba(0, 216, 255, 0.52);
  }
}

@keyframes nodeFloat {
  0%,
  100% {
    translate: 0 0;
  }

  50% {
    translate: 8px -10px;
  }
}

@keyframes linePulse {
  0%,
  100% {
    opacity: 0.18;
    filter: blur(0);
  }

  50% {
    opacity: 0.82;
    filter: blur(0.2px);
  }
}

@keyframes panelRise {
  from {
    opacity: 0;
    translate: 0 12px;
  }

  to {
    opacity: 1;
    translate: 0 0;
  }
}

@media (min-width: 576px) {
  .login-tab {
    min-height: 34px;
    font-size: 0.78rem;
  }

  .wallet-option {
    grid-template-columns: 34px minmax(0, 1fr);
    min-height: 52px;
    gap: 8px;
    padding: 8px 9px;
  }

  .wallet-mark {
    width: 32px;
    height: 32px;
  }

  .wallet-option strong {
    font-size: 0.78rem;
  }

  .wallet-option small {
    font-size: 0.62rem;
  }

  .wallet-field {
    gap: 6px;
    margin: 10px 0;
  }

  .wallet-field span {
    font-size: 0.74rem;
  }

  .wallet-field input {
    min-height: 42px;
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 0.82rem;
  }

  .btn {
    min-height: 44px;
    gap: 8px;
    border-radius: 10px;
    font-size: 0.86rem;
  }
}

@media (max-width: 1180px) {
  .nft-float {
    opacity: 0.42;
  }

  .nft-float-left {
    left: -34px;
  }

  .nft-float-right {
    right: -34px;
  }
}

@media (max-width: 991.98px) {
  .login-world {
    min-height: 100vh;
    padding: 12px 16px 34px;
  }

  .nft-float {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .login-world {
    padding: 12px;
  }

  .login-world::before {
    inset: 10px;
  }

  .login-panel {
    border-radius: 18px;
    padding: 16px;
  }

  .brand-symbol {
    width: 140px;
    height: 140px;
    margin-bottom: 14px;
  }

  .login-tabs {
    grid-template-columns: 1fr;
    border-radius: 14px;
  }

  .login-tab {
    min-height: 34px;
    border-radius: 10px;
  }

  .wallet-box {
    padding: 12px;
  }

  .wallet-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wallet-option {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
  }

  .wallet-mark {
    width: 28px;
    height: 28px;
  }

  .wallet-option small {
    display: none;
  }

  .wallet-field {
    gap: 7px;
    margin: 12px 0 12px;
  }

  .wallet-field span {
    font-size: 0.82rem;
  }

  .wallet-field input {
    min-height: 48px;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.9rem;
  }

  .btn {
    min-height: 50px;
    border-radius: 10px;
    font-size: 0.95rem;
  }

  .secure-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-height: 760px) {
  .login-world {
    padding-bottom: 12px;
  }

  .login-footer,
  .secure-strip {
    display: none;
  }
}

@media (max-height: 650px) {
  .login-subtitle,
  .divider {
    display: none;
  }

  .wallet-box {
    margin-top: 6px;
  }

  .nft-float {
    display: none;
  }
}

@supports (overflow: clip) {
  html,
  body {
    overflow-x: clip;
  }
}
