.mount-view {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--color-background-secondary) 0%, var(--color-background-tertiary) 100%);
  padding: 0;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
}

.mount-view::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.15) 1px, transparent 0);
  background-size: 20px 20px;
  pointer-events: none;
  opacity: 0.5;
  z-index: 0;
}

:root.dark .mount-view,
:root.auto.dark .mount-view {
  background: linear-gradient(135deg, var(--color-background-primary) 0%, var(--color-background-secondary) 100%);
}

:root.dark .mount-view::before,
:root.auto.dark .mount-view::before {
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.05) 1px, transparent 0);
  opacity: 0.3;
}

.mount-header {
  position: relative;
  z-index: 1;
  padding: 24px 28px 20px;
  background: var(--color-surface-elevated);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--color-border);
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: start;
}

.header-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.title-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-icon {
  width: 28px;
  height: 28px;
  color: var(--color-accent);
  flex-shrink: 0;
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--color-text-primary);
  margin: 0;
}

.stats-overview {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stat-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1;
}

.stat-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-item.success .stat-value {
  color: var(--color-success);
}

.stat-item.error .stat-value {
  color: var(--color-danger);
}

.stat-item.neutral .stat-value {
  color: var(--color-text-secondary);
}

.stat-divider {
  width: 1px;
  height: 24px;
  background: var(--color-border);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.service-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-danger);
  transition: background-color var(--transition-fast);
}

.service-indicator.active .indicator-dot {
  background: var(--color-success);
}

.indicator-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.service-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--color-background-secondary);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.service-toggle:hover {
  background: var(--color-accent);
  color: white;
}

.service-toggle.active {
  background: var(--color-warning);
  color: white;
}

.service-toggle:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.primary-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(165, 138, 233, 0.8);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.primary-btn:hover {
  background: var(--color-accent-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.primary-btn:active {
  transform: translateY(0);
}

.controls-section {
  position: relative;
  z-index: 1;
  padding: 20px 28px;
  background: var(--color-surface);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.search-container {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--color-text-tertiary);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 40px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-background-primary);
  font-size: 14px;
  color: var(--color-text-primary);
  transition: all var(--transition-medium);
}

.search-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.search-input::placeholder {
  color: var(--color-text-tertiary);
}

.filter-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-filter {
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-background-primary);
  color: var(--color-text-primary);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.status-filter:focus {
  outline: none;
  border-color: var(--color-accent);
}

.refresh-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-background-primary);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.refresh-btn:hover:not(:disabled) {
  background: var(--color-background-secondary);
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.refresh-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.refresh-icon {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-medium);
}

.refresh-icon.spinning {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.error-alert {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  background: rgba(255, 59, 48, 0.1);
  border-bottom: 1px solid rgba(255, 59, 48, 0.2);
  color: var(--color-danger);
}

.alert-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.alert-message {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.alert-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.alert-close:hover {
  background: rgba(255, 59, 48, 0.1);
}

.close-icon {
  width: 14px;
  height: 14px;
}

.configs-container {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 28px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  padding: 40px;
}

.empty-content {
  text-align: center;
  max-width: 400px;
}

.empty-icon {
  width: 64px;
  height: 64px;
  color: var(--color-text-tertiary);
  margin: 0 auto 24px;
}

.empty-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0 0 8px;
}

.empty-description {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin: 0 0 24px;
  line-height: 1.5;
}

.empty-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: rgba(165, 138, 233, 0.8);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.empty-action-btn:hover {
  background: var(--color-accent-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}

.config-card {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 24px;
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px) saturate(180%);
}

.config-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-border-secondary);
}

.config-card.mounted {
  border-color: var(--color-success);
  background: rgba(52, 199, 89, 0.05);
}

.config-card.error {
  border-color: var(--color-danger);
  background: rgba(255, 59, 48, 0.05);
}

.config-card.loading {
  background: rgba(0, 122, 255, 0.05);
  border-color: var(--color-accent);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.config-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
}

.config-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--color-background-secondary);
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

.config-details {
  flex: 1;
  min-width: 0;
}

.config-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.config-url {
  font-size: 12px;
  color: var(--color-text-tertiary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'SF Mono', Consolas, monospace;
}

.config-status {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--color-background-secondary);
  flex-shrink: 0;
}

