* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: #f9fafb;
  color: #111827;
}

/* Navbar styles */
.navbar {
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-container {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand {
  font-size: 1.25rem;
  font-weight: 700;
}

.navbar-info {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.navbar-item {
  font-size: 0.875rem;
}

.navbar-label {
  font-weight: 600;
  margin-right: 0.25rem;
}

/* Container styles */
.container {
  max-width: 48rem;
  margin: 2rem auto;
  padding: 1rem;
}

/* Typography */
h1 {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2rem;
  color: #1f2937;
}

h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #374151;
}

/* Section styles */
section {
  margin-bottom: 2rem;
}

/* Input and button styles */
.input-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  outline: none;
}

input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

button {
  padding: 0.5rem 1rem;
  background-color: #2563eb;
  color: white;
  border: none;
  border-radius: 0.25rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

button:hover {
  background-color: #1d4ed8;
}

button.secondary {
  background-color: #6b7280;
}

button.secondary:hover {
  background-color: #4b5563;
}

button.danger {
  background-color: #ef4444;
}

button.danger:hover {
  background-color: #dc2626;
}

.button-group {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  justify-content: flex-end;
}

/* Alert styles */
.alert {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border-radius: 0.25rem;
  background-color: #fef2f2;
  border: 1px solid #f87171;
  color: #b91c1c;
  margin-bottom: 1rem;
}

.alert-icon {
  width: 1rem;
  height: 1rem;
}

/* Elements display */
.elements-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.element {
  background-color: #f3f4f6;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.element .remove-btn {
  font-size: 1rem;
  color: #9ca3af;
  background: none;
  border: none;
  padding: 0;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s;
}

.element:hover .remove-btn {
  opacity: 1;
}

.element .remove-btn:hover {
  color: #ef4444;
  background: none;
}

/* Card styles */
.card {
  background-color: white;
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Radio button styles */
.radio-group {
  display: flex;
  gap: 2rem;
  margin-bottom: 1rem;
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.radio-item input[type="radio"] {
  width: 1rem;
  height: 1rem;
}

/* Output styles */
.sort-results {
  min-height: 6rem;
  transition: background-color 0.3s;
}

.sort-results.animating {
  background-color: #eff6ff;
}

.sorted-element {
  background-color: #dbeafe;
  color: #1e40af;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
}

.placeholder {
  color: #6b7280;
  text-align: center;
}

/* Full width button */
.full-width {
  width: 100%;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .navbar-info {
    display: none;
  }
  
  .navbar-mobile-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
  }
}
