/* ======== ЛЕВАЯ ПАНЕЛЬ ======== */
/* === ГЛОБАЛЬНЫЙ ЗАПРЕТ ВЫДЕЛЕНИЯ ТЕКСТА НА ГРАФИКЕ === */
#chart,
#chart * {
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

#left-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #141922;
  border-radius: 8px;
  border: 1px solid #222;
  overflow: hidden;
}

/* ======== ШАПКА НАД ГРАФИКОМ ======== */
.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  border-bottom: 1px solid #1f232b;
  background: #0d1016;
  height: 46px;
  box-sizing: border-box;
}

/* Название выбранной монеты */
.pair-info span {
  color: #00e896;
  font-weight: 600;
  font-size: 16px;
  padding: 6px 14px;
  border: 1px solid #00e89650;
  border-radius: 10px;
  background: rgba(0, 232, 150, 0.08);
  box-shadow: 0 0 12px rgba(0, 232, 150, 0.35);
  animation: pulseCoin 3s infinite ease-in-out;
}

@keyframes pulseCoin {
  0% { box-shadow: 0 0 10px rgba(0, 232, 150, 0.25); }
  50% { box-shadow: 0 0 22px rgba(0, 232, 150, 0.6); }
  100% { box-shadow: 0 0 10px rgba(0, 232, 150, 0.25); }
}

/* Временная подсветка при смене монеты */
.pair-info span.flash {
  animation: flashCoin 0.3s ease-out;
}

@keyframes flashCoin {
  0% {
    box-shadow: 0 0 25px rgba(0, 232, 150, 0.8);
    border-color: #00e896;
  }
  100% {
    box-shadow: 0 0 12px rgba(0, 232, 150, 0.35);
    border-color: #00e89650;
  }
}

/* Таймфреймы */
.tf-group {
  display: flex;
  gap: 6px;
}

.tf-btn {
  background: transparent;
  color: #cfd3dc;
  border: 1px solid #2a2f38;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tf-btn:hover {
  border-color: #00e89670;
  color: #00e896;
}

.tf-btn.active {
  background: #00e89620;
  border-color: #00e89680;
  color: #00e896;
}

/* Правая часть меню */
.chart-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-btn {
  background: transparent;
  border: 1px solid #2a2f38;
  border-radius: 6px;
  color: #cfd3dc;
  padding: 5px 10px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chart-btn:hover {
  border-color: #00e89670;
  color: #00e896;
}

.icon-btn {
  background: transparent;
  border: 1px solid #2a2f38;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  border-color: #00e89670;
  box-shadow: 0 0 6px rgba(0, 232, 150, 0.25);
}

/* Контейнер графика */
#chart {
  flex: 1;
  width: 100%;
  height: 100%;
}

/* ======== БЛОК ОБЪЁМА ======== */
.volume-toggle {
  position: absolute;
  top: 80%;              /* ⬅ приблизительно там, где начинается зона объёма */
  left: 8px;
  transform: translateY(-50%); /* Центрируем по линии раздела */
  background: transparent;
  border: 1px solid #2a2f38;
  border-radius: 6px;
  color: #00e896;
  font-size: 14px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 5; /* поверх графика */
}

