.btn-group,
.theme-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

button,
.btn {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  transition: 0.2s;
  background-color: var(--trbg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 8px;
}

button:hover,
.btn:hover {
  background: var(--btn-hover);
}

input,
select,
textarea {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  margin: 6px 0;
  width: 290px;
  max-width: 100%;
}

textarea {
  min-height: 80px;
  resize: vertical;
}

label {
  margin-right: 10px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  margin: 6px 0;
}

.switch input {
  opacity: 0;
}

.slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ccc;
  border-radius: 24px;
  transition: 0.3s;
}

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

input:checked+.slider {
  background: var(--main);
}

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

.form-item {
  margin: 12px 0;
}

.form-label {
  display: block;
  margin-bottom: 4px;
}

.slider-input {
  -webkit-appearance: none;
  width: 240px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  outline: none;
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--main);
  cursor: pointer;
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.radio-item input[type="radio"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border, #ddd);
  border-radius: 50%;
  background: var(--bg, #fff);
  position: relative;
  transition: all 0.2s ease;
}

.radio-item input[type="radio"]:checked {
  border-color: var(--main, #007aff);
  background: var(--main, #007aff);
}

.radio-item input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--check-color, #fff);
}

.radio-item label {
  cursor: pointer;
  user-select: none;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border, #ddd);
  border-radius: 4px;
  background: var(--bg, #fff);
  position: relative;
  transition: all 0.2s ease;
}

.checkbox-item input[type="checkbox"]:checked {
  border-color: var(--main, #007aff);
  background: var(--main, #007aff);
}

.checkbox-item input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--check-color, #fff);
  font-size: 14px;
  font-weight: bold;
}

.checkbox-item label {
  cursor: pointer;
  user-select: none;
}

.rate {
  color: #ffc107;
  font-size: 20px;
}
