:root{
  --text:#111318;
  --line:rgba(17,19,24,.10);
  --red:#d91f2d;
  --max:1420px;
}


/* =========================================================
   BASE
   ========================================================= */

*{
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

body{
  margin:0;
  min-height:100vh;
  overflow-x:hidden;

  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
}

body::before{
  content:"";

  position:fixed;
  inset:0;

  z-index:50;
  pointer-events:none;

  background-size:42px 42px;

  mask-image:
    linear-gradient(
      to bottom,
      black,
      transparent 65%
    );
}

button,
input,
select{
  font:inherit;
}

button{
  cursor:pointer;
}

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

.container{
  width:min(
    var(--max),
    calc(100% - 48px)
  );

  margin:0 auto;
}


/* =========================================================
   EYEBROW
   ========================================================= */

.eyebrow{
  display:flex;
  align-items:center;

  gap:10px;

  font-size:12px;
  letter-spacing:.16em;
  text-transform:uppercase;
}

.eyebrow::before{
  content:"";

  width:6px;
  height:6px;

  flex:0 0 auto;

  border-radius:999px;

  background:var(--red);
}


/* =========================================================
   HEADER
   ========================================================= */

header{
  position:sticky;
  top:0;

  z-index:40;

  backdrop-filter:blur(20px);

  transition:
    transform .28s ease,
    box-shadow .28s ease;

  will-change:transform;
}

header.header-hidden{
  transform:translateY(calc(-100% - 2px));
}

.header-inner{
  height:86px;

  display:flex;
  align-items:center;
  justify-content:space-between;

  gap:28px;
}


/* =========================================================
   NAVIGATION
   ========================================================= */

.nav{
  display:flex;
  align-items:center;

  gap:34px;

  font-size:13px;
}

.nav a{
  transition:.2s ease;
}


/* =========================================================
   HEADER ACTIONS
   ========================================================= */

.header-actions{
  display:flex;
  align-items:center;

  gap:12px;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  gap:9px;

  padding:12px 18px;

  border:1px solid var(--line);
  border-radius:11px;

  transition:.2s ease;
}

.hamburger{
  display:none;

  width:44px;
  height:44px;

  padding:0;

  font-size:20px;
}


/* =========================================================
   AUTH
   ========================================================= */

.modal.auth-modal{
  width:min(440px,100%);
}

.modal.auth-modal-register{
  width:min(520px,100%);
}

.auth-switch{
  display:flex;
  align-items:center;
  justify-content:center;

  gap:6px;

  margin-top:16px;

  color:#7a7e84;

  font-size:12px;
}

.auth-switch-btn{
  -webkit-appearance:none;
  appearance:none;

  margin:0;
  padding:0;

  border:0;
  outline:0;

  background:transparent;
  box-shadow:none;

  color:var(--text);

  font:inherit;
  font-weight:500;

  cursor:pointer;

  transition:color .2s ease;
}

.auth-switch-btn:hover{
  color:var(--red);
}

.auth-submit{
  width:100%;

  margin-top:18px;

  padding:14px;
}

.auth-field-error{
  border-color:
    rgba(217,31,45,.62) !important;

  box-shadow:
    0 0 0 3px
    rgba(217,31,45,.07) !important;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media(max-width:700px){

  /* Общие отступы */

  .container{
    width:auto;
    max-width:var(--max);

    margin-left:18px;
    margin-right:18px;
  }


  /* HEADER */

  .header-inner{
    height:72px;

    display:flex;
    align-items:center;
    justify-content:space-between;

    gap:12px;
  }


  /* На мобильном основная nav скрыта */

  .nav{
    display:none !important;
  }


  /* LOGO */

  .brand{
    display:flex !important;
    align-items:center;

    flex:0 0 auto;

    min-width:0;
    height:52px;

    visibility:visible !important;
    opacity:1 !important;
  }

  .brand-logo{
    display:block !important;

    width:125px;
    max-width:125px;
    height:auto;
    max-height:52px;

    object-fit:contain;
    object-position:left center;

    visibility:visible !important;
    opacity:1 !important;
  }


  /* HEADER ACTIONS */

  .header-actions{
    display:flex !important;
    align-items:center;
    justify-content:flex-end;

    gap:8px;

    margin-left:auto;
  }


  /* Показываем кнопку Войти */

  .header-actions #loginBtn{
    display:inline-flex !important;
    align-items:center;
    justify-content:center;

    flex:0 0 auto;
  }


  /* Поддержка остаётся только в нижнем меню */

  .header-actions #supportBtn{
    display:none !important;
  }


  /* Бургер полностью убираем */

  .header-actions #menuBtn,
  #menuBtn,
  .hamburger{
    display:none !important;
  }


  /* AUTH */

  .modal.auth-modal,
  .modal.auth-modal-register{
    width:100%;
  }

  .auth-switch{
    font-size:11px;
  }

}


/* =========================================================
   AUTH — REAL ACCOUNT FLOW
   ========================================================= */

.auth-options{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-top:14px;
}

.auth-check{
  display:flex;
  align-items:flex-start;
  gap:9px;
  color:#6f7379;
  font-size:11px;
  line-height:1.45;
  cursor:pointer;
}

.auth-check input{
  width:16px;
  height:16px;
  flex:0 0 auto;
  margin:1px 0 0;
  accent-color:var(--red);
}

.auth-consents{
  display:grid;
  gap:9px;
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid var(--line);
}

.auth-hint{
  margin-top:7px;
  color:#898d92;
  font-size:10px;
  line-height:1.45;
}

.auth-trust-device{
  margin-top:15px;
}

.auth-secondary-action{
  display:block;
  width:100%;
  margin-top:12px;
  padding:9px 12px;
  border:0;
  background:transparent;
  color:#686c72;
  font-size:11px;
  text-align:center;
  transition:.2s ease;
}

.auth-secondary-action:hover{
  color:var(--red);
}

.auth-secondary-action:disabled,
.btn:disabled,
.auth-switch-btn:disabled{
  cursor:not-allowed;
  opacity:.55;
  transform:none !important;
}

.auth-code-input{
  text-align:center;
  font-size:24px !important;
  letter-spacing:.28em;
  font-variant-numeric:tabular-nums;
}

.modal-lead strong{
  color:var(--text);
  font-weight:600;
}

@media(max-width:700px){
  .auth-options{
    align-items:flex-start;
    flex-direction:column;
    gap:10px;
  }

  .auth-code-input{
    font-size:22px !important;
  }
}

/* Exchange engine additions — keeps the existing Black Swan visual system. */
.coin-fiat{
  background:linear-gradient(145deg,#1c2128,#080b0f);
  color:#fff;
  border:1px solid rgba(255,255,255,.1);
  font-size:11px;
}
.order-window-hint{
  margin-top:13px;
  padding:10px 12px;
  border-radius:10px;
  background:rgba(17,19,24,.035);
  color:#777d86;
  font-size:11px;
  line-height:1.45;
}
#orderPaymentMethod{
  width:100%;
  height:48px;
  border:1px solid var(--line);
  border-radius:11px;
  background:#fff;
  color:var(--text);
  padding:0 13px;
  outline:none;
}
#orderPaymentMethod:focus{border-color:rgba(17,19,24,.22)}
