.ruler-switch-btn.active {
    background: #007bff;
    color: #fff;
  }
  .ruler-circle {
    box-shadow: 0 0 8px #007bff88;
  }
  .ruler-distance-label {
    font-size: 16px;
    z-index: 1001;
  }

  .ruler-switch-btn {
    padding: 4px 12px;
    background: #f3f3f3;
    color: #222;
    border: 1px solid #007bff;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    margin-left: 10px;
    transition: background 0.2s, color 0.2s;
  }
  .ruler-switch-btn.active {
    background: #007bff;
    color: #fff;
  }
  
  .ruler-circle {
    box-shadow: 0 0 8px #007bff88;
    position: absolute;
    width: 32px;
    height: 32px;
    border: 3px solid #007bff;
    background: rgba(0,123,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1001;
  }
  
  .ruler-distance-label {
    font-size: 16px;
    z-index: 1002;
    position: absolute;
    background: #fff;
    border: 1px solid #007bff;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: bold;
    transform: translate(-50%, -100%);
    pointer-events: none;
    box-shadow: 0 2px 8px #007bff22;
  }

  #ruler-switch-container {
    bottom: 30px;
    right: 30px;
  }
  
  .ruler-line {
    position: absolute;
    height: 2px;
    background: #007bff;
    pointer-events: none;
    z-index: 1001;
  }

  .switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    vertical-align: middle;
  }
  .switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }
  .slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbb89b;
    transition: .3s;
    border-radius: 26px;
  }
  .slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 4px #0002;
  }
  input:checked + .slider {
    background-color: #dfab5d;
  }
  input:checked + .slider:before {
    transform: translateX(20px);
  }

  #feachers-container {
    display: flex;
    align-items: center;
    flex-direction: row;
    margin: 0px 5px 0px 5px;
    opacity: 1;
    max-width: 500px;
    transform: translateX(0);
    transition: opacity 0.4s ease, max-width 0.4s ease, transform 0.4s ease;
  }

  #feachers-container[style*="display: none"] {
    opacity: 0;
    max-width: 0;
    transform: translateX(-20px);
    visibility: hidden;
    margin: 0;
    padding: 0;
    transition: opacity 0.4s ease, max-width 0.4s ease, transform 0.4s ease, visibility 0s linear 0.4s;
  }

  .ruler-feacher {
    margin-left: 20px;
    display: flex;
    align-items: center;
    padding: 5px;
    background-color: #f1e0c9;
    border-radius: 10px;
  }

  #ruler-feachers {
    bottom: 30px;
    right: 195px;
    display: flex;
    flex-direction: row;
    display: none;
  }

  .ruler-feacher-last {
    display: flex;
    align-items: center;
    padding: 5px;
    background-color: #f1e0c9;
    border-radius: 10px;
  }

  .ruler-feacher-arrow {
    display: flex;
    align-items: center;
    padding: 5px;
  }


  /* ruler.css - додаткові стилі */

/* Збільшуємо розмір кола та виправляємо центрування */
.ruler-circle {
  position: absolute;
  width: 24px; /* Збільшений розмір */
  height: 24px; /* Збільшений розмір */
  border: 3px solid #007bff;
  background: rgba(0,123,255,0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%); /* Коректне центрування */
  pointer-events: none;
  z-index: 1001;
  box-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
}

/* Лінія рулетки */
.ruler-line {
  position: absolute;
  height: 2px;
  background: #007bff;
  pointer-events: none;
  z-index: 1000;
  transform-origin: left center;
  box-shadow: 0 0 4px rgba(0, 123, 255, 0.3);
}

/* Покращене відображення мітки відстані */
.ruler-distance-label {
  position: absolute;
  background: white;
  border: 1px solid #007bff;
  padding: 4px 8px; /* Більше паддінга для кращої видимості */
  border-radius: 6px;
  font-weight: bold;
  transform: translate(-50%, -50%); /* Коректне центрування */
  pointer-events: none;
  z-index: 1002;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
  font-size: 14px;
  color: #007bff;
  white-space: nowrap;
  min-width: 50px; /* Мінімальна ширина для кращого вигляду */
  text-align: center;
}

/* Анімація створення точки */
@keyframes pulse {
  0% { transform: translate(-50%, -50%) scale(0.8); opacity: 1; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.ruler-circle {
  animation: pulse 0.5s ease-out;
}