/* Top row settings */
.settings-top-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(58, 63, 77, 0.5);
  margin-bottom: 16px;
}

.settings-top-row .setting-item {
  margin-bottom: 0;
  flex: 1;
}

.settings-top-row .toggle-container {
  display: flex;
  align-items: center;
  gap: 6px;
}

.settings-top-row .toggle-container label {
  white-space: nowrap;
  margin-right: 8px;
}

.settings-top-row .color-pickers {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-top-row .color-label {
  font-size: 0.85em;
  color: #8a8a8a;
  margin-right: 4px;
}

/* Rest of your existing settings panel styles */
.settings-panel {
  position: fixed;
  top: 165px;
  right: 15px;
  background: #2a2f3d;
  border: 1px solid rgba(240, 185, 11, 0.3);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  width: 300px;
  display: none;
  z-index: 1001;
  animation: fadeInSlide 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  backdrop-filter: blur(4px);
  background-color: rgba(42, 47, 61, 0.95);
  overflow: hidden;
}
.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    display: none;
}
@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.settings-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #f0b90b, #0ecb81, #f6465d);
  opacity: 0.7;
}

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

.settings-header h3 {
  margin: 0;
  font-size: 1.1em;
  font-weight: 600;
  color: #f0b90b;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-header h3::before {
  content: '⚙️';
  font-size: 0.9em;
}

.close-settings {
  background: rgba(240, 185, 11, 0.1);
  border: none;
  color: #f0b90b;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
}

.close-settings:hover {
  background: rgba(227, 25, 25, 0.2);
  color: #e31919;
  transform: rotate(90deg);
}

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

.settings-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(58, 63, 77, 0.5);
}

.settings-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

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

.setting-item label {
  color: #eaeaea;
  font-size: 0.95em;
  font-weight: 500;
  flex: 1;
  cursor: pointer;
  transition: color 0.2s;
}

.setting-item:hover label {
  color: #f0b90b;
}

.setting-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #f0b90b;
  position: relative;
}

.setting-item input[type="checkbox"]::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 3px;
  background-color: #1a1e27;
  border: 1px solid #3a3f4d;
}

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

.setting-item input[type="range"] {
  -webkit-appearance: none;
  width: 120px;
  height: 4px;
  background: #3a3f4d;
  border-radius: 2px;
  outline: none;
  margin-left: 12px;
}

.setting-item input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: #f0b90b;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.1s;
}

.setting-item input[type="range"]:active::-webkit-slider-thumb {
  transform: scale(1.2);
}

.setting-item input[type="color"] {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 2px solid #3a3f4d;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}

.setting-item input[type="color"]:hover {
  border-color: #f0b90b;
  transform: scale(1.05);
}

.setting-value {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9em;
  color: #8a8a8a;
  min-width: 50px;
}

.setting-description {
  font-size: 0.8em;
  color: #6a6a6a;
  margin-top: 4px;
  line-height: 1.4;
}

/* Light theme adjustments */
body.light-theme .settings-panel {
  background-color: rgba(245, 245, 245, 0.95);
  border-color: rgba(210, 210, 210, 0.5);
}
body.light-theme .settings-overlay {
    background: rgba(255,255,255,0.7);
}
body.light-theme .settings-header h3 {
  color: #d0a000;
}

body.light-theme .close-settings {
  color: #8a8a8a;
  background: rgba(210, 210, 210, 0.3);
}

body.light-theme .close-settings:hover {
  color: #e31919;
  background: rgba(227, 25, 25, 0.1);
}

body.light-theme .setting-item label {
  color: #333;
}

body.light-theme .setting-item:hover label {
  color: #d0a000;
}

body.light-theme .setting-item input[type="range"] {
  background: #d0d0d0;
}

body.light-theme .setting-item input[type="range"]::-webkit-slider-thumb {
  background: #d0a000;
}

body.light-theme .setting-description {
  color: #8a8a8a;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .settings-panel {
    width: 250px;
    right: 5px;
    padding: 14px;
  }

  .settings-content {
    gap: 12px;
  }

  .setting-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .setting-item input[type="range"] {
    width: 100%;
    margin-left: 0;
  }
}
