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

:root {
  --background: #0b0d10;
  --surfaces: #12161b;
  --surfaces2: #0f1318;

  --words: #e9ebef;
  --muteds: #a4acb8;

  --green: #34e88f;
  --green2: #18c974;
  --greenA: rgba(52, 232, 143, .14);
  --greenB: rgba(52, 232, 143, .30);

  --vip-color: #ff4d4d;
  /* поменяй на #34e88f для зелёного */

  --diamond: #94ff8f;
  --diamondGlow: rgb(122 255 146 / 8%);

  --shadows: 0 16px 40px rgba(0, 0, 0, .55);
  --shadows2: 0 12px 28px rgba(0, 0, 0, .55);

  --r: 14px;
  --r2: 12px;
  --header-h: 70px;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--words);
  padding-top: 72px;

}

/* ===== HEADER ===== */
.exchange-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;

  height: 72px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 18px;

  background: var(--background);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  backdrop-filter: blur(10px);
}

.exchange-header::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(52, 232, 143, .45), transparent);
  opacity: .55;
  pointer-events: none;
}

/* ===== LOGO ===== */
.logo {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;

  /*padding: 9px 10px;*/
  border-radius: var(--r);
  text-decoration: none;
  color: var(--words);

  border: 1px solid transparent;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.logo:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .03);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .25);
}

.logo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--r);
  background: linear-gradient(120deg, transparent 35%, rgba(255, 255, 255, .07), transparent 65%);
  transform: translateX(-30%);
  opacity: 0;
  transition: opacity .16s ease;
  pointer-events: none;
}

.logo:hover::after {
  opacity: 1;
  animation: sheen 1.05s ease forwards;
}

@keyframes sheen {
  from {
    transform: translateX(-35%);
  }

  to {
    transform: translateX(35%);
  }
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .12);
  background: #0c0f13;
}

.logo-name {
  font-weight: 950;
  letter-spacing: .3px;
  font-size: 14px;
  line-height: 1.05;
  color: var(--green);
  text-shadow: 0 0 18px rgba(52, 232, 143, .12);
}

.logo-sub {
  font-size: 12px;
  color: var(--muteds);
  margin-top: 2px;
}

/* ===== NAV (desktop) ===== */
.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  color: white;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: var(--r);
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.nav-item:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, .03);
  border-color: rgba(255, 255, 255, .10);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .18);
}

.nav-ico {
  width: 16px;
  height: 16px;
  opacity: .92;
}

.nav-label {
  font-weight: 780;
  font-size: 13px;
  letter-spacing: .1px;
}

.chev {
  width: 14px;
  height: 14px;
  opacity: .65;
  transform-origin: 50% 55%;
  transition: transform .18s ease, opacity .18s ease;
}

.nav-item:hover .chev {
  transform: translateY(1px);
  opacity: .9;
}

.nav-item.open .chev {
  transform: rotate(180deg);
  opacity: .95;
}

.nav-item.open:hover .chev {
  transform: rotate(180deg) translateY(1px);
}


.nav-item::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 14px;
}

.nav-tag {
  margin-left: 2px;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .35px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #ffffff;
  line-height: 1.2;
  border: 1px solid rgba(255, 255, 255, .10);
}

.nav-tag.new {
  background: linear-gradient(135deg, var(--green), var(--green2));
  border-color: rgba(52, 232, 143, .30);
  box-shadow: 0 8px 18px rgba(52, 232, 143, .10);
}


/* ===== PRIME NAV TAB ===== */
.prime-nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;

  padding: 9px 12px;
  border-radius: 999px;

  text-decoration: none;
  color: var(--words);

  border: 1px solid rgba(52, 232, 143, .26);
  background: rgba(255, 255, 255, .02);

  font-weight: 950;
  letter-spacing: .35px;
  font-size: 12.5px;

  overflow: hidden;
  transform: translateZ(0);

  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.prime-gem {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .02);
}

.prime-gem svg path {
  stroke: rgba(255, 255, 255, .92);
}

.prime-nav::before {
  content: "";
  position: absolute;
  inset: -40% -60%;
  background: linear-gradient(120deg, transparent 35%, rgba(255, 255, 255, .12) 45%, rgba(52, 232, 143, .18) 52%, rgba(255, 255, 255, .10) 58%, transparent 70%);
  opacity: .85;
  transform: translateX(-25%);
  animation: primeShimmer 2.6s linear infinite;
  pointer-events: none;
}

.prime-nav::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120px 60px at 20% 35%, rgba(52, 232, 143, .14), transparent 60%),
    radial-gradient(140px 60px at 85% 70%, rgba(255, 255, 255, .06), transparent 65%);
  opacity: .9;
  pointer-events: none;
}

.prime-nav:hover::before {
  animation-play-state: paused;
  opacity: .35;
}

.prime-nav:hover {
  transform: translateY(-1px);
  border-color: rgba(52, 232, 143, .44);
  background: rgba(255, 255, 255, .03);
  box-shadow: 0 0 0 3px rgba(52, 232, 143, .10), 0 12px 26px rgba(0, 0, 0, .22);
}

@keyframes primeShimmer {
  from {
    transform: translateX(-30%);
  }

  to {
    transform: translateX(30%);
  }
}

/* ===== DROPDOWN (desktop) ===== */
.dropdown {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);

  min-width: 252px;
  padding: 9px;

  border-radius: var(--r);
  background: var(--surfaces);
  border: 1px solid rgba(255, 255, 255, .12);


  opacity: 0;
  transform: translateY(-10px) scale(.985);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s cubic-bezier(.2, .8, .2, 1);
}

.nav-item.open .dropdown {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.dropdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  padding: 10px 10px 9px;
  margin-bottom: 6px;

  border-radius: 12px;
  background: #0f1318;
  border: 1px solid rgba(255, 255, 255, .08);
}

.dropdown-title {
  font-weight: 900;
  font-size: 12px;
  color: var(--muteds);
  letter-spacing: .2px;
  text-transform: uppercase;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  color: var(--words);
  background: #0c1015;
}

.badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(52, 232, 143, .12);
}

.dropdown a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: var(--r2);
  text-decoration: none;
  color: var(--words);
  border: 1px solid transparent;
  transition: transform .14s ease, background .14s ease, border-color .14s ease;
}

.dropdown a:hover {
  transform: translateX(2px);
  background: rgba(255, 255, 255, .03);
  border-color: rgba(255, 255, 255, .10);
}

