*,
*:before,
*:after {
  box-sizing: border-box
}

* {
  padding: 0;
  margin: 0
}

:root {
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale
}

input,
button,
textarea,
select {
  font: inherit
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word
}

a {
  text-decoration: none
}

@font-face {
  font-family: Max Sans;
  font-weight: 300;
  font-display: block;
  src: url(/public/fonts/max-sans/MaxSans-Light.woff2) format("woff2"),
    url(/public/fonts/max-sans/MaxSans-Light.woff) format("woff")
}

@font-face {
  font-family: Max Sans;
  font-weight: 400;
  font-display: block;
  src: url(/public/fonts/max-sans/MaxSans-Regular.woff2) format("woff2"),
    url(/public/fonts/max-sans/MaxSans-Regular.woff) format("woff")
}

@font-face {
  font-family: Max Sans;
  font-weight: 500;
  font-display: block;
  src: url(/public/fonts/max-sans/MaxSans-Medium.woff2) format("woff2"),
    url(/public/fonts/max-sans/MaxSans-Medium.woff) format("woff")
}

@font-face {
  font-family: Max Sans;
  font-weight: 600;
  font-display: block;
  src: url(/public/fonts/max-sans/MaxSans-DemiBold.woff2) format("woff2"),
    url(/public/fonts/max-sans/MaxSans-DemiBold.woff) format("woff")
}

@font-face {
  font-family: Max Sans;
  font-weight: 700;
  font-display: block;
  src: url(/public/fonts/max-sans/MaxSans-Bold.woff2) format("woff2"),
    url(/public/fonts/max-sans/MaxSans-Bold.woff) format("woff")
}

body {
  flex: 1 1 auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  place-items: center;
  min-width: 320px;
  min-height: 100vh;
}

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

:root {
  --font: Max Sans, sans-serif;
}

.wrapper {
  max-width: 1260px;
  width: 100%;
  margin: 0 auto;
}

.container {
  background: #17181c;
  width: 100%;
  height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 32px 32px 0;
}