.status-icon {
  width: 16px;
  height: 16px;
  color: var(--color-text-secondary);
}

.status-icon.success {
  color: var(--color-success);
}

.status-icon.error {
  color: var(--color-danger);
}

.status-icon.spinning {
  animation: spin 1s linear infinite;
}

.card-meta {
  margin-bottom: 20px;
}

.meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  background: var(--color-background-secondary);
  color: var(--color-text-secondary);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meta-tag.auto {
  background: var(--color-accent);
  color: white;
}

.meta-tag.clickable-mount-point {
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--color-primary-50);
  color: var(--color-primary-600);
  border: 1px solid var(--color-primary-200);
  gap: 4px;
}

.meta-tag.clickable-mount-point:hover {
  background: var(--color-primary-100);
  border-color: var(--color-primary-300);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.meta-tag.clickable-mount-point:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.mount-point-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

:root.dark .meta-tag.clickable-mount-point,
:root.auto.dark .meta-tag.clickable-mount-point {
  background: var(--color-primary-900);
  color: var(--color-primary-300);
  border-color: var(--color-primary-700);
}

:root.dark .meta-tag.clickable-mount-point:hover,
:root.auto.dark .meta-tag.clickable-mount-point:hover {
  background: var(--color-primary-800);
  border-color: var(--color-primary-600);
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.action-group {
  flex: 1;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  width: 100%;
  justify-content: center;
}

.action-btn.primary {
  background: var(--color-success);
  color: white;
}

.action-btn.primary:hover:not(:disabled) {
  background: #28a745;
  transform: translateY(-1px);
}

.action-btn.warning {
  background: var(--color-warning);
  color: white;
}

.action-btn.warning:hover:not(:disabled) {
  background: #e68900;
  transform: translateY(-1px);
}

.action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

.secondary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-background-primary);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.secondary-btn:hover:not(:disabled) {
  background: var(--color-background-secondary);
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.secondary-btn.danger:hover:not(:disabled) {
  background: var(--color-danger);
  color: white;
  border-color: var(--color-danger);
}

.secondary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.config-modal {
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(20px) saturate(180%);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--color-border);
}

.modal-title-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-icon {
  width: 20px;
  height: 20px;
  color: var(--color-accent);
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--color-background-secondary);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--color-background-tertiary);
  color: var(--color-text-primary);
}

.modal-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
}

.config-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.field-input,
.field-select {
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-background-primary);
  color: var(--color-text-primary);
  font-size: 14px;
  transition: all var(--transition-fast);
}

.field-input:focus,
.field-select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.field-input::placeholder {
  color: var(--color-text-tertiary);
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 8px 0;
}

.checkbox-input {
  width: 16px;
  height: 16px;
  accent-color: var(--color-accent);
}

.checkbox-label {
  font-size: 14px;
  color: var(--color-text-primary);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 28px 24px;
  border-top: 1px solid var(--color-border);
}

.cancel-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-background-primary);
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cancel-btn:hover {
  background: var(--color-background-secondary);
  color: var(--color-text-primary);
}

.save-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--color-accent);
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.save-btn:hover:not(:disabled) {
  background: var(--color-accent-hover);
}

.save-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.flags-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.flag-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.flag-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-background-primary);
  color: var(--color-text-primary);
  font-size: 13px;
  transition: all var(--transition-fast);
}

.flag-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.flag-input::placeholder {
  color: var(--color-text-tertiary);
}

.remove-flag-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-background-primary);
  color: var(--color-text-tertiary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.remove-flag-btn:hover {
  background: var(--color-danger);
  border-color: var(--color-danger);
  color: white;
}

.remove-flag-btn .btn-icon {
  width: 14px;
  height: 14px;
}

.add-flag-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: 4px;
}

.add-flag-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(0, 122, 255, 0.05);
}

.add-flag-btn .btn-icon {
  width: 14px;
  height: 14px;
}

/* Quick Flag Selector Styles */
.flags-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.quick-flags-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-background-primary);
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-flags-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(0, 122, 255, 0.05);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.15);
}

.quick-flags-btn .btn-icon {
  width: 16px;
  height: 16px;
}

.flag-selector-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.flag-selector-popup {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 1000px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: flagSelectorFadeIn 0.3s ease-out;
}

