@media (max-width: 900px) {
  .nav-links { display: none !important; }
  .nav-right { display: none !important; }
  .hamburger { display: flex !important; }
}
@media (min-width: 901px) {
  .hamburger { display: none !important; }
  .mobile-menu { display: none !important; }
}

/* ── HAMBURGER ── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: transparent;
  border: none;
  z-index: 10000;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #00c8ff;
  border-radius: 2px;
}

/* ── MOBILE MENU ── */
.mobile-menu {
  display: none;
  position: fixed !important;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: #000000 !important;
  z-index: 99999 !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding-top: 0 !important;
  gap: 0 !important;
  overflow-y: auto;
}
.mobile-menu.open { display: flex !important; }
.mobile-menu a {
  color: #ffffff !important;
  font-size: 22px !important;
  text-decoration: none !important;
  padding: 18px 0 !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  width: 85% !important;
  text-align: center !important;
  display: block !important;
  font-family: 'Orbitron', sans-serif !important;
  font-weight: 400 !important;
  letter-spacing: .5px !important;
  transition: color .15s !important;
}
.mobile-menu a:active { color: #00c8ff !important; }
.mobile-menu .close-btn {
  position: absolute !important;
  top: 28px !important;
  right: 28px !important;
  font-size: 32px !important;
  color: #00c8ff !important;
  cursor: pointer !important;
  background: none !important;
  border: none !important;
  line-height: 1 !important;
}
.mobile-menu .mob-login { display: none !important; }

/* ── NAV MOBILE ── */
@media (max-width: 900px) {
  nav { padding: 0 10px !important; height: 52px !important; gap: 0 !important; }
  .logo { font-size: 15px !important; letter-spacing: 1px !important; }
  .nav-right { display: flex !important; align-items: center !important; gap: 5px !important; flex-shrink: 0 !important; }
  .balance-display, #headerBalance {
    font-size: 11px !important;
    padding: 3px 9px !important;
    border-radius: 14px !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    white-space: nowrap !important;
    max-width: 130px !important;
    overflow: hidden !important;
  }
  #settingsBtn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 3px 7px !important;
    font-size: 14px !important;
  }
  #userNameDisplay { display: none !important; }
  .btn { padding: 4px 9px !important; font-size: 11px !important; white-space: nowrap !important; }
  #navRight { gap: 5px !important; }
  #navRight > div { gap: 5px !important; }
}

/* ── ГЛАВНАЯ ── */
@media (max-width: 900px) {
  .hero { padding: 5rem 1rem 2rem !important; flex-direction: column !important; }
  #coinWrapper { flex: 0 0 240px !important; width: 240px !important; }
  #coinScene { width: 220px !important; height: 220px !important; }
  .hero h1 { font-size: clamp(1.8rem,8vw,3rem) !important; text-align: center !important; }
  .hero-sub { text-align: center !important; font-size: 0.95rem !important; }
  .hero-btns { justify-content: center !important; }
  .hero-stats { justify-content: center !important; margin-top: 1.5rem !important; gap: 1.5rem !important; }
}

/* ── ПОПОЛНЕНИЕ (wallet) ── */
@media (max-width: 900px) {
  .stab { padding: 8px 10px !important; font-size: 11px !important; white-space: nowrap !important; }
  .stabs-row { overflow-x: auto !important; flex-wrap: nowrap !important; gap: 4px !important; padding-bottom: 4px !important; }
  .balance-pill { font-size: 12px !important; padding: 3px 10px !important; }
  .dep-form, .with-form { padding: 1rem !important; }
}