.volume-toggle:hover {
  border-color: #00e89670;
  box-shadow: 0 0 6px rgba(0, 232, 150, 0.25);
}
/* ======== МОДАЛЬНОЕ ОКНО ======== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #1b1f28;
  border: 1px solid #00e89650;
  border-radius: 10px;
  padding: 20px 28px;
  width: 340px;
  color: #e0e3ea;
  box-shadow: 0 0 25px rgba(0, 232, 150, 0.25);
  text-align: center;
}

.modal-content h3 {
  color: #00e896;
  margin-bottom: 10px;
}

.desc {
  font-size: 13px;
  color: #9da3b0;
  margin-bottom: 10px;
}

.ema-options {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 15px;
}

.apply-btn,
.close-btn {
  background: #00e89625;
  border: 1px solid #00e89680;
  color: #00e896;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 6px;
}

.apply-btn:hover,
.close-btn:hover {
  background: #00e89640;
}
/* ======== МОДАЛЬНОЕ ОКНО ИНДИКАТОРОВ (обновлённое) ======== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal.hidden {
  display: none;
}

.modal-content {
  position: relative;
  background: #11151c;
  border: 1px solid #00e89660;
  border-radius: 12px;
  padding: 22px 26px;
  width: 440px;
  color: #e0e3ea;
  box-shadow: 0 0 25px rgba(0, 232, 150, 0.25);
  text-align: left;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 14px;
  background: transparent;
  border: none;
  color: #00e896;
  font-size: 20px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.close-btn:hover {
  transform: scale(1.2);
}

/* ======== МОДАЛЬНОЕ ОКНО ======== */
/* ======== МОДАЛЬНОЕ ОКНО ======== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.modal.hidden {
  display: none;
}

.modal-content {
  position: relative;
  background: #1b1f28;
  border: 1px solid #00e89650;
  border-radius: 12px;
  padding: 60px 32px 24px; /* ⬅ добавили отступ сверху (40px) */
  color: #e0e3ea;
  box-shadow: 0 0 25px rgba(0, 232, 150, 0.25);
  width: min(480px, 90vw);
  max-height: 80vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* === Кнопка закрытия (крестик) === */
#close-indicators {
  position: absolute;
  top: 10px;
  right: 14px;
  background: transparent;
  border: none;
  color: #00e896;
  font-size: 24px;          /* чуть крупнее */
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s, transform 0.2s;
}

#close-indicators:hover {
  color: #00ffa2;
  transform: scale(1.15);
}

/* === Заголовок модального окна === */
.modal-title {
  text-align: center;
  font-size: 20px;
  color: #00e896;
  margin-bottom: 4px;
}

/* === Каждый блок индикатора === */
.indicator-block {
  background: #232832;
  border: 1px solid #00e89630;
  border-radius: 10px;
  padding: 14px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* === Текст внутри блока === */
.indicator-title {
  font-weight: 600;
  color: #00e896;
  font-size: 15px;
}

.indicator-desc {
  font-size: 13px;
  color: #b0b6c3;
}

/* === Строка с чекбоксами === */
.ema-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;                  /* ✅ адаптивное поведение */
  gap: 10px;
}

.ema-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
}

/* === Цветные кружки === */
.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid #000;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.25);
}

}
/* === Подраздел (рег канал) внутри окна индикаторов === */
.indicator-block.sub-block {
  background: #262b36; /* чуть светлее, чем основной фон */
  border: 1px solid #00e89625;
}

/* Свечение центральных линий CP-зон */
.lwgl-canvas, canvas {
  filter:
    drop-shadow(0 0 18px rgba(255, 68, 68, 0.45))
    drop-shadow(0 0 18px rgba(0, 232, 150, 0.45));
}
/* === Надписи на CP-зонах === */
.cp-zone-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.35;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.3s ease;
}

.cp-zone-label.sell {
  top: 20%; /* позиция над верхней зоной */
  color: #ff5555;
  text-shadow: 0 0 10px rgba(255, 68, 68, 0.3);
}

.cp-zone-label.buy {
  bottom: 18%; /* позиция над нижней зоной */
  color: #00e896;
  text-shadow: 0 0 10px rgba(0, 232, 150, 0.3);
}
/* ===============================
   Всплывающие уведомления
   =============================== */
.alert-popup {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #1b1f28;
  color: #00e896;
  border: 1px solid #00e89650;
  padding: 8px 14px;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  transform: translateY(-10px);
  z-index: 3000;
  font-size: 14px;
}
.alert-popup.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===============================
   Метка оповещения на графике
   =============================== */
.alert-label {
  position: absolute;
  background: rgba(27, 31, 40, 0.9);
  color: #fff;
  border: 1px solid #333;
  border-radius: 6px;
  font-size: 12px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: ns-resize; /* курсор — стрелки вверх/вниз */
  pointer-events: auto;
  user-select: none;
  z-index: 50;
}

.alert-label span {
  color: #00e896;
  font-weight: 600;
}

.alert-label button {
  background: none;
  border: none;
  color: #ff3b5c;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}

/* ===============================
   Контейнер графика
   =============================== */
#chart {
  position: relative;
}

