.team-card.loading .team-avatar {
  display: none;
}

.team-card.loading .team-avatar-wrap::before {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-tertiary);
  animation: team-skeleton-pulse 1.5s ease-in-out infinite;
}

.team-card.loading .team-name {
  animation: team-skeleton-pulse 1.5s ease-in-out infinite;
  color: var(--text-secondary);
}

.team-card.loading .team-meta,
.team-card.loading .team-bio,
.team-card.loading .team-presence,
.team-card.loading .team-footer,
.team-card.loading .team-location,
.team-card.loading .team-clock {
  display: none !important;
}

@keyframes team-skeleton-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.team-grid {
  display: grid;
  gap: 2rem;
  margin-top: 2.5rem;
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 640px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}

.team-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start !important;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.team-card:hover {
  border-color: rgba(0,242,255,0.3);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

@media (min-width: 640px) {
  .team-card {
    flex-direction: row;
  }
}

.team-card-main {
  display: contents;
}

.team-avatar-wrap {
  position: relative;
  width: 4rem;
  height: 4rem;
  flex-shrink: 0;
  align-self: flex-start;
}

@media (min-width: 640px) {
  .team-avatar-wrap {
    width: 4.5rem;
    height: 4.5rem;
  }
}

.team-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--bg-tertiary);
}

.team-avatar-fallback {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .team-avatar-fallback {
    width: 4.5rem;
    height: 4.5rem;
  }
}

.fb-0 { background: linear-gradient(135deg, #0891b2, #2563eb); }
.fb-1 { background: linear-gradient(135deg, #7c3aed, #db2777); }
.fb-2 { background: linear-gradient(135deg, #d97706, #ea580c); }
.fb-3 { background: linear-gradient(135deg, #059669, #0d9488); }

.team-status {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  border: 2px solid var(--bg-secondary);
  background: #a1a1aa;
  transform: translate(25%, 25%);
}

.team-status.online { background: #22c55e; }
.team-status.idle { background: #f59e0b; }
.team-status.dnd { background: #ef4444; }
.team-status.offline { background: #a1a1aa; }

.team-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.team-name {
  margin-top: 0 !important;
  align-self: flex-start;
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.125rem;
}

.team-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.625rem;
}

.team-role {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-dark);
  white-space: nowrap;
}

.dark .team-role {
  color: var(--accent);
}

.team-role-tester {
  color: #22c55e;
}

.dark .team-role-tester {
  color: #4ade80;
}

.team-location {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  width: 100%;
}

.team-location svg {
  flex-shrink: 0;
  color: #22c55e;
  width: 10px;
  height: 10px;
}

.team-clock {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  width: 100%;
}

.team-info p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.6;
  text-align: left;
}

.team-presence {
  margin-top: 0.625rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  background: var(--bg-tertiary);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.25rem;
}

.team-presence .presence-icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.25rem;
}

.team-presence .presence-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.0625rem;
}

.team-presence .presence-name {
  font-weight: 700;
  color: var(--text);
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-presence .presence-detail {
  color: var(--text-secondary);
  font-size: 0.6875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-presence.empty {
  display: none;
}

.team-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.team-social {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.team-social a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  background: transparent;
  border: 1px solid var(--text-tertiary);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.team-social a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0,242,255,0.06);
}

.team-social:empty { display: none; }

.team-footer:has(.team-social:empty) {
  display: none;
}

.team-social a svg {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
}

.team-social span {
  font-size: 0.625rem;
  color: var(--text-tertiary);
}

.team-presence .presence-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
}

.team-presence .presence-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.team-presence .presence-name {
  font-weight: 700;
  color: var(--text);
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-presence .presence-detail {
  color: var(--text-tertiary);
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-social {
  display: flex;
  justify-content: center;
  gap: 1.75rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.team-social a {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  text-decoration: none;
}

.team-role {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-dark);
  margin-bottom: 1rem;
}

.dark .team-role {
  color: var(--accent);
}

.team-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.team-presence {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: var(--bg-tertiary);
  font-size: 0.8125rem;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
}

.team-presence .presence-icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
}

.team-presence .presence-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.team-presence .presence-name {
  font-weight: 700;
  color: var(--text);
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-presence .presence-detail {
  color: var(--text-tertiary);
  font-size: 0.8125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-social {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.team-role {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent-dark);
  margin-bottom: 0.75rem;
}

.dark .team-role {
  color: var(--accent);
}

.team-card p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.team-presence {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: var(--bg-tertiary);
  font-size: 0.8125rem;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.5rem;
}

.team-presence .presence-icon {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.375rem;
}

.team-presence .presence-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.team-presence .presence-name {
  font-weight: 700;
  color: var(--text);
  font-size: 0.8125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-presence .presence-detail {
  color: var(--text-secondary);
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dark .team-presence .presence-detail {
  color: #d4d4d8;
}

.team-presence.presence-spotify .presence-name {
  color: #1db954;
}

.team-presence.empty {
  display: none;
}

.team-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.team-social a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  background: transparent;
  border: 1px solid var(--text-tertiary);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.dark .team-social a {
  border-color: #71717a;
  color: #d4d4d8;
}

.team-social a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0,242,255,0.08);
}

.dark .team-social a:hover {
  background: #3f3f46;
  color: #fff;
}

.team-social:empty { display: none; }