@keyframes flagSelectorFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.flag-selector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-background-secondary);
}

.flag-selector-header h4 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
}

.close-selector-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: var(--color-background-primary);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.close-selector-btn:hover {
  background: var(--color-background-tertiary);
  color: var(--color-text-primary);
  transform: scale(1.05);
}

.close-selector-btn .btn-icon {
  width: 18px;
  height: 18px;
}

.flag-selector-content {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.flag-selector-content::-webkit-scrollbar {
  display: none;
}
.flag-selector-help {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.06), rgba(99, 102, 241, 0.04));
  border: 1px solid rgba(59, 130, 246, 0.12);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.flag-selector-help::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #6366f1);
}

.flag-selector-help p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-align: center;
  line-height: 1.5;
}

.flag-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  max-height: 65vh;
  overflow-y: auto;
  padding: 4px;
  scroll-behavior: smooth;
}

.flag-categories::-webkit-scrollbar {
  width: 8px;
}

.flag-categories::-webkit-scrollbar-track {
  background: var(--color-background-secondary);
  border-radius: 4px;
}

.flag-categories::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
  border: 2px solid var(--color-background-secondary);
}

.flag-categories::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-tertiary);
}

.flag-category {
  border: 1px solid var(--color-border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--color-background-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.flag-category:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.category-header {
  background: var(--color-background-secondary);
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-header h5 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-primary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  text-align: center;
}

.category-flags {
  display: flex;
  flex-direction: column;
}

.flag-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border: none;
  background: var(--color-background-primary);
  color: var(--color-text-primary);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  border-bottom: 1px solid var(--color-border);
  position: relative;
}

.flag-option:last-child {
  border-bottom: none;
}

.flag-option:hover {
  background: var(--color-background-secondary);
  transform: translateX(2px);
}

.flag-option.selected,
.flag-option.in-config {
  background: rgba(34, 197, 94, 0.06);
  border-left-color: #22c55e;
  color: var(--color-text-primary);
}

.flag-option.selected:hover,
.flag-option.in-config:hover {
  background: rgba(34, 197, 94, 0.1);
  transform: translateX(2px);
}

.flag-checkbox {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.custom-checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-background-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.custom-checkbox:hover {
  border-color: #22c55e;
  transform: scale(1.05);
}

.custom-checkbox.checked {
  background: #22c55e;
  border-color: #22c55e;
  transform: scale(1.05);
}

.check-icon {
  width: 14px;
  height: 14px;
  color: white;
  stroke-width: 3px;
}

.flag-checkbox input[type='checkbox'] {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: #22c55e;
}

.flag-selector-help {
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.1);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 16px;
}

.flag-selector-help p {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-secondary);
  text-align: center;
}

.flag-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.flag-code {
  font-family: 'SF Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px;
  background: var(--color-background-tertiary);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-accent);
  display: inline-block;
  max-width: fit-content;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.flag-description {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 0;
}

:root.dark .flag-selector-popup,
:root.auto.dark .flag-selector-popup {
  background: var(--color-background-tertiary);
  border-color: var(--color-border);
}

:root.dark .flag-selector-header,
:root.auto.dark .flag-selector-header {
  background: var(--color-background-secondary);
  border-color: var(--color-border);
}

:root.dark .flag-category,
:root.auto.dark .flag-category {
  background: var(--color-background-primary);
  border-color: var(--color-border);
}

:root.dark .flag-category:hover,
:root.auto.dark .flag-category:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

:root.dark .flag-option,
:root.auto.dark .flag-option {
  background: var(--color-background-primary);
  border-color: var(--color-border);
}

:root.dark .flag-option:hover,
:root.auto.dark .flag-option:hover {
  background: var(--color-background-secondary);
}

:root.dark .flag-code,
:root.auto.dark .flag-code {
  background: var(--color-background-secondary);
  border-color: var(--color-border);
}

:root.dark .custom-checkbox,
:root.auto.dark .custom-checkbox {
  background: var(--color-background-primary);
  border-color: var(--color-border);
}

:root.dark .quick-flags-btn,
:root.auto.dark .quick-flags-btn {
  background: var(--color-background-primary);
  border-color: var(--color-border);
}