.dropdown a::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  width: 0;
  height: 16px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(52, 232, 143, .95);
  opacity: 0;
  transition: width .14s ease, opacity .14s ease;
}

.dropdown a:hover::before {
  width: 2px;
  opacity: .9;
}

.item-ico {
  width: 16px;
  height: 16px;
  opacity: .9;
}

.item-meta {
  margin-left: auto;
  font-size: 12px;
  color: var(--muteds);
  transition: color .14s ease;
}

.dropdown a:hover .item-meta {
  color: rgba(52, 232, 143, .92);
}

/* ===== BUTTONS ===== */
.btn {
  height: 40px;
  padding: 0 12px;
  border-radius: var(--r);
  border: 1px solid rgba(255, 255, 255, .10);
  background: #0c0f13;
  color: var(--words);
  font-weight: 950;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, .03);
  border-color: rgba(255, 255, 255, .14);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .20);
}

.btn-primary {
  border-color: rgba(52, 232, 143, .28);
}

.btn-primary:hover {
  border-color: rgba(52, 232, 143, .48);
}

.btn-success {
  border-color: rgba(52, 232, 143, .28);
  background: linear-gradient(180deg, rgba(52, 232, 143, .14), rgba(0, 0, 0, .05));
}

.btn-success:hover {
  border-color: rgba(52, 232, 143, .52);
  box-shadow: 0 0 0 3px rgba(52, 232, 143, .08), 0 10px 22px rgba(0, 0, 0, .22);
}

.btn-ghost {
  background: rgba(255, 255, 255, .02);
}

.icon-btn {
  width: 40px;
  padding: 0;
  display: grid;
  place-items: center;
}

/* ===== RIGHT ===== */
.right-panel {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== LANGUAGE SELECTOR (desktop dropdown) ===== */
.lang {
  position: relative;
  display: flex;
  align-items: center;
  height: 40px;
  border-radius: var(--r);
  border: 1px solid rgba(255, 255, 255, .10);
  background: #0c0f13;
  cursor: pointer;
  padding: 0 10px;
  gap: 8px;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.lang:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, .03);
  border-color: rgba(255, 255, 255, .14);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .20);
}

.lang.open {
  border-color: var(--greenB);
  box-shadow: 0 0 0 3px var(--greenA), 0 10px 22px rgba(0, 0, 0, .20);
}

.lang .lang-code {
  font-weight: 950;
  letter-spacing: .25px;
  font-size: 12.5px;
}

.lang .lang-ico {
  width: 16px;
  height: 16px;
  opacity: .92;
}

.lang::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 14px;
}

.lang:hover .chev {
  transform: translateY(1px);
  opacity: .92;
}

.lang.open .chev {
  transform: rotate(180deg);
  opacity: .95;
}

.lang.open:hover .chev {
  transform: rotate(180deg) translateY(1px);
}

.lang-dd {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 220px;
  padding: 9px;
  border-radius: var(--r);
  background: var(--surfaces);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: var(--shadows2);
  opacity: 0;
  transform: translateY(-10px) scale(.985);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s cubic-bezier(.2, .8, .2, 1);
}

.lang.open .lang-dd {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.lang-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: var(--r2);
  border: 1px solid transparent;
  background: transparent;
  color: var(--words);
  text-decoration: none;
  cursor: pointer;
  transition: transform .14s ease, background .14s ease, border-color .14s ease;
}

.lang-item:hover {
  transform: translateX(2px);
  background: rgba(255, 255, 255, .03);
  border-color: rgba(255, 255, 255, .10);
}

.lang-item .pill {
  margin-left: auto;
  font-size: 11px;
  font-weight: 950;
  color: var(--muteds);
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(0, 0, 0, .10);
  padding: 4px 8px;
  border-radius: 999px;
}

.lang-item.active .pill {
  color: #0b0d10;
  background: linear-gradient(135deg, var(--green), var(--green2));
  border-color: rgba(52, 232, 143, .30);
}

/* ===== MOBILE MENU BUTTON (animated burger) ===== */
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--r);
  border: 1px solid rgba(255, 255, 255, .10);
  background: #0c0f13;
  color: var(--words);
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
  position: relative;
}

.mobile-menu-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, .03);
  border-color: rgba(255, 255, 255, .14);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .20);
}

.burger {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 14px;
  transform: translate(-50%, -50%);
}

.burger span {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform .18s ease, opacity .18s ease, top .18s ease;
}

.burger span:nth-child(1) {
  top: 0;
}

.burger span:nth-child(2) {
  top: 6px;
  opacity: .92;
}

.burger span:nth-child(3) {
  top: 12px;
}

body.m-open .burger span:nth-child(1) {
  top: 6px;
  transform: rotate(45deg);
}

body.m-open .burger span:nth-child(2) {
  opacity: 0;
}

body.m-open .burger span:nth-child(3) {
  top: 6px;
  transform: rotate(-45deg);
}

/* ===== PROFILE ===== */
.profile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 10px 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: #0c0f13;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.profile:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, .03);
  border-color: rgba(255, 255, 255, .14);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .20);
}

.profile:hover .chev {
  transform: translateY(1px);
  opacity: .92;
}

.profile.open {
  border-color: var(--greenB);
  box-shadow: 0 0 0 3px var(--greenA), 0 10px 22px rgba(0, 0, 0, .20);
}

.profile.open .chev {
  transform: rotate(180deg);
  opacity: .95;
}

.profile.open:hover .chev {
  transform: rotate(180deg) translateY(1px);
}

.profile::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 14px;
}

.profile-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 360px;
  padding: 12px;
  border-radius: var(--r);
  background: var(--surfaces);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: var(--shadows);
  opacity: 0;
  transform: translateY(-10px) scale(.985);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s cubic-bezier(.2, .8, .2, 1);
}

.profile.open .profile-dropdown {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* ===== user-card clickable ===== */
.user-card {
  border-radius: 14px;
  background: #0f1318;
  border: 1px solid rgba(255, 255, 255, .08);
  padding: 12px;
  margin-bottom: 10px;
}

.user-card-link {
  display: block;
  text-decoration: none;
  color: var(--words);
  position: relative;
  overflow: hidden;
  transform: translateZ(0);

  transition: transform .18s cubic-bezier(.2, .9, .2, 1),
    box-shadow .18s ease,
    border-color .18s ease,
    background .18s ease;
}

.user-card-link .u-soft {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background:
    radial-gradient(160px 70px at 20% 25%, rgba(52, 232, 143, .10), transparent 60%),
    radial-gradient(220px 90px at 85% 80%, rgba(255, 255, 255, .05), transparent 65%);
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
}

.user-card-link .u-line {
  position: absolute;
  left: 14px;
  right: 14px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(52, 232, 143, .65), transparent);
  opacity: 0;
  transform: scaleX(.25);
  transform-origin: center;
  transition: transform .22s cubic-bezier(.2, .9, .2, 1), opacity .18s ease;
  pointer-events: none;
}