/* ── ВКЛАДЫ ── */
@media (max-width: 900px) {
  .deposit-cards { grid-template-columns: 1fr !important; }
  .deposit-card { padding: 1.25rem !important; }
  .deposits-stats { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
}

/* ── P2P ── */
@media (max-width: 900px) {
  .market-wrap { padding: 0.75rem !important; }
  .market-top { gap: 6px !important; flex-wrap: wrap !important; }
  .offers-head { display: none !important; }
  .offer-row {
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    padding: 0.75rem !important;
    font-size: 13px !important;
  }
  .offer-row > div:nth-child(3),
  .offer-row > div:nth-child(4),
  .offer-row > div:nth-child(5) { display: none !important; }
  .price-cell { font-size: 0.95rem !important; }
  .merch-name { font-size: 13px !important; }
  .bst-btn { padding: 0.35rem 0.9rem !important; font-size: 13px !important; }
  .search-box { width: 130px !important; font-size: 13px !important; }
  /* Баланс P2P */
  #navRight > div { gap: 6px !important; }
}



/* ── ОПЦИОНЫ ── */
@media (max-width: 900px) {
  .options-wrap { height: auto !important; padding-top: 56px !important; overflow-y: auto !important; }
  .options-layout {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    padding: 0.5rem !important;
    gap: 10px !important;
  }
  .chart-col { width: 100% !important; min-height: 0 !important; display: flex !important; flex-direction: column !important; gap: 8px !important; }
  .chart-area {
    height: 540px !important;
    min-height: 540px !important;
    max-height: 540px !important;
    flex: none !important;
    overflow: hidden !important;
    width: 100% !important;
  }
  .chart-container {
    height: 520px !important;
    min-height: 520px !important;
    width: 100% !important;
  }
  #liveChart {
    height: 520px !important;
    min-height: 520px !important;
    width: 100% !important;
  }
  #tvChartWrap {
    height: 520px !important;
    min-height: 520px !important;
    width: 100% !important;
  }
  #tvChartWrap iframe { height: 520px !important; width: 100% !important; }
  .side-panel { width: 100% !important; max-height: none !important; overflow-y: visible !important; }
  body { overflow-y: auto !important; overflow-x: hidden !important; }
}
/* ── ГЛАВНАЯ МОБИЛЬНАЯ ── */
@media (max-width: 900px) {
  html, body {
    overflow-x: hidden !important;
  }
  .hero {
    padding: 4rem 1rem 2rem !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 1.5rem !important;
    min-height: auto !important;
  }
  .hero > div:first-of-type {
    flex: none !important;
    width: 100% !important;
    text-align: center !important;
    min-width: 0 !important;
  }
  .hero h1 {
    font-size: clamp(1.6rem, 7vw, 2.4rem) !important;
    text-align: center !important;
    margin-bottom: 0.75rem !important;
  }
  .hero-sub {
    font-size: 0.9rem !important;
    text-align: center !important;
    margin: 0 auto 1.5rem !important;
  }
  .hero-btns {
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .hero-stats {
    justify-content: center !important;
    gap: 1.5rem !important;
    margin-top: 1.5rem !important;
  }
  #coinWrapper {
    flex: none !important;
    width: 220px !important;
    height: 220px !important;
    order: -1 !important;
  }
  #coinScene {
    width: 200px !important;
    height: 200px !important;
  }
  #coin3d svg {
    width: 200px !important;
    height: 200px !important;
  }
}

/* ── P2P НАВБАР МОБИЛЬНЫЙ ── */
@media (max-width: 900px) {
  #navRight {
    gap: 4px !important;
  }
  #headerBalance {
    font-size: 10px !important;
    padding: 2px 7px !important;
    border-radius: 10px !important;
    max-width: 90px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
  }
  #navRight button[onclick*="openSettings"],
  #navRight button[title="Настройки"] {
    display: none !important;
  }
  #userNameDisplay {
    max-width: 60px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    font-size: 11px !important;
  }
  #navRight .btn {
    font-size: 11px !important;
    padding: 3px 8px !important;
  }
}

/* ── ВКЛАДЫ МОБИЛЬНЫЙ ── */
@media (max-width: 900px) {
  /* Убираем скролл-прыжки */
  .deposits-wrap, .savings-wrap {
    overflow-x: hidden !important;
  }

  /* Баланс виден на навбаре */
  .nav-right .balance-display,
  .nav-right #headerBalance {
    display: flex !important;
    font-size: 10px !important;
    padding: 2px 7px !important;
    border-radius: 10px !important;
    max-width: 100px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
  }

  /* Прячем шестеренку на вкладах */
  .nav-right #settingsBtn {
    display: none !important;
  }
}
