.loudness-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loudness-modal {
  background: rgba(51, 51, 51, 0.6);
  -webkit-backdrop-filter: blur(3px);
          backdrop-filter: blur(3px);
  outline: 1px solid rgba(255, 255, 255, 0.2);
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 90%;
  animation: fadeIn 0.25s ease-out;
  font-family: sans-serif;
}

.loudness-modal h2 {
  font-size: 20px;
  margin-bottom: 12px;
}

.loudness-modal-subtext {
  margin-top: 8px;
  font-size: 14px;
  color: #555;
}

.loudness-modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.loudness-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: background 0.2s ease;
}

.loudness-btn.cancel {
  background-color: #e5e7eb;
  color: #333;
}

.loudness-btn.cancel:hover {
  background-color: #d1d5db;
}

.loudness-btn.continue {
  background-color: #dc2626;
  color: white;
}

.loudness-btn.continue:hover {
  background-color: #b91c1c;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}




/* МОБИЛКИ */



@media (max-width: 480px) {
  .loudness-modal {
    padding: 16px;
    border-radius: 12px;
    max-width: 95%;
  }

  .loudness-modal h2 {
    font-size: 18px;
    margin-bottom: 10px;
  }

  .loudness-modal-subtext {
    font-size: 13px;
  }

  .loudness-modal-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .loudness-btn {
    font-size: 15px;
    padding: 10px;
  }
}

.spectrum-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  max-height: 100%;
}

.spectrum-canvas {
  width: 100%;
  height: 30px;
  cursor: pointer;
}

.spectrum-time {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--time-color, #aaa);
}

/* Цвета через CSS-переменные */
:root {
  --wave-color: var(--red);
  --progress-color: #555555;
  --time-color: #888;
}