.background {
  pointer-events: none;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.background__layer {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.background__layer-base {
  background: linear-gradient(28deg, #141414 8.03%, #141414 91.51%);
}

.background__layer-pattern {
  background: radial-gradient(57.57% 53.61% at 94.4% 14.38%, #0000 0%, #0000 50%, #0000 100%), radial-gradient(140.37% 51.38% at 0% 80.05%, #0000 0%, #0000 50%, #0000 100%), linear-gradient(28deg, #505bc74d 8.03%, #505bc74d 91.51%);
  -webkit-mask-image: url('/public/pattern_space.svg');
  mask-image: url('/public/pattern_space.svg');
  -webkit-mask-position: 50%;
  mask-position: 50%;
  -webkit-mask-size: auto;
  mask-size: auto;
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
  -webkit-mask-image: url('/public/pattern_space.svg');
  -webkit-mask-position: 50%;
  -webkit-mask-size: auto;
  -webkit-mask-repeat: repeat;
}

.header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border-radius: 32px;
  background: #281d39cb;
  padding: 0 40px;
  height: 88px;
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  box-shadow: 0 40px 25px #0000000d, 0 5px 10px #0000001a;
}

.header__logo img {
  height: 42px;
}

.header__list {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header__list-link {
  font: 500 20px/1.4 var(--font);
  cursor: pointer;
  color: #b5b5b5;
}

.header__list-link:hover {
  color: #ffffff;
}

.header__link-web {
  font: 500 20px/1.4 var(--font);
  white-space: nowrap;
  background: var(--Gradient-Text, linear-gradient(96deg, #5a8cff 0%, #5a8cff calc(100% * 0.72), #8f3fff 99.6%));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all .2s ease-in;
}

.modal {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
}

.modal-form {
  max-width: 400px;
  width: 100%;
  background: #281d39cb;
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  box-shadow: 0 40px 25px #0000000d, 0 5px 10px #0000001a;
  border-radius: 20px;
  padding: 30px;
  border: 1px solid #8f3fff;
}

.form__title {
  font: 500 18px/1.4 var(--font);
  color: #ffffff;
}

.modal-sms .form__title {
  text-align: center;
}

.form__phone {
  display: block;
  background-color: #111111;
  padding: 14px 20px;
  border-radius: 16px;
  border: 1px solid #2f2f2f;
  margin-top: 20px;
  cursor: text;
}

.form__phone-input {
  background-color: rgba(0, 0, 0, 0);
  outline: none;
  border: none;
  color: #ffffff;
  font: 500 18px/1.4 var(--font);
}

.form__error {
  height: 28px;
  display: flex;
  align-items: center;
}

#form-error {
  font: 400 13px/1.4 var(--font);
  color: tomato;
}

.form__submit {
  width: 100%;
  padding: 10px;
  border-radius: 16px;
  outline: none;
  border: none;
  background: radial-gradient(136.12% 140.74% at 99.77% 99.04%, #8d28c8 0%, #7c42fa 20%, #007aff 80%, #609ceb 100%);
  font: 500 18px/1.4 var(--font);
  color: #ffffff;
  cursor: pointer;
}

.form__submit:hover {
  opacity: .85;
}

.form__copy {
  color: #ffffff50;
  font: 400 13px/1.4 var(--font);
  line-height: 20px;
  letter-spacing: .15px;
  text-align: center;
  margin-top: 20px;
}

.form__desc {
  color: #ffffff50;
  font: 400 13px/1.4 var(--font);
  line-height: 20px;
  letter-spacing: .15px;
  text-align: center;
  margin-top: 10px;
}

.form__copy span {
  cursor: pointer;
  background: var(--Gradient-Text, linear-gradient(96deg, #5a8cff 0%, #5a8cff calc(100% * 0.72), #8f3fff 99.6%));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.form__phone {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form__phone.is-focused {
  border-color: #8f3fff;
  box-shadow: 0 0 0 2px rgba(143, 63, 255, 0.2);
}

.form__phone.is-error {
  border-color: tomato;
}

#form-error {
  display: none;
}

.sms-code__container {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 24px;
}

.sms-code__input {
  width: 45px;
  height: 54px;
  background-color: #111111;
  border: 1px solid #2f2f2f;
  border-radius: 12px;
  color: #ffffff;
  font: 600 22px/1.4 var(--font);
  text-align: center;
  outline: none;
  transition: all 0.2s ease;
}

.sms-code__input:focus {
  border-color: #8f3fff;
  box-shadow: 0 0 0 2px rgba(143, 63, 255, 0.2);
}

.sms-code__input.is-error {
  border-color: tomato;
}

#sms-error {
  display: none;
}

.menu {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 8px;
  cursor: pointer;
}

.menu svg {
  color: #ffffff;
}

.modal-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.modal-wrapper.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  max-width: 400px;
  width: 90%;
  background: #281d39cb;
  backdrop-filter: blur(15px);
  padding: 30px;
  border-radius: 24px;
  border: 1px solid #8f3fff;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  transform: translateY(20px) scale(0.95);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
}

.modal-wrapper.active .modal-content {
  transform: translateY(0) scale(1);
}

.modal__title {
  font: 500 18px/1.4 var(--font);
  color: #ffffff;
  margin-bottom: 24px;
}

.modal__button {
  width: 100%;
  padding: 12px;
  border-radius: 16px;
  border: none;
  background: radial-gradient(136.12% 140.74% at 99.77% 99.04%, #8d28c8 0%, #7c42fa 20%, #007aff 80%, #609ceb 100%);
  font: 600 16px var(--font);
  color: #ffffff;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.modal__button:hover {
  opacity: 0.9;
}

.modal-form {
  position: relative;
  overflow: hidden;
}

.form-loader-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #1d1429;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(15px);
}

.form-loader-overlay.active {
  display: flex;
}

.loader-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(143, 63, 255, 0.1);
  border-left-color: #8f3fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  filter: drop-shadow(0 0 10px rgba(143, 63, 255, 0.5));
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1070px) {
  .container {
    padding: 32px 16px 0;
  }

  .header {
    height: 64px;
    border-radius: 24px;
    padding: 0 16px;
  }

  .header__logo img {
    height: 32px;
  }

  .header__list {
    display: none;
  }

  .header__link-web {
    display: none;
  }

  .menu {
    display: flex;
  }
}

@media (max-width: 400px) {
  .sms-code__input {
    width: 40px;
    height: 50px;
    font-size: 18px;
  }
}