/* Стили для элементов управления визуализацией */

.controls-container {
  position: relative;
  bottom: auto;
  left: auto;
  width: 100%;
  padding: 8px 16px;
  display: flex;
  justify-content: center;
  z-index: 10;
  background: none;
  margin-top: 5px;
  margin-bottom: 15px;
}

.control-button {
  background: linear-gradient(135deg, #2b3a8e88, #3d2e9a88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  min-width: 100px;
  height: 40px;
  word-wrap: none;
}

.control-button svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.control-button:hover {
  background: linear-gradient(135deg, #3a4db088, #5645c388);
  transform: translateY(-1px);
}

.control-button:active {
  transform: translateY(0);
}

.control-button.active {
  background: linear-gradient(135deg, #1a2b6e, #322672);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

.control-icon {
  margin-right: 5px;
  font-size: 14px;
}

.controls-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.controls-separator {
  width: 1px;
  height: 24px;
  background-color: rgba(255, 255, 255, 0.2);
  margin: 0 16px;
}

/* Стили для слайдера управления */
.control-slider {
  position: relative;
  width: 200px;
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.control-slider input {
  width: 100%;
  -webkit-appearance: none;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  outline: none;
}

.control-slider input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  border: 2px solid #fff;
  transition: all 0.3s;
}

.control-slider input::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  border: 2px solid #fff;
  transition: all 0.3s;
}

.control-slider input::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.control-slider input::-moz-range-thumb:hover {
  transform: scale(1.1);
}

/* Модальные окна с настройками */
.settings-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.settings-modal.visible {
  opacity: 1;
  visibility: visible;
}

.settings-panel {
  background: var(--color-background-light);
  border-radius: 30px;
  padding: 24px;
  width: 400px;
  max-width: 90%;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.settings-title {
  font-size: 20px;
  font-weight: 600;
}

.settings-close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.settings-body {
  max-height: 60vh;
  overflow-y: auto;
}

.settings-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.setting-item.experimental {
  position: relative;
}

.setting-item.experimental::after {
  content: 'Beta';
  position: absolute;
  right: -40px;
  top: 0;
  background: var(--color-warning);
  color: var(--color-background);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 30px;
  font-weight: bold;
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .3s;
  border-radius: 30px;
}

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

input:checked + .toggle-slider {
  background-color: var(--color-primary);
}

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

.btn-save-settings {
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 30px;
  padding: 10px 20px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 20px;
  width: 100%;
  transition: all 0.3s;
}

.btn-save-settings:hover {
  background: var(--color-primary-dark, #0089a7);
}

/* Применяем стиль control-button к кнопке информации о частице */
.btn-particle-info {
  background: linear-gradient(135deg, #2b3a8e88, #3d2e9a88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 10px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  min-width: 180px;
  height: 50px;
}

.btn-particle-info:hover {
  background: linear-gradient(135deg, #3a4db088, #5645c388);
  transform: translateY(-1px);
}

.btn-particle-info:active {
  transform: translateY(0);
}

/* Адаптивные стили для элементов управления */
@media (max-width: 768px) {
  .controls-container {
    padding: 10px 10px;
    flex-wrap: wrap;
  }
  
  .control-button {
    min-width: 150px;
    height: 50px;
    margin: 0 4px;
  }
  
  .control-button-icon {
    font-size: 18px;
  }
  
  .control-panel {
    padding: 10px;
    max-width: 90%;
  }
  
  .setting-item {
    margin-bottom: 10px;
  }
  
  .setting-label {
    font-size: 13px;
  }
  
  .toggle-switch {
    width: 36px;
    height: 20px;
  }
  
  .toggle-slider:before {
    width: 14px;
    height: 14px;
  }
  
  input:checked + .toggle-slider:before {
    transform: translateX(16px);
  }
  
  .view-mode-selector {
    flex-wrap: wrap;
  }
  
  .mode-btn {
    padding: 6px 10px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .controls-container {
    padding: 4px 6px;
    margin-top: 3px;
    margin-bottom: 10px;
  }
  
  .control-button {
    width: 32px;
    height: 32px;
    margin: 0 3px;
  }
  
  .control-button-icon {
    font-size: 16px;
  }
  
  .control-panel {
    padding: 8px;
    right: 5px;
  }
  
  .setting-label {
    font-size: 12px;
  }
  
  .btn-particle-info {
    font-size: 12px;
    min-width: auto;
    padding: 6px 10px;
    height: 32px;
  }
  
  .view-mode-selector {
    gap: 5px;
  }
  
  .mode-btn {
    padding: 4px 8px;
    font-size: 10px;
    border-radius: 12px;
  }
}