.user-card-link .u-line.top {
  top: 10px;
}

.user-card-link .u-line.bottom {
  bottom: 10px;
}

.user-card-link .u-border {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  border: 1px solid rgba(52, 232, 143, .00);
  transition: border-color .18s ease;
  pointer-events: none;
}

.user-card-link:hover {
  transform: translateY(-2px);
  border-color: rgba(52, 232, 143, .22);
  background: linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(0, 0, 0, .08));
  box-shadow: 0 0 0 3px rgba(52, 232, 143, .08), 0 16px 34px rgba(0, 0, 0, .35);
}

.user-card-link:hover .u-soft {
  opacity: 1;
}

.user-card-link:hover .u-line {
  opacity: 1;
  transform: scaleX(1);
}

.user-card-link:hover .u-border {
  border-color: rgba(52, 232, 143, .22);
}

.user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 950;
  border: 1px solid rgba(255, 255, 255, .14);
  background: radial-gradient(18px 18px at 35% 30%, rgba(52, 232, 143, .22), transparent 60%), #10151b;
}

.user-name {
  font-weight: 950;
  font-size: 14px;
  line-height: 1.15;
}

.user-sub {
  font-size: 12px;
  color: var(--muteds);
  margin-top: 3px;
}

.user-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  position: relative;
  z-index: 1;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: #0c1015;
  font-size: 12px;
  font-weight: 900;
}

.stat-pill .k {
  color: var(--muteds);
  font-weight: 900;
}

.stat-pill .v {
  color: var(--words);
}

.vip-pill {
  border-color: color-mix(in srgb, var(--vip-color) 42%, rgba(255, 255, 255, .10));
}

.vip-pill .v {
  color: #fff;
  background: var(--vip-color);
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 950;
  letter-spacing: .2px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}

/* ===== RANK ===== */
.rank-wrap {
  border-radius: 14px;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(0, 0, 0, .08));
  margin-bottom: 10px;
}

.rank-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.rank-title .t {
  font-weight: 950;
  letter-spacing: .2px;
}

.rank-title .hint {
  font-size: 12px;
  color: var(--muteds);
}

.rank-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: #0f1318;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: var(--words);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease, background .15s ease;
  --rank: var(--diamond);
  --rank-glow: var(--diamondGlow);
  --rank-border: rgba(122, 168, 255, .32);
  --rank-bg: linear-gradient(135deg, rgba(122, 168, 255, .50), rgba(122, 168, 255, .18));
}

.rank-badge::before {
  content: "";
  position: absolute;
  inset: -40% -60%;
  background: radial-gradient(circle at 30% 35%, var(--rank-glow), transparent 55%);
  opacity: .9;
  pointer-events: none;
}

.rank-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .02);
}

.rank-name {
  font-weight: 980;
  font-size: 14px;
  line-height: 1.1;
  color: var(--rank);
}

.rank-sub {
  font-size: 12px;
  color: var(--muteds);
  margin-top: 3px;
}

.rank-chip {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  border: 1px solid var(--rank-border);
  background: var(--rank-bg);
  color: #fff;
  box-shadow: 0 12px 26px rgba(0, 0, 0, .22);
}

.rank-chip .spark {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #fff;
  opacity: .9;
}

.rank-go {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .02);
  margin-left: 8px;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.rank-badge:hover {
  transform: translateY(-1px);
  border-color: var(--rank-border);
  box-shadow: 0 0 0 3px var(--rank-glow), 0 14px 30px rgba(0, 0, 0, .28);
  background: linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(0, 0, 0, .10));
}

.rank-badge:hover .rank-go {
  transform: translateX(2px);
  border-color: rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .03);
}

.rank-icon svg path {
  stroke: var(--rank);
}

.profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.profile-actions a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 10px;
  border-radius: var(--r2);
  text-decoration: none;
  color: var(--words);
  border: 1px solid rgba(255, 255, 255, .08);
  background: var(--surfaces2);
  transition: transform .14s ease, border-color .14s ease, background .14s ease;
}

.profile-actions a:hover {
  transform: translateX(2px);
  background: rgba(255, 255, 255, .03);
  border-color: rgba(52, 232, 143, .22);
}

.logout {
  grid-column: 1 / -1;
  border-color: rgba(255, 107, 107, .18);
}

.logout span {
  margin-left: auto;
  color: rgba(255, 107, 107, .92);
  font-weight: 950;
}

/* ===== MOBILE DRAWER ===== */
.m-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .58);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  z-index: 60;
}

.m-drawer {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 100dvh;
  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  z-index: 61;
}

.m-panel {
  margin: 10px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: linear-gradient(180deg, rgba(18, 22, 27, .92), rgba(18, 22, 27, .86));
  backdrop-filter: blur(14px);
  box-shadow: var(--shadows);

  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 20px);
}

.m-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  padding: 12px 12px 10px;

  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0, 0, 0, .10);
}

.m-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.m-title strong {
  font-size: 13px;
  letter-spacing: .3px;
}

.m-title span {
  font-size: 12px;
  color: var(--muteds);
}

.m-close {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .02);
  color: var(--words);
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

.m-close:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, .04);
  border-color: rgba(255, 255, 255, .14);
}

.m-body {
  padding: 12px;
  overflow: auto;
}

.m-actions {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0, 0, 0, .10);
}

.m-actions .btn {
  flex: 1;
  height: 44px;
  border-radius: 16px;
}

.m-lang {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .02);
  margin-bottom: 10px;
}

.m-lang .globe {
  width: 18px;
  height: 18px;
  opacity: .92;
}

.m-lang label {
  font-weight: 950;
  letter-spacing: .15px;
  font-size: 13px;
}

.m-lang select {
  margin-left: auto;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(0, 0, 0, .16);
  color: var(--words);
  font-weight: 900;
  padding: 0 10px;
  outline: none;
}

.m-lang select:focus {
  border-color: rgba(52, 232, 143, .35);
  box-shadow: 0 0 0 3px rgba(52, 232, 143, .10);
}

