html, body {
  width: 100%;
  min-width: 100vw;
  max-width: 100vw;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* ← останній пріоритет */
  overscroll-behavior-x: contain;
  background: #000;
  color: white;
  font-family: sans-serif;
  box-sizing: border-box;
}


#extremesTableContainer {
  box-sizing: border-box;
 
}
/* ✅ ЗАЛИШАЄМО scroll тільки тут */
.table-scroll {
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x !important;
  overscroll-behavior-x: none;
  scroll-behavior: auto !important;
  width: 100vw;
  max-width: 100vw;
}

/* ⛔️ ВИПРАВЛЯЄМО: тут НЕ scroll-контейнер */
.dot-table-wrapper {
  width: max-content;
  min-width: 100vw;
  margin: 0;
  padding: 0;
  box-sizing: border-box;

  /* ❌ Видаляємо scroll-зв'язане */
  /* overflow-x: auto; */
  /* overflow-y: auto; */
  /* -webkit-overflow-scrolling: touch; */
  /* touch-action: pan-x pan-y !important; */
}


 
/* Сама таблиця */
.dot-table {
  table-layout: fixed;
  width: max-content;
  min-width: 4600px;
  border-collapse: collapse;
  font-size: 12px;
  background-color: #000;
}

.dot-table th,
.dot-table td {
  border: 1px solid #333;
  padding: 4px;
  white-space: nowrap;
  text-align: center;
  color: #fff;
  min-width: 40px;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: #111 !important;
  color: white !important;
  box-shadow: inset 0 -1px 0 #444;
}

td, .max, .min, .live-val {
  color: #000 !important;
  font-weight: bold;
}

td:first-child,
th:first-child {
  width: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  padding: 0 !important;
  margin: 0 !important;
  text-align: center !important;
  color: white !important;
  font-size: 10px;
  background-color: #000 !important;
}

/* Значення в клітинках */
.max { font-size: 10px; }
.min { font-size: 9px; opacity: 0.8; }
.live-val { font-size: 10px; }

/* Виділення */
.highlight-max {
  border: 2px solid #b300ff !important;
  box-shadow: 0 0 8px 2px rgba(179,0,255,0.9);
}
.highlight-min {
  border: 2px solid yellow !important;
  box-shadow: 0 0 8px 2px rgba(255,255,0,0.9);
}

/* Кнопка */
#showAllBtn {
  margin: 10px auto;
  display: block;
  padding: 6px 12px;
  font-size: 14px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
#showAllBtn:hover {
  background-color: #218838;
}

/* Мобільна адаптація */
@media screen and (max-width: 768px) {
  .dot-table {
    font-size: 8px;
  }
  .dot-table th,
  .dot-table td {
    padding: 2px;
  }



  #extremesTableContainer {
    display: block;
    overflow-y: auto;
    flex: 1 1 auto;
  }
}

 #footer-header th.coin-link {
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  transform-origin: center;
  box-shadow: 0 0 0 transparent;
}

#footer-header th.coin-link:hover {
  transform: scale(0.96);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
  filter: brightness(1.05);
  z-index: 2;
}


td, th {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}


.hidden-row {
  display: none;
}
#footer-header th.coin-link .coin-name {
  font-size: 11px !important;
  font-weight: bold;
}
.percent-label {
  display: block;
  margin-bottom: 4px; /* або 6px */
  font-size: 10px;
  color: #ccc;
  line-height: 1.1;
}
.coin-name {
  font-size: 14px;
  font-weight: bold;
  display: block;
}/* 🔻 Горизонтальний скролбар — ширший і легший для натискання */
::-webkit-scrollbar {
  height: 30px; /* ← Замість 10px */
}

::-webkit-scrollbar-track {
  background: #111;
}

::-webkit-scrollbar-thumb {
  background-color: #444;
  border-radius: 10px;
  border: 3px solid #222; /* товщина рамки всередині бігунка */
  min-width: 40px; /* щоб повзунок був не надто вузький */
}

::-webkit-scrollbar-thumb:hover {
  background-color: #666;
}
.current {
  font-size: 22px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.flash-animate {
  transform: scale(1.15);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.current.flash-animate {
  transform: scale(1.25);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
  background-color: rgba(255, 255, 255, 0.08);
}

/* coin-selector states */
.coin-selector[data-state="green"] {
  background-color: #00ff00;
}
.coin-selector[data-state="red"] {
  background-color: #ff0033;
}
.coin-selector[data-state="none"] {
  background-color: #111;
}

/* extra-info */
.extra-info div {
  font-size: 11px;
  line-height: 1.3;
  color: black;
}

.extra-info .current {
  font-size: 12px;
  font-weight: bold;
  margin-top: 4px;
  display: block;
}

/* footer-header */
#footer-header th {
  background: #000 !important;
  color: #fff !important;
}
#footer-header .coin-name,
#footer-header .percent-label {
  color: #fff !important;
}


#showAllBtn {
  background-color: #2ecc71; /* зелений */
  color: white;
  font-weight: bold;
  font-size: 16px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.floating-menu-button {
    position: fixed;
    top: 10px;
    width: 42px;
    height: 42px;
    font-size: 24px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2000;
    user-select: none;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
}

.floating-menu-button.left {
    left: 10px;
}

.floating-menu-button.right {
    right: 10px;
}
.mobile-menu,
.desktop-menu {
    display: none;
    position: fixed;
    top: 60px;
    background: rgba(20, 20, 20, 0.95);
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    z-index: 1500;
    max-height: 80vh;
    overflow-y: auto;
}

.mobile-menu {
    left: 10px;
}

.desktop-menu {
    right: 10px;
}

