.list {
  width: 100%;
  display: flex;
  padding: 0;
  margin: 0;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: center;
  justify-content: flex-start;
}

.list-title {
  width: 100%;
  font-size: 1.5rem;
  color: var(--bold);
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.list-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}

/* Change to Grid if 6 or more children */
.list-wrapper:has(.list-item:nth-child(6)) {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.list-item {
  width: 100%;
  display: flex;
  padding: 0.875rem 1rem;
  flex-direction: row;
  align-content: center;
  align-items: center;
  justify-content: flex-start;
  gap: 0.875rem;
  position: relative;
  border-radius: 10px;
  background: rgba(var(--color-rgb), 0.03);
  border: 1px solid rgba(var(--color-rgb), 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.list-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--color);
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.list-item:hover {
  background: rgba(var(--color-rgb), 0.08);
  border-color: rgba(var(--color-rgb), 0.2);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.list-item:hover::before {
  opacity: 1;
}

.list-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  min-width: 2.25rem;
  border-radius: 8px;
  font-size: 1.1rem;
  color: white;
  background: var(--color);
  border: 2px solid rgba(var(--color-rgb), 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(var(--color-rgb), 0.25);
  position: relative;
}

.list-icon::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 10px;
  padding: 2px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.5;
}

.list-item:hover .list-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 4px 16px rgba(var(--color-rgb), 0.4);
}

.list-text {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-color);
  line-height: 1.5;
  letter-spacing: -0.01em;
  transition: color 0.3s ease;
}

.list-item:hover .list-text {
  color: var(--bold);
}

/* Filled State for Icons */
.list-icon.filled {
  color: var(--background);
  background: var(--color);
  border: 2px solid var(--color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.list-icon.filled:hover,
.list-icon.filled:focus-visible {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(var(--color-rgb), 0.4);
}

/* Darken Modifier */
.list-icon.darken:hover,
.list-icon.darken:focus-visible {
  filter: brightness(0.85);
}

/* States */
.list-icon.error {
  --color: var(--error-color);
  --color-rgb: 242, 155, 158;
}

.list-icon.success {
  --color: var(--success-color);
  --color-rgb: 157, 223, 158;
}

.list-icon.warning {
  --color: var(--warning-color);
  --color-rgb: 248, 218, 133;
}

.list-icon.white {
  --color: var(--white-color);
  --color-rgb: 255, 255, 255;
}

.list-icon.black {
  --color: var(--black-color);
  --color-rgb: 51, 51, 51;
}

.list-icon.question {
  --color: var(--question-color);
  --color-rgb: 51, 51, 51;
}

.list-icon.odd {
  --color: var(--odd-color);
  --color-rgb: 51, 51, 51;
}

.list-icon.transparent-outline {
  border-color: transparent !important;
  background: transparent !important;
}

.list-icon.transparent-outline:hover {
  background: rgba(var(--color-rgb), 0.05) !important;
  border-color: transparent !important;
}

.list-actions {
  color: var(--bold);
  width: fit-content;
  display: flex;
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  gap: 0.75rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.list-item:hover .list-actions {
  opacity: 1;
}

.action-button {
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-button:hover {
  opacity: 0.7;
  transform: scale(1.1);
}

/* Entrance Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.list-item {
  animation: fadeInUp 0.4s ease-out backwards;
}

.list-item:nth-child(1) { animation-delay: 0.05s; }
.list-item:nth-child(2) { animation-delay: 0.1s; }
.list-item:nth-child(3) { animation-delay: 0.15s; }
.list-item:nth-child(4) { animation-delay: 0.2s; }
.list-item:nth-child(5) { animation-delay: 0.25s; }
.list-item:nth-child(6) { animation-delay: 0.3s; }
.list-item:nth-child(7) { animation-delay: 0.35s; }
.list-item:nth-child(8) { animation-delay: 0.4s; }
.list-item:nth-child(9) { animation-delay: 0.45s; }
.list-item:nth-child(10) { animation-delay: 0.5s; }

/* Responsive Design */
@media (max-width: 768px) {
  .list-wrapper:has(.list-item:nth-child(6)) {
    grid-template-columns: 1fr;
  }
  
  .list-item {
    padding: 0.75rem 0.875rem;
  }
  
  .list-icon {
    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    font-size: 1rem;
  }
  
  .list-text {
    font-size: 0.9rem;
  }
  
  .list-item:hover {
    transform: translateX(2px);
  }
}

/* Grid Overwrite Utility */
.grid-overwrite .list-wrapper {
  display: flex !important;
  flex-direction: column !important;
}

/* Smooth scrolling for list containers */
.list {
  scroll-behavior: smooth;
}