  :root {
      --bg: #0b0b0d;
      --panel: #111215;
      --muted: #9aa0a6;
  }

  html,
  body {
      height: 100%;
      margin: 0;
      background: var(--bg);
      color: #eee;
      font-family: Inter, Arial, Helvetica, sans-serif
  }

  .app {
      display: flex;
      height: 100vh;
      overflow: hidden
  }

  #chart-container {
      flex: 1;
      min-width: 0;
      position: relative
  }



  /* Orderbook */
  #orderbook {
      width: 320px;
      background: var(--panel);
      border-left: 1px solid #222;
      padding: 10px;
      box-sizing: border-box;
      font-size: 13px;
      color: #ddd;
      display: flex;
      flex-direction: column;
  }

  .ob-title {
      font-weight: 600;
      text-align: center;
      color: #bbb;
      margin-bottom: 8px
  }

  .ob-headers {
      display: flex;
      justify-content: space-between;
      font-size: 12px;
      color: var(--muted);
      padding: 4px 2px;
      border-bottom: 1px solid #222;
      margin-bottom: 6px
  }

  .ob-body {
      flex: 1;
      overflow: auto;
      padding-right: 6px
  }

  .asks,
  .bids {
      display: flex;
      flex-direction: column;
      gap: 2px
  }

  .row {
      position: relative;
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 2px 6px;
      height: 22px;
      cursor: pointer;
      border-radius: 4px;
      overflow: hidden;
      transition: background 160ms linear;
      font-family: monospace;
      font-size: 12px;
  }

  .row:hover {
      background: rgba(255, 255, 255, 0.03)
  }

  .amount-bar {
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      opacity: 0.22;
      transition: width 240ms linear, background-color 160ms linear
  }

  .col-price {
      width: 40%;
      text-align: left;
      padding-left: 6px;
      z-index: 2
  }

  .col-size {
      width: 30%;
      text-align: right;
      padding-right: 10px;
      z-index: 2
  }

  .col-total {
      width: 30%;
      text-align: right;
      padding-right: 2px;
      z-index: 2;
      color: var(--muted)
  }

  .amount-bar-red {
      background: #ff4d4d
  }

  .amount-bar-green {
      background: #2cd1a2
  }

  /* small flash on update */
  .flash-ask {
      box-shadow: inset 0 0 10px rgba(255, 77, 77, 0.25);
      transition: box-shadow 700ms ease-out
  }

  .flash-bid {
      box-shadow: inset 0 0 10px rgba(44, 209, 162, 0.22);
      transition: box-shadow 700ms ease-out
  }

  .divider {
      height: 1px;
      background: #222;
      margin: 8px 0
  }

  /* spread area */
  .spread-box {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 6px 4px;
      border-radius: 6px;
      margin: 8px 0;
      color: #cfcfcf;
      font-size: 13px;
      background: linear-gradient(0deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.01));
      border: 1px solid rgba(255, 255, 255, 0.02)
  }

  .spread-value {
      font-weight: 700
  }

  .last-price-marker {
      margin-left: 8px;
      padding: 3px 8px;
      border-radius: 16px;
      background: rgba(255, 255, 255, 0.03);
      font-size: 12px;
      color: #fff;
      border: 1px solid rgba(255, 255, 255, 0.02)
  }

  /* popup tooltip */
  #ob-popup {
      position: fixed;
      display: none;
      pointer-events: none;
      z-index: 9999;
      background: #111218;
      border: 1px solid #2a2a2a;
      padding: 8px 10px;
      border-radius: 6px;
      color: #ddd;
      font-size: 13px;
      min-width: 140px;
      box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6)
  }

  #ob-popup .label {
      color: #9aa0a6;
      font-size: 12px;
      margin-right: 6px
  }

  /* header labels style */
  .header-label {
      color: var(--muted);
      font-size: 12px
  }

  /* end */

  body {
      margin: 0;
      background: #0f131a;
      font-family: Inter, sans-serif;
  }

  #chart-wrapper {
      position: relative;
      width: 100%;
      height: 100vh;
  }

  /* график */
  #chart {
      width: 100%;
      height: calc(100vh - 50px);
      background: #131722;
  }

  /* Верхняя панель */
  .tv-top-panel {
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: #131722;
      padding: 8px 12px;
      border-bottom: 1px solid #2a2e39;
  }

  /* Таймфреймы */
  .tv-timeframes button {
      background: #1e222d;
      border: 1px solid #2a2e39;
      color: #d1d4dc;
      padding: 6px 10px;
      margin-right: 6px;
      border-radius: 4px;
      cursor: pointer;
      font-size: 13px;
  }

  .tv-timeframes button.active {
      background: #2962ff;
      border-color: #2962ff;
      color: #fff;
  }

  .tv-timeframes button:hover {
      background: #2a2e39;
  }

  /* Действия справа */
  .tv-actions button {
      background: #1e222d;
      border: 1px solid #2a2e39;
      color: #d1d4dc;
      padding: 6px;
      margin-left: 6px;
      border-radius: 4px;
      cursor: pointer;
      font-size: 15px;
  }

  .tv-actions button:hover {
      background: #2a2e39;
  }

  /* Лоадер */

  #loading-container {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(000, 000, 000, 0.7);
      /* Прозрачный фон */
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 500;
      /* Ставим на передний план */
  }

  #loading-text {
      text-align: center;
  }

  /* Стили для графика и интерфейса */
  .app {
      display: flex;
      justify-content: space-between;
      padding: 20px;
  }

  #chart-container {
      position: relative;
      width: 75%;
  }

  .tv-top-panel {
      display: flex;
      justify-content: space-between;
      padding: 10px;
      background-color: #333;
      color: white;
  }

  .tv-sidebar {
      display: flex;
      flex-direction: column;
      padding: 10px;
      background-color: #333;
      color: white;
  }

  #orderbook {
      width: 25%;
      background-color: #1e1e1e;
      padding: 15px;
      color: white;
  }

  .ob-title {
      font-size: 18px;
      margin-bottom: 10px;
  }

  .ob-headers {
      display: flex;
      justify-content: space-between;
      font-weight: bold;
      margin-bottom: 10px;
      margin-left: 10px;
      margin-right: 10px;
  }

  .spread-box {
      margin-bottom: 15px;
  }

  .spread-label {
      font-size: 14px;
  }

  .spread-value {
      font-size: 16px;
      color: #28a745;
  }

  .last-price-marker {
      font-size: 14px;
      color: #e74c3c;
  }

  .ob-body {
      margin-top: 10px;
  }

  .asks,
  .bids {
      margin-bottom: 10px;
  }

  .row {
      display: flex;
      justify-content: space-between;
  }

  .row .amount-bar {
      height: 8px;
      background-color: #3498db;
      border-radius: 4px;
  }

  .row .col-price,
  .col-size,
  .col-total {
      font-size: 14px;
  }

  /* Лоадер ордербука внутри контейнера */
  #orderbook-loading-container {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.7);
      /* Полупрозрачный фон, чтобы было видно содержимое */
      display: flex;
      justify-content: center;
      align-items: center;
      color: white;
      font-size: 24px;
      font-weight: bold;
      z-index: 10;
      /* Лоадер будет внутри блока ордербука */
      display: none;
      /* По умолчанию скрыт */
  }

  #orderbook-loading-text {
      text-align: center;
  }

  /* Контейнер ордербука */
  #orderbook {
      position: relative;
      /* Обязательно для правильной работы абсолютного позиционирования лоадера */
      width: 25%;
      background-color: #1e1e1e;
      padding: 15px;
      color: white;
  }


  /* HTML: <div class="loader"></div> */
  .loader {
      width: 50px;
      aspect-ratio: 1;
      color: #fff;
      border: 2px solid;
      display: grid;
      box-sizing: border-box;
      animation: l1 4s infinite linear;
  }

  .loader::before,
  .loader::after {
      content: "";
      grid-area: 1/1;
      margin: auto;
      width: 70.7%;
      aspect-ratio: 1;
      border: 2px solid;
      box-sizing: content-box;
      animation: inherit;
  }

  .loader::after {
      width: 50%;
      aspect-ratio: 1;
      border: 2px solid;
      animation-duration: 2s;
  }

  @keyframes l1 {
      100% {
          transform: rotate(1turn)
      }
  }

  /* market cap  */

  #market-data {
      font-family: monospace;
      color: #ddd;
      margin-top: 20px;
  }

  #market-data div {
      margin: 4px 0;
  }

  #market-data div span {
      font-weight: bold;
  }

  .modal {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.0001);
      /* Полупрозрачный фон */
      justify-content: center;
      align-items: center;
      z-index: 999;
      /* Модалка выше лоадера */
      backdrop-filter: blur(2.2px);
      /* Размытие фона */
      -webkit-backdrop-filter: blur(2.2px);
      /* Для Webkit-браузеров */

  }

  /* Анимация для модального контента */
  @keyframes modal-content-animation {
      0% {
          transform: scale(0.8);
          /* Начальный масштаб */
          opacity: 0;
          /* Начальная невидимость */
      }

      100% {
          transform: scale(1);
          /* Конечный масштаб */
          opacity: 1;
          /* Полная видимость */
      }
  }

  /* Контент внутри модалки */
  .modal-content {
      background-color: #333333c1;
      padding: 15px 20px 20px 20px;
      border-radius: 30px;
      width: 380px;
      max-width: 90%;
      position: relative;
      opacity: 0;
      /* Изначально невидимый */
      transform: scale(0.8);
      /* Изначально уменьшен */
      animation: modal-content-animation 0.12s ease-out forwards;
      /* Применяем анимацию */

  }

  /* Кнопка для закрытия модалки (крестик) */
  .close-btn {
      position: absolute;
      top: 8px;
      right: 22px;
      font-size: 30px;
      font-weight: bold;
      cursor: pointer;
      color: #333;
      transition: color 0.3s ease;
  }

  .close-btn {
      color: #fff;
      /* Цвет крестика при наведении */
  }