.m-acc {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .02);
  overflow: hidden;
  margin-bottom: 10px;
}

.m-acc summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  user-select: none;
}

.m-acc summary::-webkit-details-marker {
  display: none;
}

.m-acc .m-slabel {
  font-weight: 950;
  letter-spacing: .15px;
  font-size: 13px;
}

.m-acc .m-chev {
  margin-left: auto;
  width: 18px;
  height: 18px;
  opacity: .7;
  transition: transform .18s ease, opacity .18s ease;
}

.m-acc[open] .m-chev {
  transform: rotate(180deg);
  opacity: .95;
}

.m-list {
  padding: 6px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.m-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--words);
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0, 0, 0, .10);
  transition: transform .14s ease, background .14s ease, border-color .14s ease;
}

.m-link:hover {
  transform: translateX(2px);
  background: rgba(255, 255, 255, .03);
  border-color: rgba(52, 232, 143, .18);
}

.m-link .m-meta {
  margin-left: auto;
  color: var(--muteds);
  font-size: 12px;
  font-weight: 800;
}

.m-link .item-ico {
  width: 16px;
  height: 16px;
  opacity: .92;
}

.m-prime {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(52, 232, 143, .26);
  background: rgba(255, 255, 255, .02);
  text-decoration: none;
  color: var(--words);
  font-weight: 980;
  letter-spacing: .35px;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}

.m-prime::before {
  content: "";
  position: absolute;
  inset: -40% -60%;
  background: linear-gradient(120deg, transparent 35%, rgba(255, 255, 255, .12) 45%, rgba(52, 232, 143, .18) 52%, rgba(255, 255, 255, .10) 58%, transparent 70%);
  opacity: .70;
  transform: translateX(-25%);
  animation: primeShimmer 2.6s linear infinite;
  pointer-events: none;
}

body.m-lock {
  overflow: hidden;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 980px) {

  .exchange-header {
    padding: 0 12px;
    gap: 10px;
  }

  .btn-primary.deposit-btn {
    display: none;
  }

  /*.auth-actions{ display:none; }*/

  .profile-dropdown {
    top: var(--header-h);
    z-index: 1500;
  }

  /*width: min(92vw, 420px);*/

}

@media (max-width: 1330px) {
  .nav-item {
    display: none;
  }

  .nav-separator {
    display: none;
  }

  .prime-nav {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }
}

@media (max-width: 520px) {
  .logo-sub {
    display: none;
  }

  .logo-name {
    display: none;
  }

  .profile>div:nth-child(2) {
    display: none;
  }

  .profile {
    padding-right: 8px;
  }

  .lang .lang-code {
    display: none;
  }

  .lang {
    padding: 0 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

.signup-btn {
  position: relative;
  overflow: hidden;
}

.gift-wrap {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 4px;
}

.gift-ico {
  width: 18px;
  height: 18px;
  animation: giftFloat 2.4s ease-in-out infinite;
}

.signup-btn:hover .gift-ico {
  animation: giftWiggle .5s ease;
}

@keyframes giftFloat {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }

  100% {
    transform: translateY(0);
  }
}

@keyframes giftWiggle {
  0% {
    transform: rotate(0);
  }

  25% {
    transform: rotate(-12deg);
  }

  50% {
    transform: rotate(12deg);
  }

  75% {
    transform: rotate(-8deg);
  }

  100% {
    transform: rotate(0);
  }
}

@media (max-width: 460px) {
  .profile-dropdown {
    position: fixed;
    left: 50%;
    right: auto;
    /* важно */
    width: min(360px, calc(100vw - 24px));
    /* важно: не шире экрана */
    max-width: calc(100vw - 24px);

    transform: translateX(-50%) translateY(-10px) scale(.985);
    /* X первым */
  }

  .profile.open .profile-dropdown {
    transform: translateX(-50%) translateY(0) scale(1);
  }

  .profile, .header, body {
    transform: none !important;
    filter: none !important;
  }

  .lang.open .lang-dd {
    position: fixed;
    left: 50%;
    transform: translateY(0) scale(1) translateX(-50%);
  }

  .lang-dd {
    position: fixed;
    left: 50%;
    transform: translateY(-10px) scale(.985) translateX(-50%);
  }
}







/* ===== Header refinement: calmer / more premium desktop ===== */
.exchange-header {
  background:
    linear-gradient(180deg, rgba(10, 12, 16, .96), rgba(10, 12, 16, .90)),
    var(--background);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .22);
}

.exchange-header::before {
  background: linear-gradient(90deg, transparent, rgba(52, 232, 143, .22), transparent);
  opacity: .34;
}

.logo {
  padding: 6px 8px;
  border-radius: 16px;
}

.logo:hover {
  border-color: rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .022);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .18);
}

.nav {
  gap: 4px;
}

.nav-item {
  padding: 9px 9px;
  border-radius: 12px;
}

.nav-item:hover {
  background: rgba(255, 255, 255, .022);
  border-color: rgba(255, 255, 255, .08);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .14);
}

.nav-item.open {
  /*border-color: rgb(234 229 229 / 0.5);*/
  /*box-shadow: 0 0 0 2px rgba(52,232,143,.06), 0 10px 22px rgba(0,0,0,.18);*/
}

.nav-label {
  font-weight: 760;
}

.nav-ico {
  opacity: .82;
}

.chev {
  opacity: .52;
}

.nav-tag {
  font-size: 9px;
  padding: 2px 6px;
  letter-spacing: .28px;
  border-color: rgba(255, 255, 255, .08);
  box-shadow: none;
}

.nav-tag.new {
  background: rgba(52, 232, 143, .12);
  color: #b9f6d6;
  border-color: rgba(52, 232, 143, .18);
}

.nav-tag.top {
  background: linear-gradient(135deg, #ff9a3d, #ff7a18);
  border-color: rgba(255, 154, 61, .30);
  box-shadow: 0 8px 18px rgba(255, 154, 61, .10);
  color: black;
}

.dropdown {
  border: 1px solid rgba(255, 255, 255, .10);
  background: linear-gradient(180deg, rgba(18, 22, 27, .98), rgba(15, 19, 24, .96));

}

.dropdown-head {
  background: rgba(255, 255, 255, .018);
  border-color: rgba(255, 255, 255, .07);
}

.dropdown a:hover {
  background: rgba(255, 255, 255, .022);
  border-color: rgba(255, 255, 255, .08);
}

.dropdown a::before {
  background: rgba(52, 232, 143, .72);
}

.item-meta {
  color: rgba(164, 172, 184, .88);
}

.dropdown a:hover .item-meta {
  color: rgba(212, 244, 226, .92);
}

.prime-nav {
  padding: 9px 11px;
  border-color: rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .018);
  letter-spacing: .22px;
  font-size: 12px;
}

