/* ==========================================================================
   Multiplayer Lobby View Styles
   ========================================================================== */
.lobby-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.lobby-player-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.lobby-player-row:hover {
  background: rgba(255, 255, 255, 0.08);
}

.lobby-player-name {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-text-primary);
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  flex: 1;
  min-width: 0;
  margin-right: 0.5rem;
}

.lobby-player-tags {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.lobby-player-creator-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-gold);
  background: var(--color-gold-glow);
  border: 1px solid var(--color-gold);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.lobby-player-joined-tag {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

/* Player Presence & Connection Status Styles */
.presence-badge {
  font-size: 0.65rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  text-transform: capitalize;
}

.presence-badge.online {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.presence-badge.inactive {
  color: #facc15;
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.3);
}

.presence-badge.disconnected {
  color: #f87171;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.presence-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.presence-dot.online {
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.8);
  animation: pulse-online 2s infinite;
}

.presence-dot.inactive {
  background: #facc15;
  box-shadow: 0 0 4px rgba(250, 204, 21, 0.6);
}

.presence-dot.disconnected {
  background: #f87171;
  box-shadow: 0 0 4px rgba(248, 113, 113, 0.6);
}

.hud-presence-label {
  font-size: 0.7rem;
  margin-left: 0.25rem;
}

.hud-presence-label.online {
  color: #4ade80;
}

.hud-presence-label.inactive {
  color: #facc15;
}

.hud-presence-label.disconnected {
  color: #f87171;
  font-weight: 600;
}

.player-hud-item.disconnected {
  opacity: 0.75;
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.05);
}

.invite-link-container {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.lobby-actions {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Responsive queries for Lobby */
@media (max-width: 768px) {
  .lobby-content {
    grid-template-columns: 1fr;
    overflow-y: auto;
    flex: 1;
    margin: 0;
  }
}

@media (max-width: 600px) {
  .invite-link-container {
    flex-direction: column;
  }
  #lobby-invite-link {
    width: 100%;
  }
  #btn-copy-lobby-link {
    width: 100%;
  }
  .lobby-actions {
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.25rem;
  }
  .lobby-actions button {
    width: 100%;
  }
}
