
.teams-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.team-card {
  border-radius: 16px;
  overflow: hidden;
  background: #f3f3f3;
  flex: 1;
  min-width: max-content;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  animation: fadein 0.3s ease both;
}

@media (prefers-color-scheme: dark) {
  .team-card {
    background: #252c3f;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  }
}

.team-card:nth-child(1) { animation-delay: 0.05s; }
.team-card:nth-child(2) { animation-delay: 0.10s; }
.team-card:nth-child(3) { animation-delay: 0.15s; }
.team-card:nth-child(4) { animation-delay: 0.20s; }
.team-card:nth-child(5) { animation-delay: 0.25s; }

.team-card > h5 {
  padding: 0.8rem 1.25rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #eee;
  margin: 0;
}

.team-card:nth-child(1) > h5 { background: #dc2626; }
.team-card:nth-child(2) > h5 { background: #1d4ed8; }
.team-card:nth-child(3) > h5 { background: #15803d; }
.team-card:nth-child(4) > h5 { background: #d97706; }
.team-card:nth-child(5) > h5 { background: #7c3aed; }

.team-card > ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.team-card > ul > li {
  padding: 0.33rem 1.25rem 0.33rem 0.5rem;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
  display: flex;
  gap: 0.5rem;
  margin: 0;
  align-items: center;
  transition: background 0.15s, opacity 0.15s;
}

@media (prefers-color-scheme: dark) {
  .team-card > ul > li {
    border-bottom: 1px solid #1a1f2e;
  }
}

.team-card > ul > li:last-child {
  border-bottom: none;
}

.team-card > ul > li.dragging {
  opacity: 0.35;
  cursor: grabbing;
}

.team-card > ul > li.drag-over {
  background: rgba(99, 102, 241, 0.15);
}

@media (prefers-color-scheme: dark) {
  .team-card > ul > li.drag-over {
    background: rgba(99, 102, 241, 0.25);
  }
}

.drag-handle {
  margin-top: 0.2rem;
  cursor: grab;
  color: #9ca3af;
  font-size: 1.1rem;
  flex-shrink: 0;
  user-select: none;
  touch-action: none;
}

@keyframes fadein {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.spond-logo {
  height: 2rem;
  display: block;
}

@media (prefers-color-scheme: dark) {
  .spond-logo {
    filter: grayscale(1) brightness(3);
  }
}