.prime-nav::before {
  display: none;
}

.prime-nav::after {
  background:
    radial-gradient(120px 60px at 20% 35%, rgba(52, 232, 143, .08), transparent 60%),
    radial-gradient(140px 60px at 85% 70%, rgba(255, 255, 255, .04), transparent 65%);
  opacity: .75;
}

.prime-nav:hover {
  border-color: rgba(52, 232, 143, .22);
  background: rgba(255, 255, 255, .026);
  box-shadow: 0 0 0 2px rgba(52, 232, 143, .06), 0 10px 22px rgba(0, 0, 0, .18);
}

.prime-gem {
  border-color: rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .018);
}

.right-panel {
  gap: 10px;
}

.lang,
.profile,
.btn,
.mobile-menu-btn {
  background: rgba(255, 255, 255, .018);
  border-color: rgba(255, 255, 255, .08);
}

.lang:hover,
.profile:hover,
.btn:hover,
.mobile-menu-btn:hover {
  background: rgba(255, 255, 255, .03);
  border-color: rgba(255, 255, 255, .12);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .18);
}

.btn-primary.deposit-btn {
  background: linear-gradient(180deg, rgba(52, 232, 143, .10), rgba(52, 232, 143, .03));
  border-color: rgba(52, 232, 143, .22);
  color: var(--words);
}

.btn-primary.deposit-btn:hover {
  border-color: rgba(52, 232, 143, .36);
  box-shadow: 0 0 0 2px rgba(52, 232, 143, .06), 0 10px 22px rgba(0, 0, 0, .18);
}

.profile {
  padding-right: 8px;
}

.profile-dropdown,
.lang-dd {
  border: 1px solid rgba(255, 255, 255, .10);
  background: linear-gradient(180deg, rgba(18, 22, 27, .98), rgba(15, 19, 24, .96));
  box-shadow: 0 18px 40px rgba(0, 0, 0, .36);
}

.user-card,
.rank-wrap,
.rank-badge {
  background: rgba(255, 255, 255, .018);
}

.user-card,
.rank-wrap,
.profile-dropdown,
.lang-dd {
  border-color: rgba(255, 255, 255, .08);
}

@media (min-width: 1331px) {
  .nav-item.more-quiet .nav-ico {
    opacity: .74;
  }

  .nav-item.more-quiet .nav-label {
    color: rgba(233, 235, 239, .88);
  }
}

/* ===== Desktop refinement: denser dropdowns / calmer profile menu ===== */
@media (min-width: 1025px) {
  .dropdown {
    background: linear-gradient(202deg, rgb(18 22 27), rgb(15 19 24));
    border-color: rgba(255, 255, 255, .09);

  }

  .dropdown-head {
    background: rgba(255, 255, 255, .028);
    border-color: rgba(255, 255, 255, .06);
  }

  .profile-dropdown {
    width: 344px;
    padding: 10px;
    border-radius: 16px;
    border-color: rgba(255, 255, 255, .09);
    background: linear-gradient(202deg, rgb(18 22 27), rgb(15 19 24));
    box-shadow: 0 24px 54px rgba(0, 0, 0, .44);
  }

  .user-card,
  .rank-wrap,
  .rank-badge,
  .profile-actions a {
    background: linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(255, 255, 255, .01));
    border-color: rgba(255, 255, 255, .07);
    box-shadow: none;
  }

  .user-card,
  .rank-wrap {
    border-radius: 16px;
  }

  .user-card {
    padding: 14px;
    margin-bottom: 8px;
  }

  .user-card-link {
    transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
  }

  .user-card-link .u-soft,
  .user-card-link .u-line {
    display: none;
  }

  .user-card-link .u-border {
    border-color: rgba(255, 255, 255, 0);
  }

  .user-card-link:hover {
    transform: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, .024), rgba(255, 255, 255, .012));
    border-color: rgba(255, 255, 255, .10);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
  }

  .user-card-link:hover .u-border {
    border-color: rgba(255, 255, 255, .08);
  }

  .user-avatar {
    width: 42px;
    height: 42px;
    border-color: rgba(255, 255, 255, .10);
    background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .015));
  }

  .user-name {
    font-size: 13.5px;
  }

  .user-sub,
  .rank-title .hint,
  .rank-sub,
  .stat-pill .k {
    color: rgba(164, 172, 184, .84);
  }

  .user-meta {
    flex: 1;
    min-width: 0;
  }

  .user-name-line {
    display: inline-flex;
    align-items: flex-start;
    gap: 5px;
    max-width: 100%;
    min-width: 0;
  }

  .user-name-line .user-name {
    min-width: 0;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .user-verify-mark {
    position: relative;
    top: -5px;
    display: inline-flex;
    align-items: center;
    height: 17px;
    padding: 0 5px;
    border-radius: 5px;
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
    letter-spacing: .01em;
    text-transform: none;
    flex: 0 0 auto;
  }

  .user-verify-mark.is-unverified {
    color: rgba(255, 255, 255, .50);
    background: rgba(255, 255, 255, .075);
    border: 1px solid rgba(255, 255, 255, .06);
  }

  .user-verify-mark.is-verified {
    color: #34e88f;
    background: rgba(52, 232, 143, .105);
    border: 1px solid rgba(52, 232, 143, .20);
    box-shadow: 0 0 14px rgba(52, 232, 143, .07);
  }

  .stat-pill {
    gap: 7px;
    padding: 6px 10px;
    border-color: rgba(255, 255, 255, .08);
    background: rgba(8, 11, 15, .55);
  }

  .vip-pill {
    border-color: rgba(255, 255, 255, .08);
  }

  .vip-pill .v {
    background: rgba(255, 255, 255, .08);
    color: var(--words);
    box-shadow: none;
  }

  .rank-wrap {
    padding: 12px;
    margin-bottom: 8px;
  }

  .rank-title {
    margin-bottom: 8px;
  }

  .rank-title .t {
    font-size: 13px;
    font-weight: 900;
  }

  .rank-badge {
    gap: 12px;
    padding: 12px;
    border-radius: 15px;
    --rank: #3eab70;
    --rank-glow: rgba(122, 168, 255, .08);
    --rank-border: rgba(255, 255, 255, .09);
    --rank-bg: rgba(255, 255, 255, .07);
  }

  .rank-badge::before {
    display: none;
  }

  .rank-icon {
    width: 36px;
    height: 36px;
    border-color: rgba(143, 182, 255, .18);
    background: rgba(143, 182, 255, .05);
  }

  .rank-name {
    font-size: 13.5px;
    color: #16c97a;
  }

  .rank-chip {
    gap: 6px;
    padding: 6px 10px;
    border-color: rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .07);
    color: var(--words);
    box-shadow: none;
  }

  .rank-chip .spark {
    width: 6px;
    height: 6px;
    opacity: .72;
  }

  .rank-go {
    width: 32px;
    height: 32px;
    border-color: rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .025);
  }

  .rank-badge:hover {
    transform: none;
    border-color: rgba(255, 255, 255, .10);
    background: linear-gradient(180deg, rgba(255, 255, 255, .026), rgba(255, 255, 255, .014));
    box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
  }

  .rank-badge:hover .rank-go {
    transform: none;
    border-color: rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .035);
  }

  .profile-actions {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .profile-actions a {
    padding: 11px 12px;
    border-radius: 13px;
    transition: border-color .14s ease, background .14s ease, color .14s ease;
  }

  .profile-actions a:hover {
    transform: none;
    background: rgba(255, 255, 255, .028);
    border-color: rgba(255, 255, 255, .10);
  }

  .logout {
    border-color: rgba(255, 255, 255, .07);
  }

  /*.logout span{*/
  /*  color: rgba(255,255,255,.54);*/
  /*}*/
}