.mobile-menu.show,
.desktop-menu.show {
    display: block;
}

.button-column a {
    display: block;
    margin: 6px 0;
    padding: 10px 14px;
    background: #222;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
}

.button-column a:hover {
    background: #444;
}

@media (max-width: 600px) {
  .button-column a {
    font-size: 13px;
    padding: 8px 10px;
  }
}



.spacer { height: 2vh; }


 

#range-settings {
  display: inline-block;
  vertical-align: top;
  margin-left: 20px;
}

/* Mobile styles */
@media (max-width: 768px) {
  #range-settings {
    display: block;
    margin-left: 0;
    margin-top: 15px;
    width: 100%;
  }

  #range-settings label {
    display: block;
    width: 100%;
  }

  #range-settings input {
    width: 120px;
    box-sizing: border-box;
  }

  #range-settings button {
    background-color: #2ecc71; /* зелений */
    color: white;
    font-weight: bold;
    font-size: 16px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
  }

  #range-settings button:hover {
    background-color: #27ae60; /* темніший зелений */
  }
}





.exit-button {
  background-color: #2ecc71; /* зелений */
  color: white;
  font-weight: bold;
  font-size: 16px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.exit-button:hover {
  background-color: #27ae60; /* темніший зелений */
}


.green {
  color: #2ebd85;
  font-weight: bold;
  font-size: 28px;
}

.red {
  color: #f6455f;
  font-weight: bold;
  font-size: 28px;
}



.note {
  font-size: 10px !important;
  font-weight: normal !important;
  color: #aaa !important;
}


#fixedHeader,
#fixedFooter {
  table-layout: fixed;
  min-width: 1600px;
  width: max-content;
}


.dark-btn {
  margin: 10px auto;
  display: block;
  padding: 6px 12px;
  font-size: 14px;
  background-color: #218838; /* останнє значення має перевагу */
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}




 .dark-input {
  background-color: #2b2b2b;
  color: white;
  font-weight: bold;
  border: 1px solid #666;
  padding: 4px 6px;
  border-radius: 4px;
}

.dark-button {
  background-color: #444;
  color: white;
  font-weight: bold;
  border: none;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
}

.dark-button:hover {
  background-color: #555;
}
 

 .blocks-row-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
  margin-top: 20px;
  box-sizing: border-box;
}

/* Гарантовано НЕ торкається внутрішньої структури */
.block-container {
  flex: 1 1 30%;
  max-width: 33%;
  box-sizing: border-box;
  /* БІЛЬШЕ НІЯКОГО display: flex або align! */
}
@media (max-width: 768px) {
  .blocks-row-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .block-container {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

.stars {
  font-size: 11px;
  font-weight: bold;
  margin-bottom: 4px;
}

.stars .filled {
  color: #fff;
}

.stars .empty {
  color: #111;
  text-shadow:
    0 0 1px #aaa,
    0 0 2px #aaa; /* додано ще один шар для товщини */
}



.dot-form {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 auto;
  padding: 15px 20px;
  background: #111;
  border: 1px solid #333;
  border-radius: 8px;
  max-width: 600px;
  box-sizing: border-box;
  overflow-x: hidden;
}

.dot-form label {
  font-size: 14px;
  color: #fff;
}

.dot-form input[type="number"] {
  width: 100px;
  padding: 6px 8px;
  font-size: 14px;
  background: #222;
  color: #fff;
  border: 1px solid #555;
  border-radius: 4px;
  text-align: right;
}

.dot-form button {
  background-color: #2ecc71; /* зелений */
  color: white;
  font-weight: bold;
  font-size: 16px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.dot-form button:hover {
  background-color: #218838;
}

/* Обмеження ширини інших блоків */
.switch-wrapper,
#range-settings,
.trade-line,
form:not(.dot-form):not(.conversion-form),
.spacer,
div[style*="text-align: center"] {
  max-width: 600px;
  box-sizing: border-box;
  overflow-x: hidden;
  margin-left: auto;
  margin-right: auto;
}

/* .switch-wrapper — об'єднані всі стилі */
.switch-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin: 0 20px 20px;
}

/* .switch-block — об'єднані */
.switch-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 120px;
  font-family: BinancePLEX, sans-serif;
  color: #fff;
  flex: 1;
}

/* Інші елементи */
.switch-label {
  margin-bottom: 6px;
  font-weight: bold;
  font-size: 16px;
  text-align: center;
}

.switch {
  position: relative;
  width: 45px;
  height: 25px;
}

.switch input {
  display: none;
}

.slider {
  position: absolute;
  cursor: pointer;
  background-color: #ccc;
  border-radius: 25px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: .3s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3.5px;
  background-color: white;
  border-radius: 50%;
  transition: .3s;
}

input:checked + .slider {
  background-color: #2ecc71;
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* Адаптив */
@media (max-width: 768px) {
  .switch-wrapper {
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .switch-block {
    align-items: center !important;
  }
}
.trade-line {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-family: monospace;
  font-size: 20px;
  color: #fff;
  background: #111;
  border-radius: 10px;
  padding: 12px 16px;
  margin: 10px auto;
  max-width: 600px;
  text-align: center;
  line-height: 1.6;
}

.trade-line span {
  font-weight: bold;
}

.red,
.green {
  font-weight: bold;
  font-size: 28px;
}

/* Mobile styles */
@media (max-width: 600px) {
  .trade-line {
    font-size: 14px;
    padding: 3px 3px;
    gap: 6px;
  }

  .red,
  .green {
    font-size: 21px;
  }
}

@media (max-width: 768px) {
  thead th {
    position: static !important;
  }
}
