/* Settings Container */
.settings-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* Custom Lesson Folder Styles */
.folder-control {
  margin-bottom: 32px;
}

.folder-input-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f9fafb;
}

.folder-input-label:hover {
  border-color: #3b82f6;
  background: #eff6ff;
}

.folder-icon {
  font-size: 24px;
}

.folder-text {
  font-weight: 600;
  color: #374151;
}

.folder-desc {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  color: #6b7280;
}

.lesson-management {
  margin-bottom: 32px;
}

.lessons-list {
  margin-bottom: 16px;
}

.lesson-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 8px;
}

.lesson-name {
  font-weight: 600;
  color: #1e293b;
}

.lesson-actions {
  display: flex;
  gap: 8px;
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-small.btn-secondary {
  background: #6b7280;
  color: white;
}

.btn-small.btn-secondary:hover {
  background: #4b5563;
}

.btn-small.btn-danger {
  background: #ef4444;
  color: white;
}

.btn-small.btn-danger:hover {
  background: #dc2626;
}

.lesson-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.lesson-sharing {
  margin-bottom: 32px;
}

.sharing-desc {
  margin-bottom: 16px;
  font-size: 14px;
  color: #6b7280;
}

.sharing-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.no-lessons {
  text-align: center;
  color: #6b7280;
  font-style: italic;
  padding: 24px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

/* Toast notifications */
.toast {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.settings-container h1 {
  font-family: 'Baloo 2', cursive;
  font-size: 36px;
  margin-bottom: 8px;
}

.settings-container .subtitle {
  color: var(--muted);
  margin-bottom: 40px;
}

/* Settings Section */
.settings-section {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.settings-section h2 {
  font-family: 'Baloo 2', cursive;
  font-size: 22px;
  margin-bottom: 8px;
}

.section-desc {
  color: var(--muted);
  margin-bottom: 24px;
  font-size: 14px;
}

/* Control Options */
.control-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.control-card {
  position: relative;
  cursor: pointer;
}

.hidden-radio {
  position: absolute;
  opacity: 0;
}

.control-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  text-align: center;
  transition: all 0.2s ease;
}

.control-card:hover .control-content {
  border-color: var(--purple);
  transform: translateY(-2px);
}

.control-card input:checked + .control-content {
  border-color: var(--purple);
  background: var(--purple-l);
}

.control-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.control-name {
  font-family: 'Baloo 2', cursive;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 4px;
}

.control-desc {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.control-features {
  font-size: 11px;
  color: var(--green);
  background: var(--green-l);
  padding: 4px 8px;
  border-radius: 6px;
}

/* Slider Control */
.slider-control {
  margin-bottom: 24px;
}

.slider-control label {
  display: block;
  font-weight: 600;
  margin-bottom: 12px;
}

.slider-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.slider-wrapper input[type="range"] {
  flex: 1;
  height: 8px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--bg);
  border-radius: 4px;
  outline: none;
}

.slider-wrapper input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  background: var(--purple);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

.slider-label {
  font-size: 12px;
  color: var(--muted);
  min-width: 50px;
}

.value-display {
  display: inline-block;
  margin-left: 12px;
  padding: 4px 12px;
  background: var(--purple-l);
  color: var(--purple);
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  min-width: 50px;
  text-align: center;
}

/* Toggle Control */
.toggle-control {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.toggle-switch {
  position: relative;
  width: 56px;
  height: 28px;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #e2e8f0;
  transition: 0.3s;
  border-radius: 28px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--purple);
}

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

.toggle-labels {
  flex: 1;
}

.toggle-title {
  display: block;
  font-weight: 600;
  margin-bottom: 2px;
}

.toggle-desc {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

/* Select Control */
.select-control {
  margin-bottom: 20px;
}

.select-control label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

.select-control select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  background: white;
  cursor: pointer;
}

.select-control select:focus {
  outline: none;
  border-color: var(--purple);
}

/* Input Control */
.input-control {
  margin-bottom: 20px;
}

.input-control label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

.input-control input[type="text"] {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
}

.input-control input[type="text"]:focus {
  outline: none;
  border-color: var(--purple);
}

/* Settings Actions */
.settings-actions {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 2px solid var(--bg);
}

/* Save Toast */
.save-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: white;
  padding: 16px 32px;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(5, 150, 105, 0.3);
  animation: slideUp 0.3s ease;
}

.save-toast.hidden {
  display: none;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Camera Preview */
.camera-preview-control {
  margin-top: 16px;
}

.camera-preview-control label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--fg);
}

.camera-preview-wrap {
  position: relative;
  width: 240px;
  height: 135px;
  background: #0f172a;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid #334155;
}

.camera-preview-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.camera-preview-status {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.85);
  color: #94a3b8;
  font-size: 11px;
  padding: 4px 8px;
  text-align: center;
}

.camera-preview-status.active {
  color: #34d399;
}

/* Active Tracker Banner */
.tracker-banner {
  position: fixed;
  top: 100px;
  right: 24px;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
  animation: slideInRight 0.3s ease;
  z-index: 1000;
}

.tracker-banner.hidden {
  display: none;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