/* ===== Mobile adaptation: no header language / full-screen account sheet / vertical actions ===== */
@media (max-width: 980px) {
  .right-panel>.lang {
    display: none !important;
  }

  .lang-dd {
    display: none !important;
  }

  .profile-dropdown {
    position: fixed;
    left: 0;
    right: 0;
    top: calc(var(--header-h) + 2px);
    bottom: 0;
    width: 100vw;
    max-width: none;
    height: auto;
    padding: 12px 12px max(18px, env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    border-top: 1px solid rgba(255, 255, 255, .08);
    background: linear-gradient(180deg, rgba(14, 18, 23, .985), rgba(10, 13, 18, .985));
    box-shadow: 0 -18px 44px rgba(0, 0, 0, .34);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 64;
    opacity: 0;
    transform: translateY(22px);
    pointer-events: none;
  }

  .profile.open .profile-dropdown {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .profile-dropdown .user-card,
  .profile-dropdown .rank-wrap {
    margin-bottom: 8px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .022), rgba(255, 255, 255, .01));
    border-color: rgba(255, 255, 255, .07);
  }

  .profile-dropdown .profile-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .profile-dropdown .profile-actions a {
    width: 100%;
    min-height: 50px;
    padding: 0 14px;
    border-radius: 15px;
    background: rgba(255, 255, 255, .012);
    border: 1px solid rgba(255, 255, 255, .06);
  }

  .profile-dropdown .profile-actions a:hover {
    transform: none;
    background: rgba(255, 255, 255, .028);
    border-color: rgba(255, 255, 255, .09);
  }

  .profile-dropdown .profile-actions>a:nth-child(1) {
    order: 1;
  }

  .profile-dropdown .profile-actions>a:nth-child(3) {
    order: 2;
  }

  .profile-dropdown .profile-actions>a:nth-child(2) {
    order: 3;
  }

  .profile-dropdown .profile-actions>a:nth-child(4) {
    order: 4;
  }

  .profile-dropdown .profile-actions>a.logout {
    order: 5;
  }

  .profile-dropdown .logout {
    margin-top: 2px;
    background: rgba(255, 92, 92, .03);
    border-color: rgba(255, 92, 92, .14);
  }

  .profile-dropdown .logout span {
    color: rgba(255, 140, 140, .94);
  }

  .m-panel {
    margin: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    max-height: 100dvh;
  }

  .m-head {
    padding-top: max(12px, env(safe-area-inset-top));
  }

  .m-lang {
    border-radius: 16px;
    border-color: rgba(255, 255, 255, .08);
    background: linear-gradient(180deg, rgba(255, 255, 255, .022), rgba(255, 255, 255, .01));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
  }

  .m-lang label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .22px;
    color: rgba(164, 172, 184, .92);
  }

  .m-lang select {
    min-width: 112px;
    border-color: rgba(255, 255, 255, .08);
    background: rgba(8, 12, 16, .72);
  }
}

/* ===== Desktop profile actions: keep as one vertical list ===== */
@media (min-width: 1025px) {
  .profile-dropdown .profile-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .profile-dropdown .profile-actions a {
    width: 100%;
  }

  .profile-dropdown .profile-actions>a:nth-child(1) {
    order: 1;
  }

  .profile-dropdown .profile-actions>a:nth-child(3) {
    order: 2;
  }

  .profile-dropdown .profile-actions>a:nth-child(2) {
    order: 3;
  }

  .profile-dropdown .profile-actions>a:nth-child(4) {
    order: 4;
  }

  .profile-dropdown .profile-actions>a.logout {
    order: 5;
  }
}

