.name-generator {
  background: var(--color-card);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  max-width: 600px;
  margin: 0 auto;
  padding: var(--spacing-2xl);
}

.name-generator h2 {
  margin-bottom: var(--spacing-xl);
}

.controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
  align-items: start;
}

.controls label {
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.controls input[type="checkbox"] {
  width: auto;
  margin-right: var(--spacing-sm);
}

.controls label:has(input[type="checkbox"]) {
  flex-direction: row;
  align-items: center;
}

button.button-main {
  width: 100%;
  max-width: 200px;
  margin: 0 auto var(--spacing-xl);
  display: block;
}

.results {
  list-style: none;
  padding: 0;
  margin: 0;
}

.results li {
  padding: var(--spacing-md) var(--spacing-lg);
  margin-bottom: var(--spacing-sm);
  background: var(--color-background-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.results li:hover {
  background: var(--color-background-mute);
  border-color: var(--color-accent);
  transform: translateX(4px);
}

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

.copy-icon {
  color: var(--color-text-muted);
  opacity: 0;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
  margin-left: var(--spacing-sm);
}

.name-item:hover .copy-icon {
  opacity: 1;
}

.name-item:hover .copy-icon {
  color: var(--color-accent);
}

.name-item:active {
  background: var(--color-accent);
  color: white;
  transform: translateX(2px);
}

.name-item:active .copy-icon {
  color: white;
}

.toast {
  position: fixed;
  bottom: var(--spacing-xl);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: white;
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-weight: 500;
  z-index: 1000;
  animation: slideUp 0.3s ease;
}

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

.results li:last-child {
  margin-bottom: 0;
}

.name-type-switch {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  grid-column: 1 / -1;
  justify-self: start;
  max-width: 280px;
  margin-bottom: var(--spacing-md);
}

.switch-label {
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 500;
}

.switch-container {
  display: flex;
  background: var(--color-background-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 3px;
  width: fit-content;
  min-width: 180px;
}

.switch-button {
  background: transparent;
  border: none;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: calc(var(--radius-md) - 3px);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  /*white-space: nowrap;*/
  box-shadow: none;
  transform: none;
  /*flex: 1;*/
  text-align: center;
}

.switch-button:hover {
  color: var(--color-text);
  background: var(--color-background-mute);
  transform: none;
  box-shadow: none;
}

.switch-button.active {
  background: var(--color-accent);
  color: white;
  box-shadow: var(--shadow-sm);
  transform: none;
}

.switch-button.active:hover {
  background: var(--color-accent-hover);
  transform: none;
}

@media (max-width: 768px) {
  .name-generator {
    padding: var(--spacing-lg);
  }

  .controls {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
}
