.settings-container {
  padding: 24px;
  padding-bottom: 48px;
  max-width: 960px;
  margin: 0 auto;
  animation: fade-in var(--transition-normal);
}

.settings-header {
  margin-bottom: 32px;
}

.settings-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.settings-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.settings-layout {
  display: flex;
  gap: 32px;
}

/* Navigation */
.settings-nav {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--border-radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
}

.nav-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--color-primary);
  color: white;
}

.nav-item.active :deep(.n-icon) {
  color: white;
}

/* Content */
.settings-content {
  flex: 1;
  min-width: 0;
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color-light);
  border-radius: var(--border-radius-lg);
  padding: 24px;
}

.dark .section-card {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
}

.section-card-header {
  margin-bottom: 20px;
}

.section-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.section-card-desc {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* Theme Selector */
.theme-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.theme-option {
  cursor: pointer;
  border-radius: var(--border-radius-md);
  border: 2px solid var(--border-color-light);
  padding: 12px;
  transition: all var(--transition-fast);
  background: var(--bg-secondary);
}

.dark .theme-option {
  border-color: var(--border-color);
  background: var(--bg-secondary);
}

.theme-option:hover {
  border-color: var(--text-tertiary);
}

.theme-option.active {
  border-color: var(--color-primary);
  background: var(--bg-primary);
}

.dark .theme-option.active {
  background: var(--bg-tertiary);
}

.theme-preview {
  height: 72px;
  border-radius: var(--border-radius-sm);
  margin-bottom: 12px;
  display: flex;
  overflow: hidden;
  border: 1px solid var(--border-color-light);
}

.theme-preview.light {
  background: #f5f7fa;
}

.theme-preview.light .preview-sidebar {
  background: #ffffff;
  border-right: 1px solid #e4e7ed;
}

.theme-preview.light .preview-content {
  background: #f5f7fa;
}

.theme-preview.light .preview-header {
  background: #dcdfe6;
}

.theme-preview.light .preview-body {
  background: #ffffff;
  border: 1px solid #e4e7ed;
}

.theme-preview.dark {
  background: #18181c;
}

.theme-preview.dark .preview-sidebar {
  background: #101014;
  border-right: 1px solid #333;
}

.theme-preview.dark .preview-content {
  background: #18181c;
}

.theme-preview.dark .preview-header {
  background: #333;
}

.theme-preview.dark .preview-body {
  background: #28282c;
  border: 1px solid #333;
}

.theme-preview.system {
  background: linear-gradient(135deg, #f5f7fa 50%, #18181c 50%);
}

.theme-preview.system .preview-sidebar {
  background: linear-gradient(180deg, #ffffff 50%, #101014 50%);
  border-right: 1px solid #999;
}

.theme-preview.system .preview-content {
  background: linear-gradient(180deg, #f5f7fa 50%, #18181c 50%);
}

.theme-preview.system .preview-header {
  background: linear-gradient(180deg, #dcdfe6 50%, #333 50%);
}

.theme-preview.system .preview-body {
  background: linear-gradient(180deg, #ffffff 50%, #28282c 50%);
  border: 1px solid #999;
}

.preview-sidebar {
  width: 24%;
}

.preview-content {
  flex: 1;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.preview-header {
  height: 8px;
  width: 60%;
  border-radius: 2px;
}

.preview-body {
  flex: 1;
  border-radius: 3px;
}

.theme-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.theme-option.active .theme-info {
  color: var(--color-primary);
}

/* Setting Rows */
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color-light);
}

.dark .setting-row {
  border-bottom-color: var(--border-color);
}

.setting-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.setting-row:first-child {
  padding-top: 0;
}

.section-card-header + .setting-row {
  padding-top: 0;
}

.setting-info {
  flex: 1;
}

.setting-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  display: block;
  margin-bottom: 2px;
}

.setting-desc {
  font-size: 13px;
  color: var(--text-tertiary);
  margin: 0;
}

.setting-control {
  flex-shrink: 0;
}

.slider-control {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 200px;
}

.slider-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  min-width: 45px;
  text-align: right;
}

.slider-control :deep(.n-slider) {
  flex: 1;
}

/* Slider customization */
:deep(.n-slider-rail) {
  background-color: var(--border-color-light) !important;
}

.dark :deep(.n-slider-rail) {
  background-color: var(--border-color) !important;
}

:deep(.n-slider-rail__fill) {
  background-color: var(--color-primary) !important;
}

:deep(.n-slider-handle) {
  background-color: var(--color-primary) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .settings-layout {
    flex-direction: column;
    gap: 24px;
  }

  .settings-nav {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
  }

  .nav-item {
    white-space: nowrap;
  }

  .theme-selector {
    grid-template-columns: 1fr;
  }

  .slider-control {
    width: 160px;
  }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