/* ===== Mobile full-screen sheets: language moved into m-panel ===== */
@media (max-width: 980px) {
  :root {
    --mobile-sheet-top: calc(var(--header-h) + env(safe-area-inset-top));
  }

  .right-panel>.lang,
  .lang-dd {
    display: none !important;
  }

  .m-overlay {
    background: rgba(5, 7, 10, .72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: opacity .26s ease;
  }

  .m-drawer {
    inset: 0;
    height: 100dvh;
    transform: translateY(100%);
    opacity: 1;
    transition: transform .34s cubic-bezier(.22, .9, .24, 1);
  }

  body.m-open .m-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  body.m-open .m-drawer {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .m-panel {
    margin: 0;
    width: 100%;
    max-width: 100%;
    min-height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: 0;
    background: linear-gradient(180deg, rgba(14, 18, 23, .992), rgba(10, 13, 18, .992));
    box-shadow: none;
  }

  .m-head {
    padding: max(14px, env(safe-area-inset-top)) 16px 12px;
    background: rgba(255, 255, 255, .01);
  }

  .m-body {
    padding: 14px 16px 16px;
  }

  .m-actions {
    padding: 12px 16px max(16px, env(safe-area-inset-bottom));
  }

  .profile-dropdown {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    margin: 0;
    padding: calc(var(--header-h) + env(safe-area-inset-top) + 12px) 16px max(18px, env(safe-area-inset-bottom));
    border-radius: 0;
    border: 0;
    background: linear-gradient(180deg, rgba(14, 18, 23, .992), rgba(10, 13, 18, .992));
    box-shadow: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 64;
    opacity: 0;
    transform: translateY(100%);
    transition: transform .34s cubic-bezier(.22, .9, .24, 1), opacity .22s ease;
    pointer-events: none;
  }

  .profile.open .profile-dropdown {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .profile-dropdown .user-card,
  .profile-dropdown .rank-wrap {
    margin-bottom: 8px;
    border-radius: 18px;
  }
}


/* ===== Mobile profile sheet: lock background / close button / language in drawer ===== */
.profile-sheet-close {
  display: none;
}

@media (max-width: 980px) {

  html:has(body.p-lock),
  body.p-lock {
    overflow: hidden;
    touch-action: none;
  }

  .m-body {
    overscroll-behavior: contain;
  }

  .profile-dropdown {
    overscroll-behavior: contain;
    padding-top: calc(var(--header-h) + env(safe-area-inset-top) + 64px);
  }

  .profile-sheet-close {
    position: fixed;
    top: calc(var(--header-h) + env(safe-area-inset-top) + 12px);
    right: 16px;
    z-index: 3;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .04);
    color: var(--words);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .24);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .profile-sheet-close:active {
    transform: scale(.98);
  }
}


/* ===== Mobile header-driven sheets cleanup ===== */
.m-head,
.m-close,
.profile-sheet-close {
  display: none !important;
}

@media (max-width: 980px) {
  .m-panel {
    padding-top: calc(var(--header-h) + env(safe-area-inset-top));
  }

  .m-body {
    padding: 14px 16px 16px;
  }

  .profile-dropdown {
    padding-top: 10px;
  }
}


/* ===== Header repair + cleanup ===== */
.exchange-header a,
.exchange-header button,
.m-panel a,
.m-panel button {
  text-decoration: none;
  color: inherit;
}

.dropdown,
.lang-dd,
.profile-dropdown {
  visibility: hidden;
  z-index: 1200;
}

.nav-item.open .dropdown,
.lang.open .lang-dd,
.profile.open .profile-dropdown {
  visibility: visible;
}

.dropdown-head,
.prime-nav,
.m-prime {
  display: none !important;
}

.m-acc {
  border: 0;
  background: transparent;
  border-radius: 0;
  margin-bottom: 2px;
}

.m-acc+.m-acc {
  border-top: 1px solid rgba(255, 255, 255, .06);
}

.m-acc summary {
  padding: 14px 4px;
}

.m-list {
  padding: 0 0 12px 0;
  gap: 4px;
}

.m-link {
  border: 0;
  background: transparent;
  border-radius: 14px;
  padding: 11px 10px;
}

.m-link:hover {
  transform: none;
  background: rgba(255, 255, 255, .035);
  border-color: transparent;
}

.m-lang {
  position: relative;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .025), rgba(255, 255, 255, .012));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

.m-lang select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  min-width: 132px;
  padding: 0 34px 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(10, 14, 18, .9), rgba(7, 10, 14, .9));
  color: var(--words);
  background-image: linear-gradient(45deg, transparent 50%, rgba(233, 235, 239, .78) 50%), linear-gradient(135deg, rgba(233, 235, 239, .78) 50%, transparent 50%);
  background-position: calc(100% - 16px) 16px, calc(100% - 11px) 16px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .02);
}

.auth-actions {
  gap: 10px;
}

.auth-actions .btn {
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.auth-actions .btn-ghost {
  border-color: rgba(255, 255, 255, .12);
  background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .015));
  color: var(--words);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

.auth-actions .btn-ghost:hover {
  border-color: rgba(255, 255, 255, .18);
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
}

.auth-actions .btn-success {
  border-color: rgba(52, 232, 143, .34);
  background: linear-gradient(180deg, rgba(52, 232, 143, .22), rgba(24, 201, 116, .14));
  color: #f6fbf8;
  box-shadow: 0 10px 24px rgba(16, 72, 48, .22), inset 0 1px 0 rgba(255, 255, 255, .14);
}

.auth-actions .btn-success:hover {
  border-color: rgba(52, 232, 143, .48);
  background: linear-gradient(180deg, rgba(52, 232, 143, .28), rgba(24, 201, 116, .18));
  box-shadow: 0 12px 28px rgba(16, 72, 48, .26), inset 0 1px 0 rgba(255, 255, 255, .16);
}

@media (max-width: 980px) {
  .m-lang {
    margin-bottom: 14px;
  }
}


/* ===== Custom mobile language picker ===== */
.m-lang {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.m-lang-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.m-lang-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .22em;
  color: rgba(164, 172, 184, .92);
  font-weight: 900;
}

.m-lang-trigger {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(10, 14, 18, .96), rgba(7, 10, 14, .94));
  color: var(--words);
  font: inherit;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.m-lang-trigger:active {
  transform: scale(.995);
}

.m-lang-trigger:hover,
.m-lang.open .m-lang-trigger {
  border-color: rgba(52, 232, 143, .22);
  box-shadow: 0 0 0 3px rgba(52, 232, 143, .08), inset 0 1px 0 rgba(255, 255, 255, .03);
}

.m-lang-current {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -.01em;
}

.m-lang-current-code {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: rgba(233, 235, 239, .82);
  font-size: 11px;
  font-weight: 950;
  text-transform: lowercase;
}

.m-lang-chev {
  width: 18px;
  height: 18px;
  opacity: .75;
  transition: transform .18s ease, opacity .18s ease;
}

.m-lang.open .m-lang-chev {
  transform: rotate(180deg);
  opacity: .95;
}

.m-lang-menu {
  display: grid;
  gap: 8px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  transition: max-height .22s ease, opacity .18s ease, transform .18s ease;
}

.m-lang.open .m-lang-menu {
  max-height: 520px;
  opacity: 1;
  transform: translateY(0);
}

.m-lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .025);
  color: var(--words);
  text-decoration: none;
  font-weight: 900;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.m-lang-option:hover {
  transform: none;
  background: rgba(255, 255, 255, .04);
  border-color: rgba(255, 255, 255, .12);
}

.m-lang-option .pill {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0, 0, 0, .14);
  color: rgba(164, 172, 184, .96);
  font-size: 11px;
  font-weight: 950;
}

.m-lang-option.active {
  border-color: rgba(52, 232, 143, .22);
  background: linear-gradient(180deg, rgba(52, 232, 143, .09), rgba(52, 232, 143, .04));
}

.m-lang-option.active .pill {
  color: #0b0d10;
  background: linear-gradient(135deg, var(--green), var(--green2));
  border-color: rgba(52, 232, 143, .22);
}

.rank-name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.rank-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.3;
}

.rank-basic .rank-name {
  color: #c9c9c9;
}

.rank-starter .rank-name {
  color: #c0c0c0;
}

.rank-active .rank-name {
  color: #cd7f32;
}

.rank-trader .rank-name {
  color: #ffd166;
}

.rank-pro .rank-name {
  color: #9be7ff;
}

.rank-vip .rank-name {
  color: #34e88f;
}

.rank-badge.rank-basic {
  --rank: #c9c9c9;
  --rank-glow: rgba(201, 201, 201, .18);
  --rank-border: rgba(201, 201, 201, .28);
  --rank-bg: linear-gradient(135deg, rgba(201, 201, 201, .24), rgba(201, 201, 201, .08));
}

.rank-badge.rank-starter {
  --rank: #c0c0c0;
  --rank-glow: rgba(192, 192, 192, .18);
  --rank-border: rgba(192, 192, 192, .28);
  --rank-bg: linear-gradient(135deg, rgba(192, 192, 192, .24), rgba(192, 192, 192, .08));
}

.rank-badge.rank-active {
  --rank: #cd7f32;
  --rank-glow: rgba(205, 127, 50, .22);
  --rank-border: rgba(205, 127, 50, .30);
  --rank-bg: linear-gradient(135deg, rgba(205, 127, 50, .28), rgba(205, 127, 50, .09));
}

.rank-badge.rank-trader {
  --rank: #ffd166;
  --rank-glow: rgba(255, 209, 102, .26);
  --rank-border: rgba(255, 209, 102, .36);
  --rank-bg: linear-gradient(135deg, rgba(255, 209, 102, .32), rgba(255, 209, 102, .11));
}

.rank-badge.rank-pro {
  --rank: #9be7ff;
  --rank-glow: rgba(155, 231, 255, .24);
  --rank-border: rgba(155, 231, 255, .34);
  --rank-bg: linear-gradient(135deg, rgba(155, 231, 255, .30), rgba(155, 231, 255, .10));
}

.rank-badge.rank-vip {
  --rank: #34e88f;
  --rank-glow: rgba(52, 232, 143, .28);
  --rank-border: rgba(52, 232, 143, .40);
  --rank-bg: linear-gradient(135deg, rgba(52, 232, 143, .35), rgba(52, 232, 143, .12));
}

/* ===== Shared visual restraint and navigation motion ===== */
html {
  scrollbar-gutter: stable;
}

@view-transition {
  navigation: auto;
}

.exchange-header {
  view-transition-name: exchange-header;
  border-bottom-color: rgba(255, 255, 255, .055);
  backdrop-filter: blur(8px);
}

.exchange-header,
.exchange-header * {
  letter-spacing: 0;
}

.logo-name {
  font-weight: 800;
}

.nav-label,
.dropdown a,
.auth-actions .btn,
.profile-actions a,
.lang {
  font-weight: 700;
}

.nav-tag,
.item-meta {
  font-weight: 700;
}

.exchange-header::before,
.logo::after,
.prime-nav::before,
.prime-nav::after {
  display: none;
}

.logo,
.nav-item,
.lang,
.profile {
  border-color: transparent;
  box-shadow: none;
}

.logo:hover,
.nav-item:hover,
.lang:hover,
.profile:hover,
.mobile-menu-btn:hover {
  border-color: transparent;
  background: rgba(255, 255, 255, .04);
  box-shadow: none;
  transform: none;
}

.nav-tag.new,
.nav-tag.top {
  border: 0;
  background: rgba(255, 255, 255, .055);
  box-shadow: none;
  color: rgba(233, 235, 239, .72);
}

.prime-nav {
  border: 0;
  background: rgba(52, 232, 143, .075);
  box-shadow: none;
}

.prime-nav:hover {
  border: 0;
  background: rgba(52, 232, 143, .11);
  box-shadow: none;
  transform: none;
}

.dropdown {
  border-color: rgba(255, 255, 255, .07);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .38);
}

.dropdown-head {
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .055);
}

.dropdown a {
  border: 0;
  box-shadow: none;
}

.dropdown a::before {
  display: none;
}

.dropdown a:hover {
  border: 0;
  background: rgba(255, 255, 255, .045);
  box-shadow: none;
  transform: none;
}

.dropdown a:hover .item-meta {
  color: var(--muteds);
}

.auth-actions .btn,
.profile-actions a {
  box-shadow: none;
  transform: none;
}

.auth-actions .btn:hover,
.profile-actions a:hover {
  box-shadow: none;
  transform: none;
}

.auth-actions .btn-ghost {
  border-color: rgba(255, 255, 255, .075);
  background: transparent;
}

.auth-actions .btn-ghost:hover {
  border-color: rgba(255, 255, 255, .11);
  background: rgba(255, 255, 255, .04);
}

.auth-actions .btn-success {
  border-color: transparent;
  background: var(--green);
}

.signup-btn .gift-ico,
.rank-badge {
  animation-play-state: paused;
}

::view-transition-old(root) {
  animation: exchange-page-out 110ms ease both;
}

::view-transition-new(root) {
  animation: exchange-page-in 180ms cubic-bezier(.2, .75, .25, 1) both;
}

::view-transition-old(exchange-header),
::view-transition-new(exchange-header) {
  animation: none;
  mix-blend-mode: normal;
}

@keyframes exchange-page-out {
  to {
    opacity: .96;
  }
}

@keyframes exchange-page-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {

  body>main,
  body>.page,
  body>.app-shell,
  body>.auth-page,
  #box {
    animation: exchange-page-in 180ms cubic-bezier(.2, .75, .25, 1) both;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

.coin-graphics {
  position: relative;
}

.chart-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
}

.chart-loader-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(128, 128, 128, 0.2);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: chartLoaderSpin 0.7s linear infinite;
}

.chart-loader.is-hidden {
  display: none;
}

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


.external-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}